|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpos.iso.channel.ChannelPool
public class ChannelPool
| Field Summary | |
|---|---|
protected Logger |
logger
|
protected String |
realm
|
| Fields inherited from interface org.jpos.iso.ISOChannel |
|---|
CONNECT, RX, SIZEOF_CNT, TX |
| Constructor Summary | |
|---|---|
ChannelPool()
|
|
| Method Summary | |
|---|---|
void |
addChannel(ISOChannel channel)
|
void |
addChannel(String name)
|
Object |
clone()
Expose channel clonning interface |
void |
connect()
Connects ISOChannel |
void |
disconnect()
disconnects ISOChannel |
ISOChannel |
getCurrent()
|
Logger |
getLogger()
|
String |
getName()
|
ISOPackager |
getPackager()
|
String |
getRealm()
|
boolean |
isConnected()
|
ISOMsg |
receive()
Receives an ISOMsg |
void |
reconnect()
Reconnect channel |
void |
removeChannel(ISOChannel channel)
|
void |
removeChannel(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,
String realm)
|
void |
setName(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()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Logger logger
protected String realm
| Constructor Detail |
|---|
public ChannelPool()
| Method Detail |
|---|
public void setPackager(ISOPackager p)
ISOChannel
setPackager in interface ISOChannelp - an ISOPackager
public void connect()
throws IOException
ISOChannel
connect in interface ISOChannelIOException
public void disconnect()
throws IOException
ISOChannel
disconnect in interface ISOChannelIOException
public void reconnect()
throws IOException
ISOChannel
reconnect in interface ISOChannelIOExceptionpublic boolean isConnected()
isConnected in interface ISOChannelisConnected in interface ISOSource
public ISOMsg receive()
throws IOException,
ISOException
ISOChannel
receive in interface ISOChannelIOException
ISOException
public void send(ISOMsg m)
throws IOException,
ISOException
ISOChannel
send in interface ISOChannelsend in interface ISOSourcem - the Message to be sent
IOException
ISOException
public void send(byte[] b)
throws IOException,
ISOException
ISOChannel
send in interface ISOChannelb - the byte array to be sent
IOException
ISOExceptionpublic void setUsable(boolean b)
setUsable in interface ISOChannelb - - usable statepublic void setName(String name)
ISOChannel
setName in interface ISOChannelname - name to registerNameRegistrarpublic String getName()
getName in interface ISOChannelpublic ISOPackager getPackager()
getPackager in interface ISOChannel
public void setLogger(Logger logger,
String realm)
setLogger in interface LogSourcepublic String getRealm()
getRealm in interface LogSourcepublic Logger getLogger()
getLogger in interface LogSource
public void setConfiguration(Configuration cfg)
throws ConfigurationException
setConfiguration in interface Configurablecfg - Configuration object
ConfigurationExceptionpublic void addChannel(ISOChannel channel)
public void addChannel(String name)
throws NameRegistrar.NotFoundException
NameRegistrar.NotFoundExceptionpublic void removeChannel(ISOChannel channel)
public void removeChannel(String name)
throws NameRegistrar.NotFoundException
NameRegistrar.NotFoundExceptionpublic int size()
public ISOChannel getCurrent()
throws IOException
IOExceptionpublic Object clone()
ISOChannel
clone in interface ISOChannelclone in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||