Interface IConnection

All Known Implementing Classes:
NettyConnectionAdpater, NettyHttpConnection, NettyTcpConnection

public interface IConnection
The Interface IConnection abstracts any connection to a responder.
Author:
JTraber
  • Method Details

    • getContext

      ConnectionContext getContext()
      Gets the context.
      Returns:
      the context
    • setContext

      void setContext(ConnectionContext connectionContext)
      Sets the context.
      Parameters:
      connectionContext - the new context
    • setHost

      void setHost(String host)
      Sets the host.
      Parameters:
      host - the host
    • getHost

      String getHost()
      Gets the host.
      Returns:
      the host
    • setPort

      void setPort(int port)
      Sets the port.
      Parameters:
      port - the port
    • getPort

      int getPort()
      Gets the port.
      Returns:
      the port
    • connect

      void connect() throws Exception
      Connect.
      Throws:
      Exception - the exception
    • send

      void send(SCMPMessage scmp, ISCMPMessageCallback callback) throws Exception
      Send and receive asynchronous operation.
      Parameters:
      scmp - the scmp
      callback - the callback
      Throws:
      Exception - the exception
    • disconnect

      void disconnect() throws Exception
      Disconnect.
      Throws:
      Exception - the exception
    • destroy

      void destroy()
      Destroys connection.
    • isConnected

      boolean isConnected()
      Checks if is connected.
      Returns:
      true, if is connected
    • setIdleTimeoutSeconds

      void setIdleTimeoutSeconds(int idleTimeoutSeconds)
      Sets the idle timeout.
      Parameters:
      idleTimeoutSeconds - the new idle timeout
    • incrementNrOfIdles

      void incrementNrOfIdles()
      Increment nr of idles.
    • resetNrOfIdles

      void resetNrOfIdles()
      Reset nr of idles.
    • getNrOfIdlesInSequence

      int getNrOfIdlesInSequence()
      Gets the nr of idles in sequence.
      Returns:
      the nr of idles in sequence
    • setQuietDisconnect

      void setQuietDisconnect() throws Exception
      Sets the quiet disconnect. Disconnect is not logged or does not reply any answer to higher layer.
      Throws:
      Exception - the exception