Package org.jpos.iso.channel
Class BASE24TCPChannel
- java.lang.Object
-
- java.util.Observable
-
- org.jpos.iso.BaseChannel
-
- org.jpos.iso.channel.BASE24TCPChannel
-
- All Implemented Interfaces:
java.lang.Cloneable
,Configurable
,ExceptionHandlerAware
,BaseChannelMBean
,ClientChannel
,FactoryChannel
,FilteredChannel
,ISOChannel
,ISOSource
,ServerChannel
,LogSource
public class BASE24TCPChannel extends BaseChannel
Implements an ISOChannel able to exchange messages with ACI's BASE24 over a TCP link, modified from BASE24ISOChannel by Victor A. Salaman ([email protected]) .
An instance of this class exchanges messages by means of an intermediate 'port server' as described in the Overview page.- See Also:
ISOMsg
,ISOException
,ISOChannel
-
-
Field Summary
-
Fields inherited from class org.jpos.iso.BaseChannel
cnt, header, incomingFilters, logger, originalRealm, outgoingFilters, overrideHeader, packager, realm, serverIn, serverInLock, serverOut, serverOutLock, serverSocket, socketFactory, usable
-
Fields inherited from interface org.jpos.iso.ISOChannel
CONNECT, RX, SIZEOF_CNT, TX
-
-
Constructor Summary
Constructors Constructor Description BASE24TCPChannel()
Public constructor (used by Class.forName("...").newInstance())BASE24TCPChannel(java.lang.String host, int port, ISOPackager p)
Construct client ISOChannelBASE24TCPChannel(ISOPackager p)
Construct server ISOChannelBASE24TCPChannel(ISOPackager p, java.net.ServerSocket serverSocket)
constructs a server ISOChannel associated with a Server Socket
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
getMessageLength()
protected void
getMessageTrailler()
protected void
sendMessageLength(int len)
protected void
sendMessageTrailler(ISOMsg m, int len)
-
Methods inherited from class org.jpos.iso.BaseChannel
accept, addFilter, addFilter, addIncomingFilter, addOutgoingFilter, applyIncomingFilters, applyIncomingFilters, applyOutgoingFilters, applyTimeout, clone, closeSocket, connect, connect, createISOMsg, createMsg, disconnect, getBytes, getChannel, getConfiguration, getCounters, getDynamicHeader, getDynamicPackager, getDynamicPackager, getDynamicPackager, getExceptionHandlers, getHeader, getHeaderLength, getHeaderLength, getHeaderLength, getHost, getIncomingFilters, getLogger, getMaxPacketLength, getMessage, getMessageTrailer, getName, getOriginalRealm, getOutgoingFilters, getPackager, getPort, getRealm, getServerSocket, getSocket, getSocketFactory, getSoLingerSeconds, getTimeout, isConnected, isExpectKeepAlive, isOverrideHeader, isRejected, isSoLingerOn, newSocket, newSocket, pack, postConnectHook, readHeader, receive, reconnect, removeFilter, removeFilter, removeIncomingFilter, removeOutgoingFilter, resetCounters, send, send, sendKeepAlive, sendMessage, sendMessageHeader, sendMessageTrailer, sendMessageTrailler, setConfiguration, setHeader, setHeader, setHost, setHost, setIncomingFilters, setLocalAddress, setLogger, setMaxPacketLength, setName, setOutgoingFilters, setOverrideHeader, setPackager, setPort, setServerSocket, setSocketFactory, setSoLinger, setTimeout, setUsable, shouldIgnore, streamReceive, unpack
-
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jpos.core.handlers.exception.ExceptionHandlerAware
addHandler, addHandler, handle, removeHandler, removeHandler, removeHandlers
-
-
-
-
Constructor Detail
-
BASE24TCPChannel
public BASE24TCPChannel()
Public constructor (used by Class.forName("...").newInstance())
-
BASE24TCPChannel
public BASE24TCPChannel(java.lang.String host, int port, ISOPackager p)
Construct client ISOChannel- Parameters:
host
- server TCP Addressport
- server port numberp
- an ISOPackager- See Also:
ISOPackager
-
BASE24TCPChannel
public BASE24TCPChannel(ISOPackager p) throws java.io.IOException
Construct server ISOChannel- Parameters:
p
- an ISOPackager- Throws:
java.io.IOException
- See Also:
ISOPackager
-
BASE24TCPChannel
public BASE24TCPChannel(ISOPackager p, java.net.ServerSocket serverSocket) throws java.io.IOException
constructs a server ISOChannel associated with a Server Socket- Parameters:
p
- an ISOPackagerserverSocket
- where to accept a connection- Throws:
java.io.IOException
- See Also:
ISOPackager
-
-
Method Detail
-
sendMessageTrailler
protected void sendMessageTrailler(ISOMsg m, int len) throws java.io.IOException
- Overrides:
sendMessageTrailler
in classBaseChannel
- Parameters:
m
- the Message to send (in this case it is unused)len
- message len (ignored)- Throws:
java.io.IOException
-
sendMessageLength
protected void sendMessageLength(int len) throws java.io.IOException
- Overrides:
sendMessageLength
in classBaseChannel
- Throws:
java.io.IOException
-
getMessageLength
protected int getMessageLength() throws java.io.IOException, ISOException
- Overrides:
getMessageLength
in classBaseChannel
- Throws:
java.io.IOException
ISOException
-
getMessageTrailler
protected void getMessageTrailler() throws java.io.IOException
- Overrides:
getMessageTrailler
in classBaseChannel
- Throws:
java.io.IOException
-
-