org.jpos.iso.packager
Class VISA1Packager

java.lang.Object
  extended by org.jpos.util.SimpleLogSource
      extended by org.jpos.iso.packager.VISA1Packager
All Implemented Interfaces:
ISOPackager, VISA1ResponseFilter, LogSource

public class VISA1Packager
extends SimpleLogSource
implements ISOPackager, VISA1ResponseFilter

Version:
$Id$
Author:
apr@cs.com.uy
See Also:
ISOPackager, ISOBasePackager, ISOComponent

Field Summary
static byte[] FS
           
 
Fields inherited from class org.jpos.util.SimpleLogSource
logger, realm
 
Constructor Summary
VISA1Packager(int[] sequence, int respField, String badResultCode, String okPattern)
           
 
Method Summary
 ISOMsg createISOMsg()
           
 String getDescription()
           
 String getFieldDescription(ISOComponent m, int fldNumber)
           
 String guessAutNumber(String s)
           
protected  int handleSpecialField35(ISOMsg m, List l)
           
 byte[] pack(ISOComponent c)
           
 void setVISA1ResponseFilter(VISA1ResponseFilter filter)
           
 int unpack(ISOComponent m, byte[] b)
           
 void unpack(ISOComponent m, InputStream in)
           
 
Methods inherited from class org.jpos.util.SimpleLogSource
error, error, getLogger, getRealm, info, info, setLogger, setRealm, warning, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jpos.util.LogSource
getLogger, getRealm, setLogger
 

Field Detail

FS

public static final byte[] FS
Constructor Detail

VISA1Packager

public VISA1Packager(int[] sequence,
                     int respField,
                     String badResultCode,
                     String okPattern)
Parameters:
sequence - array of fields that go to VISA1 request
respField - where to put response
badResultCode - (i.e. "05")
okPattern - (i.e. "AUT. ")
Method Detail

setVISA1ResponseFilter

public void setVISA1ResponseFilter(VISA1ResponseFilter filter)

handleSpecialField35

protected int handleSpecialField35(ISOMsg m,
                                   List l)
                            throws ISOException
Throws:
ISOException

pack

public byte[] pack(ISOComponent c)
            throws ISOException
Specified by:
pack in interface ISOPackager
Parameters:
c - the Component to pack
Returns:
Message image
Throws:
ISOException - on error

guessAutNumber

public String guessAutNumber(String s)
Specified by:
guessAutNumber in interface VISA1ResponseFilter
Returns:
authorization number or null

unpack

public int unpack(ISOComponent m,
                  byte[] b)
           throws ISOException
Specified by:
unpack in interface ISOPackager
Parameters:
m - the Container of this message
b - ISO message image
Returns:
consumed bytes
Throws:
ISOException - on error

unpack

public void unpack(ISOComponent m,
                   InputStream in)
            throws ISOException
Specified by:
unpack in interface ISOPackager
Throws:
ISOException

getFieldDescription

public String getFieldDescription(ISOComponent m,
                                  int fldNumber)
Specified by:
getFieldDescription in interface ISOPackager
Parameters:
m - the Container (i.e. an ISOMsg)
fldNumber - the Field Number
Returns:
Field Description

getDescription

public String getDescription()
Specified by:
getDescription in interface ISOPackager
Returns:
Packager's Description

createISOMsg

public ISOMsg createISOMsg()
Specified by:
createISOMsg in interface ISOPackager
Returns:
an ISOMsg


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