org.jpos.iso
Class FSDISOMsg

java.lang.Object
  extended by org.jpos.iso.ISOComponent
      extended by org.jpos.iso.ISOMsg
          extended by org.jpos.iso.FSDISOMsg
All Implemented Interfaces:
Externalizable, Serializable, Cloneable, Loggeable

public class FSDISOMsg
extends ISOMsg
implements Cloneable

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jpos.iso.ISOMsg
direction, dirty, fieldNumber, fields, header, INCOMING, maxField, maxFieldDirty, OUTGOING, packager
 
Constructor Summary
FSDISOMsg()
           
FSDISOMsg(FSDMsg fsd)
           
 
Method Summary
 Object clone()
           
 Object clone(int[] fields)
          Partially clone an ISOMsg
 void dump(PrintStream p, String indent)
          dump the message to a PrintStream.
 FSDMsg getFSDMsg()
           
 String getMTI()
           
 String getString(int fldno)
          Return the String value associated with the given ISOField number
 String getString(String fld)
          Return the String value associated with the given field path
 boolean hasField(int fldno)
          Check if a given field is present
 boolean hasField(String fld)
          Check if a field indicated by a fpath is present
 void merge(ISOMsg m)
          add all fields present on received parameter to this ISOMsg
please note that received fields take precedence over existing ones (simplifying card agent message creation and template handling)
 byte[] pack()
          pack the message with the current packager
 void readExternal(ObjectInput in)
           
 void set(String name, String value)
          Creates an ISOField associated with fldno within this ISOMsg
 void setResponseMTI()
          sets an appropiate response MTI.
 int unpack(byte[] b)
          unpack a message
 void unpack(InputStream in)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class org.jpos.iso.ISOMsg
getBytes, getBytes, getChildren, getComponent, getComponent, getComposite, getDirection, getHeader, getISOHeader, getKey, getMaxField, getPackager, getSource, getValue, getValue, getValue, hasFields, hasFields, isIncoming, isInner, isOutgoing, isRequest, isResponse, isRetransmission, move, readDirection, readHeader, readPackager, recalcBitMap, set, set, set, set, set, setDirection, setFieldNumber, setHeader, setHeader, setMTI, setPackager, setRetransmissionMTI, setSource, setValue, toString, unset, unset, unset, writeDirection, writeHeader, writePackager
 
Methods inherited from class org.jpos.iso.ISOComponent
getBytes, pack
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FSDISOMsg

public FSDISOMsg()

FSDISOMsg

public FSDISOMsg(FSDMsg fsd)
Method Detail

getMTI

public String getMTI()
Overrides:
getMTI in class ISOMsg
Returns:
current MTI

pack

public byte[] pack()
            throws ISOException
Description copied from class: ISOMsg
pack the message with the current packager

Overrides:
pack in class ISOMsg
Returns:
the packed message
Throws:
ISOException

unpack

public int unpack(byte[] b)
           throws ISOException
Description copied from class: ISOMsg
unpack a message

Overrides:
unpack in class ISOMsg
Parameters:
b - - raw message
Returns:
consumed bytes
Throws:
ISOException

unpack

public void unpack(InputStream in)
            throws IOException,
                   ISOException
Overrides:
unpack in class ISOMsg
Throws:
IOException
ISOException

getFSDMsg

public FSDMsg getFSDMsg()

getString

public String getString(int fldno)
Description copied from class: ISOMsg
Return the String value associated with the given ISOField number

Overrides:
getString in class ISOMsg
Parameters:
fldno - the Field Number
Returns:
field's String value

getString

public String getString(String fld)
Description copied from class: ISOMsg
Return the String value associated with the given field path

Overrides:
getString in class ISOMsg
Parameters:
fld - field path
Returns:
field's String value (may be null)

hasField

public boolean hasField(int fldno)
Description copied from class: ISOMsg
Check if a given field is present

Overrides:
hasField in class ISOMsg
Parameters:
fldno - the Field Number
Returns:
boolean indicating the existence of the field

hasField

public boolean hasField(String fld)
Description copied from class: ISOMsg
Check if a field indicated by a fpath is present

Overrides:
hasField in class ISOMsg
Parameters:
fld - dot-separated field path (i.e. 63.2)
Returns:
true if field present

dump

public void dump(PrintStream p,
                 String indent)
Description copied from class: ISOMsg
dump 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.

Specified by:
dump in interface Loggeable
Overrides:
dump in class ISOMsg
Parameters:
p - - print stream
indent - - optional indent string

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class ISOMsg
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class ISOMsg
Throws:
IOException
ClassNotFoundException

clone

public Object clone()
Overrides:
clone in class ISOMsg

clone

public Object clone(int[] fields)
Description copied from class: ISOMsg
Partially clone an ISOMsg

Overrides:
clone in class ISOMsg
Parameters:
fields - int array of fields to go
Returns:
new ISOMsg instance

merge

public void merge(ISOMsg m)
Description copied from class: ISOMsg
add all fields present on received parameter to this ISOMsg
please note that received fields take precedence over existing ones (simplifying card agent message creation and template handling)

Overrides:
merge in class ISOMsg
Parameters:
m - ISOMsg to merge

setResponseMTI

public void setResponseMTI()
Description copied from class: ISOMsg
sets an appropiate response MTI. i.e. 0100 becomes 0110
i.e. 0201 becomes 0210
i.e. 1201 becomes 1210

Overrides:
setResponseMTI in class ISOMsg

set

public void set(String name,
                String value)
Description copied from class: ISOMsg
Creates an ISOField associated with fldno within this ISOMsg

Overrides:
set in class ISOMsg
Parameters:
name - dot-separated field path (i.e. 63.2)
value - field value


Copyright © 1998-2012 jPOS.org. All Rights Reserved.