|
jPOS 1.6.1 API Documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jpos.iso.ISOComponent
org.jpos.iso.ISOMsg
public class ISOMsg
implements Composite whithin a Composite pattern
ISOComponent,
ISOField,
Serialized Form| Field Summary | |
|---|---|
static int |
INCOMING
|
static int |
OUTGOING
|
| Constructor Summary | |
|---|---|
ISOMsg()
Creates an ISOMsg |
|
ISOMsg(int fieldNumber)
Creates a nested ISOMsg |
|
ISOMsg(java.lang.String mti)
Creates an ISOMsg with given mti |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
java.lang.Object |
clone(int[] fields)
Partially clone an ISOMsg |
void |
dump(java.io.PrintStream p,
java.lang.String indent)
dump the message to a PrintStream. |
byte[] |
getBytes(int fldno)
Return the byte[] value associated with the given ISOField number |
byte[] |
getBytes(java.lang.String fpath)
Return the String value associated with the given field path |
java.util.Hashtable |
getChildren()
clone fields |
ISOComponent |
getComponent(int fldno)
get the component associated with the given field number |
ISOComponent |
getComposite()
In order to interchange Composites and Leafs we use getComposite(). |
int |
getDirection()
|
byte[] |
getHeader()
get optional message header image |
ISOHeader |
getISOHeader()
Return this messages ISOHeader |
java.lang.Object |
getKey()
valid on Leafs only. |
int |
getMaxField()
a Composite must override this function |
java.lang.String |
getMTI()
|
ISOPackager |
getPackager()
|
ISOSource |
getSource()
|
java.lang.String |
getString(int fldno)
Return the String value associated with the given ISOField number |
java.lang.String |
getString(java.lang.String fpath)
Return the String value associated with the given field path |
java.lang.Object |
getValue()
valid on Leafs only. |
java.lang.Object |
getValue(int fldno)
Return the object value associated with the given field number |
java.lang.Object |
getValue(java.lang.String fpath)
Return the object value associated with the given field path |
boolean |
hasField(int fldno)
Check if a given field is present |
boolean |
hasFields(int[] fields)
Check if all fields are present |
boolean |
isIncoming()
|
boolean |
isInner()
|
boolean |
isOutgoing()
|
boolean |
isRequest()
|
boolean |
isResponse()
|
boolean |
isRetransmission()
|
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) |
void |
move(int oldFieldNumber,
int newFieldNumber)
moves a field (renumber) |
byte[] |
pack()
pack the message with the current packager |
void |
readExternal(java.io.ObjectInput in)
|
void |
recalcBitMap()
setup BitMap |
void |
set(int fldno,
byte[] value)
Creates an ISOBinaryField associated with fldno within this ISOMsg |
void |
set(int fldno,
java.lang.String value)
Creates an ISOField associated with fldno within this ISOMsg |
void |
set(ISOComponent c)
Set a field within this message |
void |
set(java.lang.String fpath,
byte[] value)
Creates an ISOField associated with fldno within this ISOMsg |
void |
set(java.lang.String fpath,
java.lang.String value)
Creates an ISOField associated with fldno within this ISOMsg |
void |
setDirection(int direction)
Sets the direction information related to this message |
void |
setFieldNumber(int fieldNumber)
changes this Component field number Use with care, this method does not change any reference held by a Composite. |
void |
setHeader(byte[] b)
Sets an optional message header image |
void |
setHeader(ISOHeader header)
|
void |
setMTI(java.lang.String mti)
|
void |
setPackager(ISOPackager p)
|
void |
setResponseMTI()
sets an appropiate response MTI. |
void |
setRetransmissionMTI()
sets an appropiate retransmission MTI |
void |
setSource(ISOSource source)
Let this ISOMsg object hold a weak reference to an ISOSource (usually used to carry a reference to the incoming ISOChannel) |
void |
setValue(java.lang.Object obj)
Don't call setValue on an ISOMsg. |
java.lang.String |
toString()
|
int |
unpack(byte[] b)
unpack a message |
void |
unpack(java.io.InputStream in)
|
void |
unset(int fldno)
Unset a field if it exists, otherwise ignore. |
void |
unset(int[] flds)
Unsets several fields at once |
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class org.jpos.iso.ISOComponent |
|---|
getBytes, pack |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int INCOMING
public static final int OUTGOING
| Constructor Detail |
|---|
public ISOMsg()
public ISOMsg(int fieldNumber)
public ISOMsg(java.lang.String mti)
mti - Msg's MTI| Method Detail |
|---|
public void setFieldNumber(int fieldNumber)
setFieldNumber in class ISOComponentfieldNumber - new field numberpublic void setDirection(int direction)
direction - can be either ISOMsg.INCOMING or ISOMsg.OUTGOINGpublic void setHeader(byte[] b)
b - header imagepublic void setHeader(ISOHeader header)
public byte[] getHeader()
public ISOHeader getISOHeader()
public int getDirection()
ISOChannelpublic boolean isIncoming()
ISOChannelpublic boolean isOutgoing()
ISOChannelpublic int getMaxField()
ISOComponent
getMaxField in class ISOComponentpublic void setPackager(ISOPackager p)
p - - a peer packagerpublic ISOPackager getPackager()
public void set(ISOComponent c)
throws ISOException
set in class ISOComponentc - - a component
ISOException
public void set(int fldno,
java.lang.String value)
throws ISOException
fldno - field numbervalue - field value
ISOException
public void set(java.lang.String fpath,
java.lang.String value)
throws ISOException
fpath - dot-separated field path (i.e. 63.2)value - field value
ISOException
public void set(java.lang.String fpath,
byte[] value)
throws ISOException
fpath - dot-separated field path (i.e. 63.2)value - binary field value
ISOException
public void set(int fldno,
byte[] value)
throws ISOException
fldno - field numbervalue - field value
ISOExceptionpublic void unset(int fldno)
unset in class ISOComponentfldno - - the field numberpublic void unset(int[] flds)
flds - - array of fields to be unset from this ISOMsgpublic ISOComponent getComposite()
getComposite in class ISOComponent
public void recalcBitMap()
throws ISOException
ISOExceptionpublic java.util.Hashtable getChildren()
getChildren in class ISOComponent
public byte[] pack()
throws ISOException
pack in class ISOComponentISOException
public int unpack(byte[] b)
throws ISOException
unpack in class ISOComponentb - - raw message
ISOException
public void unpack(java.io.InputStream in)
throws java.io.IOException,
ISOException
unpack in class ISOComponentjava.io.IOException
ISOException
public void dump(java.io.PrintStream p,
java.lang.String indent)
dump in interface Loggeabledump in class ISOComponentp - - print streamindent - - optional indent stringpublic ISOComponent getComponent(int fldno)
fldno - the Field Number
public java.lang.Object getValue(int fldno)
throws ISOException
fldno - the Field Number
ISOException
public java.lang.Object getValue(java.lang.String fpath)
throws ISOException
fpath - field path
ISOExceptionpublic java.lang.String getString(int fldno)
fldno - the Field Number
public java.lang.String getString(java.lang.String fpath)
fpath - field path
public byte[] getBytes(int fldno)
fldno - the Field Number
public byte[] getBytes(java.lang.String fpath)
fpath - field path
public boolean hasField(int fldno)
fldno - the Field Number
public boolean hasFields(int[] fields)
fields - an array of fields to check for presence
public void setValue(java.lang.Object obj)
throws ISOException
setValue in class ISOComponentISOExceptionISOField,
ISOExceptionpublic java.lang.Object clone()
clone in class java.lang.Objectpublic java.lang.Object clone(int[] fields)
fields - int array of fields to go
public void merge(ISOMsg m)
m - ISOMsg to mergepublic java.lang.String toString()
toString in class java.lang.Object
public java.lang.Object getKey()
throws ISOException
ISOComponent
getKey in class ISOComponentISOExceptionpublic java.lang.Object getValue()
ISOComponent
getValue in class ISOComponentpublic boolean isInner()
public void setMTI(java.lang.String mti)
throws ISOException
mti - new MTI
ISOException - if message is inner message
public void move(int oldFieldNumber,
int newFieldNumber)
throws ISOException
oldFieldNumber - old field numbernewFieldNumber - new field number
ISOException
public java.lang.String getMTI()
throws ISOException
ISOException - on inner message or MTI not set
public boolean isRequest()
throws ISOException
ISOException - on MTI not set
public boolean isResponse()
throws ISOException
ISOException - on MTI not set
public boolean isRetransmission()
throws ISOException
ISOException - on MTI not set
public void setResponseMTI()
throws ISOException
ISOException - on MTI not set or it is not a request
public void setRetransmissionMTI()
throws ISOException
ISOException - on MTI not set or it is not a request
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundExceptionpublic void setSource(ISOSource source)
source - an ISOSourcepublic ISOSource getSource()
|
jPOS.org | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||