private class Client.Link extends AbstractDataLinkLayer.Link implements DataLinkLayer.Link, PropertyQueryInterface
Modifier and Type | Field and Description |
---|---|
private int |
_keepAliveReceiveTimeoutCount |
private long |
_lastKeepAliveReceive |
(package private) byte[] |
_packetOnTheAir |
private Properties |
_properties |
private PropertyConsultant |
_propertyConsultant |
private ByteBuffer |
_readBuffer |
private ByteBuffer |
_sendBuffer |
private PriorityChannel |
_sendChannel |
private boolean |
_sendKeepAlive |
private SocketChannel |
_socketChannel |
private boolean |
_tcpConnectedWaitingForFirstReceive |
private Timer |
_timer |
private int |
_wanComConnectRetryDelay |
private byte[] |
_wanComIp8 |
private int |
_wanComKeepAliveTimeoutCount |
private int |
_wanComKeepAliveTimeSeconds |
private int |
_wanComKeepAliveType |
private int |
_wanComTlsType
WanCom-Typ für versendete TLS-Telegramme
|
private int |
_wanComTlsTypeReceive
WanCom-Typ für empfangene TLS-Telegramme, -1 bedeutet, dass beliebige Typen akzeptiert werden
|
private int |
_wanComVersion |
private boolean |
_wanComWaitForInitialReceive |
_linkLock, _linkPropertyLock, _linkState, _remoteAddress
Modifier | Constructor and Description |
---|---|
private |
Client.Link(int remoteAddress) |
Modifier and Type | Method and Description |
---|---|
void |
abort()
Abbruch der Kommunikation auf dieser logischen Verbindung.
|
private void |
closeChannel() |
private void |
closeChannel(int reconnectDelay) |
void |
connect()
Aktiviert die Kommunikation auf dieser logischen Verbindung.
|
private void |
connectSocketChannel(Selector selector) |
DataLinkLayer |
getDataLinkLayer()
Bestimmt das Kommunikationsprotokoll zu dem diese Verbindung gehört.
|
String |
getProperty(String name)
Bestimmt den Wert eines bestimmten Verbindungsparameters.
|
void |
handleAction(Client.ActionType action,
Selector selector) |
private void |
handleAsyncSend(Selector selector) |
void |
handleSelection(SelectionKey selectionKey,
Selector selector) |
private void |
notifyWorker(Client.ActionType action) |
void |
reload() |
private void |
scheduleActionTimer(Client.ActionType actionType,
int delaySeconds) |
void |
send(byte[] bytes,
int priority)
Übernimmt die übergebenen Nutzdaten in den Sendepuffer.
|
void |
setProperties(Properties properties)
Setzt einen neuen verbindungsspezifischen Satz von Verbindungsparametern.
|
void |
shutdown()
Beendet die Kommunikation auf dieser logischen Verbindung.
|
getRemoteAddress, getState, notifyEvent, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getRemoteAddress, getState
private final PriorityChannel _sendChannel
private SocketChannel _socketChannel
private Properties _properties
private final PropertyConsultant _propertyConsultant
private int _wanComVersion
private int _wanComKeepAliveTimeSeconds
private int _wanComKeepAliveTimeoutCount
private int _wanComConnectRetryDelay
private final Timer _timer
private final ByteBuffer _readBuffer
private final ByteBuffer _sendBuffer
private int _wanComKeepAliveType
private int _wanComTlsType
private int _wanComTlsTypeReceive
private long _lastKeepAliveReceive
private int _keepAliveReceiveTimeoutCount
private boolean _sendKeepAlive
private byte[] _wanComIp8
byte[] _packetOnTheAir
private boolean _wanComWaitForInitialReceive
private boolean _tcpConnectedWaitingForFirstReceive
private void notifyWorker(Client.ActionType action)
public DataLinkLayer getDataLinkLayer()
DataLinkLayer.Link
getDataLinkLayer
in interface DataLinkLayer.Link
public String getProperty(String name)
DataLinkLayer.Link
DataLinkLayer.getProperty(java.lang.String)
Methode des Sicherungsprotokolls ein Defaultwert bestimmt.getProperty
in interface DataLinkLayer.Link
getProperty
in interface PropertyQueryInterface
name
- Name des Verbindungsparameters.DataLinkLayer.Link.setProperties(java.util.Properties)
,
DataLinkLayer.getProperty(java.lang.String)
public void setProperties(Properties properties)
DataLinkLayer.Link
setProperties
in interface DataLinkLayer.Link
properties
- Neue Verbindungsparameter.public void connect()
DataLinkLayer.Link
connect
in interface DataLinkLayer.Link
public void shutdown()
DataLinkLayer.Link
DataLinkLayer.Link.send(byte[], int)
übergeben wurden, auch übertragen werden.shutdown
in interface DataLinkLayer.Link
public void abort()
DataLinkLayer.Link
DataLinkLayer.Link.send(byte[], int)
übergeben wurden und noch nicht übertragen wurden, werden nicht mehr übertragen.abort
in interface DataLinkLayer.Link
public void reload()
public void send(byte[] bytes, int priority) throws InterruptedException
DataLinkLayer.Link
send
in interface DataLinkLayer.Link
bytes
- Zu übertragende Nutzdatenbytes.priority
- Priorität der zu übertragenden DatenInterruptedException
public void handleAction(Client.ActionType action, Selector selector)
private void handleAsyncSend(Selector selector)
private void closeChannel()
private void closeChannel(int reconnectDelay)
public void handleSelection(SelectionKey selectionKey, Selector selector)
private void connectSocketChannel(Selector selector)
private void scheduleActionTimer(Client.ActionType actionType, int delaySeconds)