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 Details

  • Constructor Details

    • AbstractTCPServerProtocol

      public AbstractTCPServerProtocol(U agent)
  • Method Details

    • doStart

      protected void doStart(org.openremote.model.Container container) throws Exception
      Description copied from class: AbstractProtocol
      Start this protocol instance
      Specified by:
      doStart in class AbstractProtocol<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

      protected void doStop(org.openremote.model.Container container) throws Exception
      Description copied from class: AbstractProtocol
      Stop this protocol instance
      Specified by:
      doStop in class AbstractProtocol<U extends AbstractTCPServerAgent<U,T,V>,V extends org.openremote.model.asset.agent.AgentLink<?>>
      Throws:
      Exception
    • createTcpServer

      protected abstract S createTcpServer(int port, String bindAddress, U agent)
    • startTcpServer

      protected void startTcpServer()
    • stopTcpServer

      protected void stopTcpServer()