Class AbstractTCPServerProtocol<R,S extends AbstractTCPServer<R>,T extends AbstractTCPServerProtocol<R,S,T,U,V>,U extends AbstractTCPServerAgent<U,T,V>,V extends org.openremote.model.asset.agent.AgentLink<?>>
java.lang.Object
org.openremote.agent.protocol.AbstractProtocol<U,V>
org.openremote.agent.protocol.tcp.AbstractTCPServerProtocol<R,S,T,U,V>
- All Implemented Interfaces:
org.openremote.model.asset.agent.Protocol<U>
public abstract class AbstractTCPServerProtocol<R,S extends AbstractTCPServer<R>,T extends AbstractTCPServerProtocol<R,S,T,U,V>,U extends AbstractTCPServerAgent<U,T,V>,V extends org.openremote.model.asset.agent.AgentLink<?>>
extends AbstractProtocol<U,V>
This is an abstract protocol for creating TCP Server protocols. This allows TCP clients to connect and exchange data.
It is up to the concrete implementations whether or not linked
Attribute
s can be used with this protocol and
to define the semantics of these linked attributes.-
Field Summary
FieldsFields inherited from class org.openremote.agent.protocol.AbstractProtocol
agent, assetService, datapointService, dynamicAttributes, executorService, linkedAttributes, messageBrokerContext, predictedDatapointService, processorLock, producerTemplate, scheduledExecutorService, timerService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract S
createTcpServer
(int port, String bindAddress, U agent) protected void
doStart
(org.openremote.model.Container container) Start this protocol instanceprotected void
doStop
(org.openremote.model.Container container) Stop this protocol instanceprotected void
onServerConnectionStatusChanged
(org.openremote.model.asset.agent.ConnectionStatus connectionStatus) protected void
protected void
Methods inherited from class org.openremote.agent.protocol.AbstractProtocol
doLinkAttribute, doLinkedAttributeWrite, doUnlinkAttribute, getAgent, getLinkedAttributes, linkAttribute, onAgentAttributeChanged, processLinkedAttributeWrite, sendAttributeEvent, sendAttributeEvent, setAssetService, setConnectionStatus, start, stop, toString, unlinkAttribute, updateLinkedAttribute, updateLinkedAttribute
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.openremote.model.asset.agent.Protocol
getProtocolInstanceUri, getProtocolName, prefixLogMessage
-
Field Details
-
tcpServer
-
-
Constructor Details
-
AbstractTCPServerProtocol
-
-
Method Details
-
doStart
Description copied from class:AbstractProtocol
Start this protocol instance- Specified by:
doStart
in classAbstractProtocol<U extends AbstractTCPServerAgent<U,
T, V>, V extends org.openremote.model.asset.agent.AgentLink<?>> - Throws:
Exception
-
onServerConnectionStatusChanged
protected void onServerConnectionStatusChanged(org.openremote.model.asset.agent.ConnectionStatus connectionStatus) -
doStop
Description copied from class:AbstractProtocol
Stop this protocol instance- Specified by:
doStop
in classAbstractProtocol<U extends AbstractTCPServerAgent<U,
T, V>, V extends org.openremote.model.asset.agent.AgentLink<?>> - Throws:
Exception
-
createTcpServer
-
startTcpServer
protected void startTcpServer() -
stopTcpServer
protected void stopTcpServer()
-