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
Attributes 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, producerTemplate, timerServiceFields inherited from interface org.openremote.model.asset.agent.Protocol
ACTUATOR_TOPIC, ACTUATOR_TOPIC_TARGET_PROTOCOL, DYNAMIC_TIME_PLACEHOLDER_REGEXP, DYNAMIC_VALUE_PLACEHOLDER, DYNAMIC_VALUE_PLACEHOLDER_REGEXP, SENSOR_QUEUE, SENSOR_QUEUE_SOURCE_PROTOCOL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ScreateTcpServer(int port, String bindAddress, U agent) protected voiddoStart(org.openremote.model.Container container) Start this protocol instanceprotected voiddoStop(org.openremote.model.Container container) Stop this protocol instanceprotected voidonServerConnectionStatusChanged(org.openremote.model.asset.agent.ConnectionStatus connectionStatus) protected voidprotected voidMethods inherited from class org.openremote.agent.protocol.AbstractProtocol
doLinkAttribute, doLinkedAttributeWrite, doUnlinkAttribute, getAgent, getLinkedAttributes, linkAttribute, processLinkedAttributeWrite, sendAttributeEvent, sendAttributeEvent, setConnectionStatus, start, stop, toString, unlinkAttribute, updateAgentAttribute, updateLinkedAttribute, updateLinkedAttributeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:AbstractProtocolStart this protocol instance- Specified by:
doStartin 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:AbstractProtocolStop this protocol instance- Specified by:
doStopin 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()
-