equip.net
Class ConnectionSap
java.lang.Object
equip.net.ConnectionSap
- All Implemented Interfaces:
- java.lang.Runnable
- Direct Known Subclasses:
- ConnectionSapJcp, ConnectionSapTcp
- public abstract class ConnectionSap
- extends java.lang.Object
- implements java.lang.Runnable
Abstract base class for a connection service access point (i.e. a
network connection).
A connection sap is specifically connected to another such in another
process.
NB returns without having called start() on keepAliveThread -
must be released to allow it to run).
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
localAddress
protected int localAddress
remoteAddress
protected int remoteAddress
localPort
protected short localPort
remotePort
protected short remotePort
status
protected int status
connectedFlag
protected boolean connectedFlag
sendBufSize
protected int sendBufSize
recvBufSize
protected int recvBufSize
recvTimeoutMs
protected int recvTimeoutMs
keepAliveTimeMs
protected int keepAliveTimeMs
slowResponseTimeMs
protected int slowResponseTimeMs
slowResponseFlag
protected boolean slowResponseFlag
lastNewSendTimeMs
protected int lastNewSendTimeMs
lastResponseTimeMs
protected int lastResponseTimeMs
connectionTimeoutMs
protected int connectionTimeoutMs
connectionTimeoutFlag
protected boolean connectionTimeoutFlag
probingIntervalMs
protected int probingIntervalMs
nextObjectId
protected int nextObjectId
lock
protected java.lang.Object lock
keepAliveThread
protected java.lang.Thread keepAliveThread
keepAliveThreadData
protected ConnectionSap.KeepAliveThreadData keepAliveThreadData
lastSendTimeMs
protected int lastSendTimeMs
DEBUG_TCP
protected boolean DEBUG_TCP
ConnectionSap
protected ConnectionSap()
getLocalPort
public short getLocalPort()
getLocalAddress
public int getLocalAddress()
getRemotePort
public short getRemotePort()
getRemoteAddress
public int getRemoteAddress()
getProtocol
public abstract int getProtocol()
getStatus
public int getStatus()
getConnectedFlag
public boolean getConnectedFlag()
getSlowResponseFlag
public boolean getSlowResponseFlag()
getConnectionTimeoutFlag
public boolean getConnectionTimeoutFlag()
getConnectionStrength
public float getConnectionStrength()
waitUntilConnected
public abstract int waitUntilConnected()
close
public void close()
close
public abstract void close(boolean flushFlag)
writeObject
public int writeObject(ValueBase object)
throws java.io.IOException
- Throws:
java.io.IOException
writeObject
public int writeObject(ValueBase object,
boolean reliableFlag,
int[] object_id,
int priority)
throws java.io.IOException
- Throws:
java.io.IOException
readObject
public abstract ValueBase readObject()
throws java.io.IOException
- Throws:
java.io.IOException
cancelObject
public abstract int cancelObject(int object_id)
setSendBufSize
public void setSendBufSize(int size)
getSendBufSize
public int getSendBufSize()
setRecvBufSize
public void setRecvBufSize(int size)
getRecvBufSize
public int getRecvBufSize()
setRecvTimeout
public void setRecvTimeout(int timeoutMs)
getRecvTimeout
public int getRecvTimeout()
setKeepAliveTime
public void setKeepAliveTime(int timeMs)
getKeepAliveTime
public int getKeepAliveTime()
setSlowResponseTime
public void setSlowResponseTime(int timeMs)
getSlowResponseTime
public int getSlowResponseTime()
setConnectionTimeout
public void setConnectionTimeout(int timeMs)
getConnectionTimeout
public int getConnectionTimeout()
resetConnectionTimeoutFlag
public int resetConnectionTimeoutFlag()
setProbingInterval
public void setProbingInterval(int timeMs)
getProbingInterval
public int getProbingInterval()
writeObjectLocked
protected abstract int writeObjectLocked(ValueBase object,
boolean reliableFlag,
int[] object_id,
int priority)
throws java.io.IOException
- Throws:
java.io.IOException
run
public void run()
- Specified by:
run in interface java.lang.Runnable
keepAliveThreadFn
protected void keepAliveThreadFn(ConnectionSap.KeepAliveThreadData data)
noteReceivedObject
protected void noteReceivedObject(ValueBase object)