Class ISOVMsg
java.lang.Object
org.jpos.iso.ISOComponent
org.jpos.iso.ISOMsg
org.jpos.iso.ISOVMsg
- All Implemented Interfaces:
Externalizable, Serializable, Cloneable, ISOVErrorList, Loggeable
Wrapper class resulting from process of validating an ISOMsg
instance. Contains details of the original msg and validation-error
details too. Normally in validation process when an error is detected
by validator in msg, then the msg is replaced by an instance
of this class, containning error details.
Title: jPOS
Description: Java Framework for Financial Systems
Copyright: Copyright (c) 2000 jPOS.org. All rights reserved.
Company: www.jPOS.org
- See Also:
-
Field Summary
FieldsFields inherited from class ISOMsg
direction, dirty, fieldNumber, fields, header, INCOMING, maxField, maxFieldDirty, OUTGOING, packager, trailerModifier and TypeFieldDescriptionprotected intMessage direction: INCOMING or OUTGOING.protected booleanDirty flags for tracking state changes.protected intField number of this message when nested inside another ISOMsg.Map of field number to field value.protected ISOHeaderOptional ISO header for this message.static final intConstant indicating an incoming message direction.protected intHighest field number currently set in this message.protected booleanDirty flags for tracking state changes.static final intConstant indicating an outgoing message direction.protected ISOPackagerThe packager used to pack/unpack this message.protected byte[]Optional trailer bytes appended to the packed message. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddISOVError(ISOVError Error) Add an error component to the list of errors.Get an error iterator instance.Methods inherited from class ISOMsg
clone, clone, clone, dump, getBytes, getBytes, getChildren, getComponent, getComponent, getComposite, getDirection, getFieldNumber, getHeader, getISOHeader, getKey, getMaxField, getMTI, getPackager, getSource, getString, getString, getTrailer, getValue, getValue, getValue, hasAny, hasAny, hasField, hasField, hasFields, hasFields, hasMTI, isAdministrative, isAuthorization, isChargeback, isFeeCollection, isFileAction, isFinancial, isIncoming, isInner, isNetworkManagement, isOutgoing, isReconciliation, isRequest, isResponse, isRetransmission, isReversal, merge, merge, move, pack, readDirection, readExternal, readHeader, readPackager, recalcBitMap, set, set, set, set, set, set, setDirection, setFieldNumber, setHeader, setHeader, setMTI, setPackager, setResponseMTI, setRetransmissionMTI, setSource, setTrailer, setValue, toString, unpack, unpack, unset, unset, unset, unset, with, with, with, with, with, without, without, writeDirection, writeExternal, writeHeader, writePackagerModifier and TypeMethodDescriptionclone()clone(int... fields) Partially clone an ISOMsgPartially clone an ISOMsg by field pathsvoiddump(PrintStream p, String indent) dump the message to a PrintStream.byte[]getBytes(int fldno) Return the byte[] value associated with the given ISOField numberbyte[]Return the String value associated with the given field pathclone fieldsgetComponent(int fldno) get the component associated with the given field numbergetComponent(String fpath) get the component associated with the given field numberIn order to interchange Composites and Leafs we use getComposite().intReturns the message direction.intReturns the field number this component occupies within its container.byte[]get optional message header imageReturn this messages ISOHeadergetKey()valid on Leafs only.intReturns the highest field number present in this message.getMTI()Returns the message type indicator.Returns the packager associated with this message.Returns the associated ISOSource (e.g.getString(int fldno) Return the String value associated with the given ISOField numberReturn the String value associated with the given field pathbyte[]Get optional trailer image.getValue()Returns this message itself as its value.getValue(int fldno) Return the object value associated with the given field numberReturn the object value associated with the given field pathbooleanhasAny(int[] fields) Check if the message has any of these fieldsbooleanCheck if the message has any of these fieldsbooleanhasField(int fldno) Check if a given field is presentbooleanCheck if a field indicated by a fpath is presentbooleanReturns true if this message has at least one field set.booleanhasFields(int[] fields) Check if all fields are presentbooleanhasMTI()Returns true if this message has an MTI field (field 0) set.booleanReturns true if this is an administrative message (MTI second digit = 6).booleanReturns true if this is an authorization message (MTI second digit = 1).booleanReturns true if this is a chargeback message (MTI second digit = 4, last digit 2 or 3).booleanReturns true if this is a fee collection message (MTI second digit = 7).booleanReturns true if this is a file action message (MTI second digit = 3).booleanReturns true if this is a financial message (MTI second digit = 2).booleanReturns true if this message was received from a channel.booleanisInner()Returns true if this is an inner (sub-) message.booleanReturns true if this is a network management message (MTI second digit = 8).booleanReturns true if this message is to be sent via a channel.booleanReturns true if this is a reconciliation message (MTI second digit = 5).booleanReturns true if the MTI suggests this is a request message.booleanReturns true if the MTI suggests this is a response message.booleanReturns true if this is a retransmission (MTI last digit = 1).booleanReturns true if this is a reversal message (MTI second digit = 4, last digit 0 or 1).voidMerges the content of the specified ISOMsg into this ISOMsg instance, excluding the header.voidMerges the content of the specified ISOMsg into this ISOMsg instance.voidmove(int oldFieldNumber, int newFieldNumber) moves a field (renumber)byte[]pack()Packs this message using the configured packager.protected voidDeserializes the message direction from the given ObjectInput.voidprotected voidDeserializes the message header from the given ObjectInput.protected voidDeserializes the packager from the given ObjectInput.voidsetup BitMapvoidset(int fldno, byte[] value) Creates an ISOBinaryField associated with fldno within this ISOMsg.voidCreates an ISOField associated with fldno within this ISOMsg.voidCreates an ISOField associated with fldno within this ISOMsg.voidCreates an ISOField associated with fldno within this ISOMsg.voidset(String fpath, ISOComponent c) Creates an ISOField associated with fldno within this ISOMsgvoidset(ISOComponent c) Set a field within this messagevoidsetDirection(int direction) Sets the direction information related to this messagevoidsetFieldNumber(int fieldNumber) changes this Component field number
Use with care, this method does not change any reference held by a Composite.voidsetHeader(byte[] b) Sets an optional message header imagevoidSets the ISO header for this message.voidSets the message type indicator.voidSets the packager used to pack/unpack this message.voidsets an appropriate response MTI.voidsets an appropriate retransmission MTIvoidLet this ISOMsg object hold a weak reference to an ISOSource (usually used to carry a reference to the incoming ISOChannel)voidsetTrailer(byte[] trailer) Sets optional trailer data.voidDon't call setValue on an ISOMsg.toString()intunpack(byte[] b) Unpacks the raw byte array into this message.voidunpack(InputStream in) Unpacks this component by reading fromin.voidunset(int fldno) Unset a field if it exists, otherwise ignore.voidunset(int... flds) Unsets several fields at oncevoidUnset a field referenced by a fpath if it exists, otherwise ignore.voidUnset a a set of fields referenced by fpaths if any ot them exist, otherwise ignore.with(int fldno, byte[] value) Sets a top-level binary field and returns this message for fluent chaining.Sets a top-level character field and returns this message for fluent chaining.Sets a binary field by path and returns this message for fluent chaining.Sets a character field by path and returns this message for fluent chaining.with(String fpath, ISOComponent c) Sets a component by path and returns this message for fluent chaining.without(int... flds) Unsets one or more top-level fields and returns this message for fluent chaining.Unsets one or more field paths, including nested composites and dataset elements, and returns this message for fluent chaining.protected voidSerializes the message direction to the given ObjectOutput.voidprotected voidwriteHeader(ObjectOutput out) Serializes the message header to the given ObjectOutput.protected voidSerializes the packager class name to the given ObjectOutput.Methods inherited from class ISOComponent
getBytes, packModifier and TypeMethodDescriptionbyte[]getBytes()get Value as bytes (when possible)voidpack(OutputStream out) Packs this component and writes it toout.Methods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Loggeable
dumpModifier and TypeMethodDescriptiondefault voiddump(PrintStream p, String indent, LogRenderer.Type type) Dumps a representation of this object using the specified renderer type.
-
Field Details
-
errors
list of errors
-
-
Constructor Details
-
ISOVMsg
-
ISOVMsg
-
-
Method Details
-
addISOVError
Add an error component to the list of errors.- Specified by:
addISOVErrorin interfaceISOVErrorList- Parameters:
Error- Error instance to add.- Returns:
- True if the list of errors change after operation.
- See Also:
-
errorListIterator
Get an error iterator instance.- Specified by:
errorListIteratorin interfaceISOVErrorList- Returns:
- iterator.
-