Package com.sshtools.common.sshd
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 TypeMethodDescriptionintHow long does the service allow idle for?voididle()Transport level idlevoidinit(AbstractServerTransport<C> transport) Initialize the service.booleanprocessMessage(byte[] msg) Process a transport message.voidstart()Start the service.voidstop()Stop the service
-
Method Details
-
init
Initialize the service.- Parameters:
transport-- Throws:
IOException
-
processMessage
Process a transport message. When a message is received by theTransportProtocolthat 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
-