public class X25Channel extends BaseChannel
ISOMsg
,
ISOException
,
ISOChannel
Modifier and Type | Field and Description |
---|---|
protected byte[] |
header |
cnt, incomingFilters, logger, originalRealm, outgoingFilters, overrideHeader, packager, realm, serverIn, serverInLock, serverOut, serverOutLock, serverSocket, socketFactory, usable
CONNECT, RX, SIZEOF_CNT, TX
Constructor and Description |
---|
X25Channel()
No-args constructor
|
X25Channel(ISOPackager p)
Construct server ISOChannel
|
X25Channel(ISOPackager p,
java.net.ServerSocket serverSocket)
constructs a server ISOChannel associated with a Server Socket
|
X25Channel(java.lang.String host,
int port,
ISOPackager p)
Constructs client ISOChannel
|
Modifier and Type | Method and Description |
---|---|
protected void |
connect(java.net.Socket socket)
setup I/O Streams from socket
|
void |
disconnect()
disconnects the TCP/IP session.
|
byte[] |
getHeader() |
protected int |
getHeaderLength() |
protected void |
sendMessageHeader(ISOMsg m,
int len) |
void |
setHeader(byte[] header) |
void |
setHeader(java.lang.String header) |
protected byte[] |
streamReceive() |
accept, addFilter, addFilter, addIncomingFilter, addOutgoingFilter, applyIncomingFilters, applyIncomingFilters, applyOutgoingFilters, applyTimeout, clone, closeSocket, connect, createISOMsg, createMsg, getBytes, getChannel, getConfiguration, getCounters, getDynamicHeader, getDynamicPackager, getDynamicPackager, getDynamicPackager, getExceptionHandlers, getHeaderLength, getHeaderLength, getHost, getIncomingFilters, getLogger, getMaxPacketLength, getMessage, getMessageLength, getMessageTrailer, getMessageTrailler, 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, sendMessageLength, sendMessageTrailer, sendMessageTrailler, sendMessageTrailler, setConfiguration, setHost, setHost, setIncomingFilters, setLocalAddress, setLogger, setMaxPacketLength, setName, setOutgoingFilters, setOverrideHeader, setPackager, setPort, setServerSocket, setSocketFactory, setSoLinger, setTimeout, setUsable, shouldIgnore, unpack
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addHandler, addHandler, handle, removeHandler, removeHandler, removeHandlers
public X25Channel()
public X25Channel(java.lang.String host, int port, ISOPackager p)
host
- server TCP Addressport
- server port numberp
- an ISOPackagerISOPackager
public X25Channel(ISOPackager p) throws java.io.IOException
p
- an ISOPackagerjava.io.IOException
ISOPackager
public X25Channel(ISOPackager p, java.net.ServerSocket serverSocket) throws java.io.IOException
p
- an ISOPackagerserverSocket
- where to accept a connectionjava.io.IOException
ISOPackager
protected byte[] streamReceive() throws java.io.IOException
streamReceive
in class BaseChannel
java.io.IOException
protected void connect(java.net.Socket socket) throws java.io.IOException
BaseChannel
connect
in class BaseChannel
socket
- a Socket (client or server)java.io.IOException
- on errorpublic void disconnect() throws java.io.IOException
BaseChannel
disconnect
in interface BaseChannelMBean
disconnect
in interface ISOChannel
disconnect
in class BaseChannel
java.io.IOException
protected int getHeaderLength()
getHeaderLength
in class BaseChannel
public void setHeader(byte[] header)
setHeader
in class BaseChannel
public void setHeader(java.lang.String header)
setHeader
in class BaseChannel
header
- Hex representation of headerpublic byte[] getHeader()
getHeader
in class BaseChannel
protected void sendMessageHeader(ISOMsg m, int len) throws java.io.IOException
sendMessageHeader
in class BaseChannel
java.io.IOException