Class AbstractService

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.slf4j.Logger log
      Logger
      protected java.lang.String name
      Assigned name of this service
      protected Transport trans
      Transport layer
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()  
      void handle​(Message msg, SSHPacket buf)
      Delegate handling of some SSH packet to this object.
      void notifyError​(SSHException error)
      Notifies this object of an error.
      void notifyUnimplemented​(long seqNum)
      Notifies this service that a SSH_MSG_UNIMPLEMENTED was received for packet with given sequence number.
      void request()
      Request and install this service with the associated transport.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • log

        protected final org.slf4j.Logger log
        Logger
      • name

        protected final java.lang.String name
        Assigned name of this service
      • trans

        protected final Transport trans
        Transport layer
    • Constructor Detail

      • AbstractService

        public AbstractService​(java.lang.String name,
                               Transport trans)
    • Method Detail

      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface Service
        Returns:
        the assigned name for this SSH service.
      • notifyUnimplemented

        public void notifyUnimplemented​(long seqNum)
                                 throws SSHException
        Description copied from interface: Service
        Notifies this service that a SSH_MSG_UNIMPLEMENTED was received for packet with given sequence number. Meant to be invoked as a callback by the transport layer.
        Specified by:
        notifyUnimplemented in interface Service
        Parameters:
        seqNum - sequence number of the packet which the server claims is unimplemented
        Throws:
        SSHException - if the packet is unexpected and may represent a disruption
      • request

        public void request()
                     throws TransportException
        Description copied from interface: Service
        Request and install this service with the associated transport. Implementations should aim to make this method idempotent by first checking the Transport.getService() currently active service}.
        Specified by:
        request in interface Service
        Throws:
        TransportException - if there is an error sending the service request