Interface Service<C extends Context>


public interface Service<C extends Context>
A service is a protocol that operates on top of the TransportProtocol. There is only one active service at anyone time and the current SSH protocol defines the AuthenticationProtocol and the ConnectionProtocol.
Author:
Lee David Painter
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    How long does the service allow idle for?
    void
    Transport level idle
    void
    Initialize the service.
    boolean
    processMessage(byte[] msg)
    Process a transport message.
    void
    Start the service.
    void
    Stop the service
  • Method Details

    • init

      void init(AbstractServerTransport<C> transport) throws IOException
      Initialize the service.
      Parameters:
      transport -
      Throws:
      IOException
    • processMessage

      boolean processMessage(byte[] msg) throws IOException
      Process a transport message. When a message is received by the TransportProtocol that is not a transport level message the message is passed onto the active service using this method. The service processes the message and returns a value to indicate whether the message was used.
      Parameters:
      msg -
      Returns:
      true if the message was processed, otherwise false
      Throws:
      IOException
    • start

      void start()
      Start the service.
    • stop

      void stop()
      Stop the service
    • getIdleTimeoutSeconds

      int getIdleTimeoutSeconds()
      How long does the service allow idle for?
      Returns:
    • idle

      void idle()
      Transport level idle