Package org.apache.sshd.common.global
Class AbstractOpenSshHostKeysHandler
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.common.session.helpers.AbstractConnectionServiceRequestHandler
-
- org.apache.sshd.common.global.AbstractOpenSshHostKeysHandler
-
- All Implemented Interfaces:
RequestHandler<ConnectionService>
,ConnectionServiceRequestHandler
- Direct Known Subclasses:
OpenSshHostKeysHandler
,OpenSshHostKeysHandler
public abstract class AbstractOpenSshHostKeysHandler extends AbstractConnectionServiceRequestHandler
- Author:
- Apache MINA SSHD Project
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.sshd.common.channel.RequestHandler
RequestHandler.Result
-
-
Field Summary
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Fields inherited from interface org.apache.sshd.common.session.ConnectionServiceRequestHandler
SVC2HNDLR
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractOpenSshHostKeysHandler(String request)
protected
AbstractOpenSshHostKeysHandler(String request, BufferPublicKeyParser<? extends PublicKey> parser)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description BufferPublicKeyParser<? extends PublicKey>
getPublicKeysParser()
String
getRequestName()
protected abstract RequestHandler.Result
handleHostKeys(Session session, Collection<? extends PublicKey> keys, boolean wantReply, Buffer buffer)
RequestHandler.Result
process(ConnectionService connectionService, String request, boolean wantReply, Buffer buffer)
Process an SSH request.String
toString()
-
-
-
Constructor Detail
-
AbstractOpenSshHostKeysHandler
protected AbstractOpenSshHostKeysHandler(String request)
-
AbstractOpenSshHostKeysHandler
protected AbstractOpenSshHostKeysHandler(String request, BufferPublicKeyParser<? extends PublicKey> parser)
-
-
Method Detail
-
getRequestName
public final String getRequestName()
-
getPublicKeysParser
public BufferPublicKeyParser<? extends PublicKey> getPublicKeysParser()
-
process
public RequestHandler.Result process(ConnectionService connectionService, String request, boolean wantReply, Buffer buffer) throws Exception
Description copied from interface:RequestHandler
Process an SSH request. If an exception is thrown, the ConnectionService will send a failure message if needed and the request will be considered handled.- Specified by:
process
in interfaceConnectionServiceRequestHandler
- Specified by:
process
in interfaceRequestHandler<ConnectionService>
- Overrides:
process
in classAbstractConnectionServiceRequestHandler
- Parameters:
connectionService
- The input parameterrequest
- The request stringwantReply
- Whether a reply is requestedbuffer
- TheBuffer
with request specific data- Returns:
- The
RequestHandler.Result
- Throws:
Exception
- If failed to handle the request - Note: in order to signal an unsupported request theRequestHandler.Result.Unsupported
value should be returned
-
handleHostKeys
protected abstract RequestHandler.Result handleHostKeys(Session session, Collection<? extends PublicKey> keys, boolean wantReply, Buffer buffer) throws Exception
- Throws:
Exception
-
-