public class ChannelPool extends java.lang.Object implements ISOChannel, LogSource, Configurable, java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
protected Logger |
logger |
protected java.lang.String |
realm |
CONNECT, RX, SIZEOF_CNT, TX| Constructor and Description |
|---|
ChannelPool() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChannel(ISOChannel channel) |
void |
addChannel(java.lang.String name) |
java.lang.Object |
clone()
Expose channel clonning interface
|
void |
connect()
Connects ISOChannel
|
void |
disconnect()
disconnects ISOChannel
|
ISOChannel |
getCurrent() |
Logger |
getLogger() |
java.lang.String |
getName() |
ISOPackager |
getPackager() |
java.lang.String |
getRealm() |
boolean |
isConnected() |
ISOMsg |
receive()
Receives an ISOMsg
|
void |
reconnect()
Reconnect channel
|
void |
removeChannel(ISOChannel channel) |
void |
removeChannel(java.lang.String name) |
void |
send(byte[] b)
sends a byte[] over the TCP/IP session
|
void |
send(ISOMsg m)
sends an ISOMsg over the TCP/IP session
|
void |
setConfiguration(Configuration cfg) |
void |
setLogger(Logger logger,
java.lang.String realm) |
void |
setName(java.lang.String name)
associates this ISOChannel with a name on NameRegistrar
|
void |
setPackager(ISOPackager p)
Associate a packager with this channel
|
void |
setUsable(boolean b) |
int |
size() |
protected Logger logger
protected java.lang.String realm
public void setPackager(ISOPackager p)
ISOChannelsetPackager in interface ISOChannelp - an ISOPackagerpublic void connect()
throws java.io.IOException
ISOChannelconnect in interface ISOChanneljava.io.IOExceptionpublic void disconnect()
throws java.io.IOException
ISOChanneldisconnect in interface ISOChanneljava.io.IOExceptionpublic void reconnect()
throws java.io.IOException
ISOChannelreconnect in interface ISOChanneljava.io.IOExceptionpublic boolean isConnected()
isConnected in interface ISOChannelisConnected in interface ISOSourcepublic ISOMsg receive() throws java.io.IOException, ISOException
ISOChannelreceive in interface ISOChanneljava.io.IOExceptionISOExceptionpublic void send(ISOMsg m) throws java.io.IOException, ISOException
ISOChannelsend in interface ISOChannelsend in interface ISOSourcem - the Message to be sentjava.io.IOExceptionISOExceptionpublic void send(byte[] b)
throws java.io.IOException,
ISOException
ISOChannelsend in interface ISOChannelb - the byte array to be sentjava.io.IOExceptionISOExceptionpublic void setUsable(boolean b)
setUsable in interface ISOChannelb - - usable statepublic void setName(java.lang.String name)
ISOChannelsetName in interface ISOChannelname - name to registerNameRegistrarpublic java.lang.String getName()
getName in interface ISOChannelpublic ISOPackager getPackager()
getPackager in interface ISOChannelpublic void setLogger(Logger logger, java.lang.String realm)
public void setConfiguration(Configuration cfg) throws ConfigurationException
setConfiguration in interface Configurablecfg - Configuration objectConfigurationExceptionpublic void addChannel(ISOChannel channel)
public void addChannel(java.lang.String name)
throws NameRegistrar.NotFoundException
NameRegistrar.NotFoundExceptionpublic void removeChannel(ISOChannel channel)
public void removeChannel(java.lang.String name)
throws NameRegistrar.NotFoundException
NameRegistrar.NotFoundExceptionpublic int size()
public ISOChannel getCurrent() throws java.io.IOException
java.io.IOExceptionpublic java.lang.Object clone()
ISOChannelclone in interface ISOChannelclone in class java.lang.Object