|
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.ISOMUX
public class ISOMUX
Should run in it's own thread. Starts another Receiver thread
ISORequest,
ISOChannel,
ISOException,
ISORequestListener| Field Summary | |
|---|---|
static int |
CONNECT
|
static int |
RX
|
static int |
RX_EXPIRED
|
static int |
RX_FORWARDED
|
static int |
RX_PENDING
|
static int |
RX_UNKNOWN
|
static int |
SIZEOF_CNT
|
static int |
TX
|
static int |
TX_EXPIRED
|
static int |
TX_PENDING
|
| Constructor Summary | |
|---|---|
ISOMUX(ISOChannel c)
|
|
ISOMUX(ISOChannel c,
Logger logger,
java.lang.String realm)
|
|
| Method Summary | |
|---|---|
void |
dump(java.io.PrintStream p,
java.lang.String indent)
|
boolean |
getConnect()
|
int |
getConnectionCount()
|
int[] |
getCounters()
get the counters in order to pretty print them or for stats purposes |
int |
getExpiredCount()
|
int |
getForwardedCount()
|
ISOChannel |
getISOChannel()
|
Logger |
getLogger()
|
static ISOMUX |
getMUX(java.lang.String name)
|
java.lang.String |
getName()
|
java.lang.String |
getRealm()
|
int |
getReceiveCount()
|
int |
getReceiveExpiredCount()
|
int |
getReceivePendingCount()
|
int |
getTransmitCount()
|
int |
getTransmitPendingCount()
|
int |
getUnknownCount()
|
boolean |
isConnected()
|
boolean |
isTerminating()
|
void |
queue(ISORequest r)
queue an ISORequest |
void |
removeISORequestListener()
remove possible ISORequestListener |
ISOMsg |
request(ISOMsg m,
long timeout)
|
void |
request(ISOMsg m,
long timeout,
ISOResponseListener r,
java.lang.Object handBack)
|
void |
resetCounters()
|
void |
run()
|
void |
send(ISOMsg m)
send a message over channel, usually a response from an ISORequestListener |
void |
setConfiguration(Configuration cfg)
|
void |
setConnect(boolean connect)
ISOMUXs usually calls connect() on the underlying ISOChannel You can prevent this behaveour by passing a false value. |
void |
setISORequestListener(ISORequestListener rl)
set an ISORequestListener for unmatched messages |
void |
setLogger(Logger logger,
java.lang.String realm)
|
void |
setName(java.lang.String name)
associates this ISOMUX with a name using NameRegistrar |
void |
setTraceNumberField(int traceNumberField)
allow changes to default value 11 (used in ANSI X9.2 messages) |
void |
showCounters(java.io.PrintStream p)
show Counters |
void |
terminate()
terminate MUX (soft terminate, wait forever if necessary) |
void |
terminate(int wait)
terminate MUX |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CONNECT
public static final int TX
public static final int RX
public static final int TX_EXPIRED
public static final int RX_EXPIRED
public static final int TX_PENDING
public static final int RX_PENDING
public static final int RX_UNKNOWN
public static final int RX_FORWARDED
public static final int SIZEOF_CNT
| Constructor Detail |
|---|
public ISOMUX(ISOChannel c)
c - a connected or unconnected ISOChannel
public ISOMUX(ISOChannel c,
Logger logger,
java.lang.String realm)
c - a connected or unconnected ISOChannellogger - a loggerrealm - logger's realm| Method Detail |
|---|
public void setConfiguration(Configuration cfg)
setConfiguration in interface Configurablecfg - Configuration objectpublic void setTraceNumberField(int traceNumberField)
traceNumberField - new traceNumberFieldpublic ISOChannel getISOChannel()
public void setISORequestListener(ISORequestListener rl)
rl - a request listener objectISORequestListenerpublic void removeISORequestListener()
ISORequestListenerpublic void showCounters(java.io.PrintStream p)
p - - where to printpublic int[] getCounters()
public void resetCounters()
resetCounters in interface ISOMUXMBeanpublic int getConnectionCount()
getConnectionCount in interface ISOMUXMBeanpublic int getTransmitCount()
getTransmitCount in interface ISOMUXMBeanpublic int getExpiredCount()
getExpiredCount in interface ISOMUXMBeanpublic int getTransmitPendingCount()
getTransmitPendingCount in interface ISOMUXMBeanpublic int getReceiveCount()
getReceiveCount in interface ISOMUXMBeanpublic int getReceiveExpiredCount()
getReceiveExpiredCount in interface ISOMUXMBeanpublic int getReceivePendingCount()
getReceivePendingCount in interface ISOMUXMBeanpublic int getUnknownCount()
getUnknownCount in interface ISOMUXMBeanpublic int getForwardedCount()
getForwardedCount in interface ISOMUXMBeanpublic void run()
run in interface java.lang.Runnablepublic void queue(ISORequest r)
public void send(ISOMsg m)
send in interface ISOSourcem - the Message to be sentpublic void terminate(int wait)
wait - Time to wait before forcing shutdownpublic void terminate()
public boolean isConnected()
isConnected in interface ISOMUXMBeanisConnected in interface ISOSourceisConnected in interface MUX
public void setLogger(Logger logger,
java.lang.String realm)
setLogger in interface LogSourcepublic java.lang.String getRealm()
getRealm in interface LogSourcepublic Logger getLogger()
getLogger in interface LogSourcepublic boolean isTerminating()
public void setName(java.lang.String name)
name - name to registerNameRegistrar
public static ISOMUX getMUX(java.lang.String name)
throws NameRegistrar.NotFoundException
NameRegistrar.NotFoundException;
NameRegistrar.NotFoundExceptionNameRegistrarpublic java.lang.String getName()
public void setConnect(boolean connect)
setConnect in interface ISOMUXMBeanconnect - false to prevent connection (default true)public boolean getConnect()
getConnect in interface ISOMUXMBean
public void dump(java.io.PrintStream p,
java.lang.String indent)
dump in interface Loggeable
public ISOMsg request(ISOMsg m,
long timeout)
throws ISOException
request in interface MUXm - message to sendtimeout - time to wait for a message
ISOException
public void request(ISOMsg m,
long timeout,
ISOResponseListener r,
java.lang.Object handBack)
throws ISOException
request in interface MUXISOException
|
jPOS.org | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||