Class ChannelPool
java.lang.Object
org.jpos.iso.channel.ChannelPool
- All Implemented Interfaces:
Cloneable, Configurable, ISOChannel, ISOSource, LogSource
-
Field Summary
FieldsFields inherited from interface ISOChannel
CONNECT, RX, SIZEOF_CNT, TX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChannel(String name) voidaddChannel(ISOChannel channel) clone()Expose channel clonning interfacevoidconnect()Connects ISOChannelvoiddisconnects ISOChannelgetName()getRealm()booleanreceive()Receives an ISOMsgvoidReconnect channelvoidremoveChannel(String name) voidremoveChannel(ISOChannel channel) voidsend(byte[] b) sends a byte[] over the TCP/IP sessionvoidsends an ISOMsg over the TCP/IP sessionvoidvoidvoidassociates this ISOChannel with a name on NameRegistrarvoidAssociate a packager with this channelvoidsetUsable(boolean b) intsize()
-
Field Details
-
logger
-
realm
-
-
Constructor Details
-
ChannelPool
public ChannelPool()
-
-
Method Details
-
setPackager
Description copied from interface:ISOChannelAssociate a packager with this channel- Specified by:
setPackagerin interfaceISOChannel- Parameters:
p- an ISOPackager
-
connect
Description copied from interface:ISOChannelConnects ISOChannel- Specified by:
connectin interfaceISOChannel- Throws:
IOException
-
disconnect
Description copied from interface:ISOChanneldisconnects ISOChannel- Specified by:
disconnectin interfaceISOChannel- Throws:
IOException
-
reconnect
Description copied from interface:ISOChannelReconnect channel- Specified by:
reconnectin interfaceISOChannel- Throws:
IOException
-
isConnected
- Specified by:
isConnectedin interfaceISOChannel- Specified by:
isConnectedin interfaceISOSource- Returns:
- true if Channel is connected and usable
-
receive
Description copied from interface:ISOChannelReceives an ISOMsg- Specified by:
receivein interfaceISOChannel- Returns:
- the Message received
- Throws:
IOExceptionISOException
-
send
Description copied from interface:ISOChannelsends an ISOMsg over the TCP/IP session- Specified by:
sendin interfaceISOChannel- Specified by:
sendin interfaceISOSource- Parameters:
m- the Message to be sent- Throws:
IOExceptionISOException
-
send
Description copied from interface:ISOChannelsends a byte[] over the TCP/IP session- Specified by:
sendin interfaceISOChannel- Parameters:
b- the byte array to be sent- Throws:
IOExceptionISOException
-
setUsable
- Specified by:
setUsablein interfaceISOChannel- Parameters:
b- - usable state
-
setName
Description copied from interface:ISOChannelassociates this ISOChannel with a name on NameRegistrar- Specified by:
setNamein interfaceISOChannel- Parameters:
name- name to register- See Also:
-
getName
- Specified by:
getNamein interfaceISOChannel- Returns:
- this ISOChannel's name ("" if no name was set)
-
getPackager
- Specified by:
getPackagerin interfaceISOChannel- Returns:
- current packager
-
setLogger
-
getRealm
-
getLogger
-
setConfiguration
- Specified by:
setConfigurationin interfaceConfigurable- Parameters:
cfg- Configuration object- Throws:
ConfigurationException
-
addChannel
-
addChannel
- Throws:
NameRegistrar.NotFoundException
-
removeChannel
-
removeChannel
- Throws:
NameRegistrar.NotFoundException
-
size
-
getCurrent
- Throws:
IOException
-
clone
Description copied from interface:ISOChannelExpose channel clonning interface- Specified by:
clonein interfaceISOChannel- Overrides:
clonein classObject
-