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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.sshd.common.channel.RequestHandler
RequestHandler.Result -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate final BufferPublicKeyParser<? extends PublicKey> private final StringFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
logFields inherited from interface org.apache.sshd.common.session.ConnectionServiceRequestHandler
SVC2HNDLR -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractOpenSshHostKeysHandler(String request) protectedAbstractOpenSshHostKeysHandler(String request, BufferPublicKeyParser<? extends PublicKey> parser) -
Method Summary
Modifier and TypeMethodDescriptionBufferPublicKeyParser<? extends PublicKey> final Stringprotected abstract RequestHandler.ResulthandleHostKeys(Session session, Collection<? extends PublicKey> keys, boolean wantReply, Buffer buffer) protected booleanprocess(ConnectionService connectionService, String request, boolean wantReply, Buffer buffer) Process an SSH request.protected voidsetIgnoreInvalidKeys(boolean ignore) toString()
-
Field Details
-
request
-
parser
-
ignoreInvalidKeys
private boolean ignoreInvalidKeys
-
-
Constructor Details
-
AbstractOpenSshHostKeysHandler
-
AbstractOpenSshHostKeysHandler
protected AbstractOpenSshHostKeysHandler(String request, BufferPublicKeyParser<? extends PublicKey> parser)
-
-
Method Details
-
getRequestName
-
getPublicKeysParser
-
process
public RequestHandler.Result process(ConnectionService connectionService, String request, boolean wantReply, Buffer buffer) throws Exception Description copied from interface:RequestHandlerProcess 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:
processin interfaceConnectionServiceRequestHandler- Specified by:
processin interfaceRequestHandler<ConnectionService>- Overrides:
processin classAbstractConnectionServiceRequestHandler- Parameters:
connectionService- The input parameterrequest- The request stringwantReply- Whether a reply is requestedbuffer- TheBufferwith 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.Unsupportedvalue should be returned
-
setIgnoreInvalidKeys
protected void setIgnoreInvalidKeys(boolean ignore) -
isIgnoreInvalidKeys
protected boolean isIgnoreInvalidKeys() -
handleHostKeys
protected abstract RequestHandler.Result handleHostKeys(Session session, Collection<? extends PublicKey> keys, boolean wantReply, Buffer buffer) throws Exception - Throws:
Exception
-
toString
-