Class ISOMsgRef.Ref
java.lang.Object
org.jpos.iso.ISOComponent
org.jpos.iso.ISOMsg
org.jpos.tlv.ISOMsgRef.Ref
- All Implemented Interfaces:
Externalizable, Serializable, Cloneable, OffsetIndexedComposite, Loggeable
- Enclosing class:
ISOMsgRef
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()clone(int[] fields) Partially clone an ISOMsgvoiddump(PrintStream p, String indent) dump the message to a PrintStream.byte[]getBytes()get Value as bytes (when possible)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().intbyte[]get optional message header imageReturn this messages ISOHeadergetKey()valid on Leafs only.inta Composite must override this functiongetMTI()intgetString(int fldno) Return the String value associated with the given ISOField numberReturn the String value associated with the given field pathgetValue()valid on Leafs only.getValue(int fldno) Return the object value associated with the given field numberReturn the object value associated with the given field pathbooleanhasField(int fldno) Check if a given field is presentbooleanCheck if a field indicated by a fpath is presentbooleanbooleanhasFields(int[] fields) Check if all fields are presentvoidbooleanbooleanisInner()booleanbooleanvoidvoidmove(int oldFieldNumber, int newFieldNumber) moves a field (renumber)byte[]pack()pack the message with the current packagervoidpack(OutputStream out) voidsetup BitMapvoidvoidset(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 imagevoidvoidvoidsetOffset(int offset) voidvoidDon't call setValue on an ISOMsg.toString()intunpack(byte[] b) unpack a messagevoidunpack(InputStream in) 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.Methods inherited from class ISOMsg
clone, getFieldNumber, getSource, getTrailer, hasAny, hasAny, hasMTI, isAdministrative, isAuthorization, isChargeback, isFeeCollection, isFileAction, isFinancial, isNetworkManagement, isReconciliation, isResponse, isRetransmission, isReversal, merge, readDirection, readExternal, readHeader, readPackager, setResponseMTI, setRetransmissionMTI, setSource, setTrailer, unset, writeDirection, writeExternal, writeHeader, writePackager
-
Method Details
-
incOffset
- Specified by:
incOffsetin interfaceOffsetIndexedComposite
-
setOffset
- Specified by:
setOffsetin interfaceOffsetIndexedComposite
-
resetOffset
- Specified by:
resetOffsetin interfaceOffsetIndexedComposite
-
getOffset
- Specified by:
getOffsetin interfaceOffsetIndexedComposite
-
getKey
Description copied from class:ISOComponentvalid on Leafs only. The value returned is used by ISOMsg as a key to this field.- Overrides:
getKeyin classISOMsg- Returns:
- object representing the field number
- Throws:
ISOException
-
setFieldNumber
Description copied from class:ISOMsgchanges this Component field number
Use with care, this method does not change any reference held by a Composite.- Overrides:
setFieldNumberin classISOMsg- Parameters:
fieldNumber- new field number
-
setValue
Description copied from class:ISOMsgDon't call setValue on an ISOMsg. You'll sure get an ISOException. It's intended to be used on Leafs- Overrides:
setValuein classISOMsg- Parameters:
obj-- Throws:
ISOException- See Also:
-
set
Description copied from class:ISOMsgSet a field within this message- Overrides:
setin classISOMsg- Parameters:
c- - a component- Throws:
ISOException
-
unset
-
getComposite
Description copied from class:ISOMsgIn order to interchange Composites and Leafs we use getComposite(). A Composite component returns itself and a Leaf returns null.- Overrides:
getCompositein classISOMsg- Returns:
- ISOComponent
-
getValue
Description copied from class:ISOComponentvalid on Leafs only. -
getBytes
Description copied from class:ISOComponentget Value as bytes (when possible)- Overrides:
getBytesin classISOComponent- Returns:
- byte[] representing this field
- Throws:
ISOException
-
getMaxField
Description copied from class:ISOComponenta Composite must override this function- Overrides:
getMaxFieldin classISOMsg- Returns:
- the max field number associated with this message
-
getChildren
Description copied from class:ISOMsgclone fields- Overrides:
getChildrenin classISOMsg- Returns:
- copy of fields
-
pack
- Overrides:
packin classISOComponent- Throws:
IOExceptionISOException
-
dump
Description copied from class:ISOMsgdump the message to a PrintStream. The output is sorta XML, intended to be easily parsed.
Each component is responsible for its own dump function, ISOMsg just calls dump on every valid field. -
pack
Description copied from class:ISOMsgpack the message with the current packager- Overrides:
packin classISOMsg- Returns:
- the packed message
- Throws:
ISOException
-
unpack
Description copied from class:ISOMsgunpack a message- Overrides:
unpackin classISOMsg- Parameters:
b- - raw message- Returns:
- consumed bytes
- Throws:
ISOException
-
unpack
- Overrides:
unpackin classISOMsg- Throws:
IOExceptionISOException
-
setDirection
Description copied from class:ISOMsgSets the direction information related to this message- Overrides:
setDirectionin classISOMsg- Parameters:
direction- can be either ISOMsg.INCOMING or ISOMsg.OUTGOING
-
setHeader
-
setHeader
-
getHeader
-
getISOHeader
Description copied from class:ISOMsgReturn this messages ISOHeader- Overrides:
getISOHeaderin classISOMsg- Returns:
- header associated with this ISOMsg, can be null
-
getDirection
- Overrides:
getDirectionin classISOMsg- Returns:
- the direction (ISOMsg.INCOMING or ISOMsg.OUTGOING)
- See Also:
-
isIncoming
- Overrides:
isIncomingin classISOMsg- Returns:
- true if this message is an incoming message
- See Also:
-
isOutgoing
- Overrides:
isOutgoingin classISOMsg- Returns:
- true if this message is an outgoing message
- See Also:
-
setPackager
- Overrides:
setPackagerin classISOMsg- Parameters:
p- - a peer packager
-
getPackager
- Overrides:
getPackagerin classISOMsg- Returns:
- the peer packager
-
set
-
set
-
set
Description copied from class:ISOMsgCreates an ISOField associated with fldno within this ISOMsg- Overrides:
setin classISOMsg- Parameters:
fpath- dot-separated field path (i.e. 63.2)c- component- Throws:
ISOException- on error
-
set
-
set
-
unset
-
unset
-
recalcBitMap
Description copied from class:ISOMsgsetup BitMap- Overrides:
recalcBitMapin classISOMsg- Throws:
ISOException- on error
-
getComponent
Description copied from class:ISOMsgget the component associated with the given field number- Overrides:
getComponentin classISOMsg- Parameters:
fldno- the Field Number- Returns:
- the Component
-
getValue
-
getValue
Description copied from class:ISOMsgReturn the object value associated with the given field path- Overrides:
getValuein classISOMsg- Parameters:
fpath- field path- Returns:
- the field Object (may be null)
- Throws:
ISOException- on error
-
getComponent
Description copied from class:ISOMsgget the component associated with the given field number- Overrides:
getComponentin classISOMsg- Parameters:
fpath- field path- Returns:
- the Component
- Throws:
ISOException- on error
-
getString
-
getString
-
getBytes
Description copied from class:ISOMsgReturn the byte[] value associated with the given ISOField number -
getBytes
-
hasField
-
hasFields
-
hasField
-
hasFields
-
clone
-
clone
-
merge
-
toString
-
isInner
-
setMTI
- Overrides:
setMTIin classISOMsg- Parameters:
mti- new MTI- Throws:
ISOException- if message is inner message
-
move
Description copied from class:ISOMsgmoves a field (renumber)- Overrides:
movein classISOMsg- Parameters:
oldFieldNumber- old field numbernewFieldNumber- new field number- Throws:
ISOException- on error
-
getMTI
- Overrides:
getMTIin classISOMsg- Returns:
- current MTI
- Throws:
ISOException- on inner message or MTI not set
-
isRequest
- Overrides:
isRequestin classISOMsg- Returns:
- true if message "seems to be" a request
- Throws:
ISOException- on MTI not set
-