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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetRemoteAddress, getStateprivate 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.LinkgetDataLinkLayer in interface DataLinkLayer.Linkpublic String getProperty(String name)
DataLinkLayer.LinkDataLinkLayer.getProperty(java.lang.String) Methode des Sicherungsprotokolls ein Defaultwert bestimmt.getProperty in interface DataLinkLayer.LinkgetProperty in interface PropertyQueryInterfacename - Name des Verbindungsparameters.DataLinkLayer.Link.setProperties(java.util.Properties),
DataLinkLayer.getProperty(java.lang.String)public void setProperties(Properties properties)
DataLinkLayer.LinksetProperties in interface DataLinkLayer.Linkproperties - Neue Verbindungsparameter.public void connect()
DataLinkLayer.Linkconnect in interface DataLinkLayer.Linkpublic void shutdown()
DataLinkLayer.LinkDataLinkLayer.Link.send(byte[], int) übergeben wurden, auch übertragen werden.shutdown in interface DataLinkLayer.Linkpublic void abort()
DataLinkLayer.LinkDataLinkLayer.Link.send(byte[], int) übergeben wurden und noch nicht übertragen wurden, werden nicht mehr übertragen.abort in interface DataLinkLayer.Linkpublic void reload()
public void send(byte[] bytes,
int priority)
throws InterruptedException
DataLinkLayer.Linksend in interface DataLinkLayer.Linkbytes - Zu übertragende Nutzdatenbytes.priority - Priorität der zu übertragenden DatenInterruptedExceptionpublic 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)