|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpos.iso.ISOBasePackager
org.jpos.iso.packager.GenericPackager
public class GenericPackager
GenericPackager uses an XML config file to describe the layout of an ISOMessage
The general format is as follows
<isopackager>
<isofield
id="[field id]"
name="[field name]"
length="[max field length]"
class="[org.jpos.iso.IF_*]"
pad="true|false">
</isofield>
...
</isopackager>
Fields that contain subfields can be handled as follows
<isofieldpackager
id="[field id]"
name="[field name]"
length="[field length]"
class="[org.jpos.iso.IF_*]"
packager="[org.jpos.iso.packager.*]">
<isofield
id="[subfield id]"
name="[subfield name]"
length="[max subfield length]"
class="[org.jpos.iso.IF_*]"
pad="true|false">
</isofield>
...
</isofieldpackager>
The optional attributes maxValidField, bitmapField and emitBitmap
are allowed on the isopackager node.
ISOPackager,
ISOBasePackager| Nested Class Summary | |
|---|---|
class |
GenericPackager.GenericContentHandler
|
class |
GenericPackager.GenericEntityResolver
|
| Field Summary |
|---|
| Fields inherited from class org.jpos.iso.ISOBasePackager |
|---|
fld, headerLength, logger, realm |
| Constructor Summary | |
|---|---|
GenericPackager()
|
|
GenericPackager(InputStream input)
Create a GenericPackager with the field descriptions from an XML InputStream |
|
GenericPackager(String filename)
Create a GenericPackager with the field descriptions from an XML File |
|
| Method Summary | |
|---|---|
protected boolean |
emitBitMap()
|
protected ISOFieldPackager |
getBitMapfieldPackager()
|
String |
getDescription()
|
protected int |
getFirstField()
usually 2 for normal fields, 1 for bitmap-less or ANSI X9.2 |
protected int |
getMaxValidField()
|
void |
readFile(InputStream input)
Parse the field descriptions from an XML InputStream. |
void |
readFile(String filename)
Parse the field descriptions from an XML file. |
void |
setConfiguration(Configuration cfg)
Packager Configuration. |
void |
setLogger(Logger logger,
String realm)
|
| Methods inherited from class org.jpos.iso.ISOBasePackager |
|---|
createISOMsg, getFieldDescription, getFieldPackager, getHeaderLength, getLogger, getRealm, pack, setFieldPackager, setFieldPackager, setHeaderLength, unpack, unpack |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GenericPackager()
throws ISOException
ISOException
public GenericPackager(String filename)
throws ISOException
filename - The XML field description file
ISOException
public GenericPackager(InputStream input)
throws ISOException
input - The XML field description InputStream
ISOException| Method Detail |
|---|
public void setConfiguration(Configuration cfg)
throws ConfigurationException
setConfiguration in interface Configurablecfg - Configuration
ConfigurationExceptionprotected int getMaxValidField()
getMaxValidField in class ISOBasePackagerprotected boolean emitBitMap()
emitBitMap in class ISOBasePackagerprotected ISOFieldPackager getBitMapfieldPackager()
getBitMapfieldPackager in class ISOBasePackager
public void readFile(String filename)
throws ISOException
Uses the sax parser specified by the system property 'sax.parser' The default parser is org.apache.crimson.parser.XMLReaderImpl
filename - The XML field description file
ISOException
public void readFile(InputStream input)
throws ISOException
Uses the sax parser specified by the system property 'sax.parser' The default parser is org.apache.crimson.parser.XMLReaderImpl
input - The XML field description InputStream
ISOException
public void setLogger(Logger logger,
String realm)
setLogger in interface LogSourcesetLogger in class ISOBasePackagerpublic String getDescription()
getDescription in interface ISOPackagergetDescription in class ISOBasePackagerprotected int getFirstField()
ISOBasePackager
getFirstField in class ISOBasePackager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||