public class ASCIIChannel extends BaseChannel
ISOMsg
,
ISOException
,
ISOChannel
Modifier and Type | Field and Description |
---|---|
protected int |
lengthDigits
Number of digits for the message length header
|
cnt, header, incomingFilters, logger, originalRealm, outgoingFilters, overrideHeader, packager, realm, serverIn, serverInLock, serverOut, serverOutLock, serverSocket, socketFactory, usable
CONNECT, RX, SIZEOF_CNT, TX
Constructor and Description |
---|
ASCIIChannel()
Public constructor (used by Class.forName("...").newInstance())
|
ASCIIChannel(ISOPackager p)
Construct server ISOChannel
|
ASCIIChannel(ISOPackager p,
java.net.ServerSocket serverSocket)
constructs a server ISOChannel associated with a Server Socket
|
ASCIIChannel(java.lang.String host,
int port,
ISOPackager p)
Construct client ISOChannel
|
Modifier and Type | Method and Description |
---|---|
int |
getLengthDigits() |
protected int |
getMessageLength() |
protected void |
sendMessageLength(int len) |
void |
setConfiguration(Configuration cfg)
Calls super.setConfiguration() and then reads the 'length-digits' property,
defaulting to 4
|
void |
setLengthDigits(int len) |
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, 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, sendMessageHeader, sendMessageTrailer, sendMessageTrailler, sendMessageTrailler, setHeader, setHeader, setHost, setHost, setIncomingFilters, setLocalAddress, setLogger, setMaxPacketLength, setName, setOutgoingFilters, setOverrideHeader, setPackager, setPort, setServerSocket, setSocketFactory, setSoLinger, setTimeout, setUsable, shouldIgnore, streamReceive, 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 ASCIIChannel()
public ASCIIChannel(java.lang.String host, int port, ISOPackager p)
host
- server TCP Addressport
- server port numberp
- an ISOPackagerISOPackager
public ASCIIChannel(ISOPackager p) throws java.io.IOException
p
- an ISOPackagerjava.io.IOException
ISOPackager
public ASCIIChannel(ISOPackager p, java.net.ServerSocket serverSocket) throws java.io.IOException
p
- an ISOPackagerserverSocket
- where to accept a connectionjava.io.IOException
ISOPackager
public void setLengthDigits(int len)
public int getLengthDigits()
protected void sendMessageLength(int len) throws java.io.IOException
sendMessageLength
in class BaseChannel
len
- the packed Message lenjava.io.IOException
protected int getMessageLength() throws java.io.IOException, ISOException
getMessageLength
in class BaseChannel
IOException,
- ISOExceptionjava.io.IOException
ISOException
public void setConfiguration(Configuration cfg) throws ConfigurationException
setConfiguration
in interface Configurable
setConfiguration
in class BaseChannel
cfg
- ConfigurationConfigurationException