Class SshTransportFilter
java.lang.Object
org.apache.sshd.common.filter.IoFilter
org.apache.sshd.common.session.filters.SshTransportFilter
- All Implemented Interfaces:
Filter, Owned<FilterContext>
A filter encapsulating the basic SSH transport up to and including KEX.
-
Constructor Summary
ConstructorsConstructorDescriptionSshTransportFilter(AbstractSession session, org.apache.sshd.common.random.Random random, SshIdentHandler identities, SessionListener events, KexFilter.Proposer proposer, KexFilter.HostKeyChecker checker) Creates a new SSH transport filter. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddKexListener(KexListener listener) voidvoidorg.apache.sshd.common.cipher.CipherInformationgetCipherInformation(boolean incoming) org.apache.sshd.common.compression.CompressionInformationgetCompressionInformation(boolean incoming) longAtomicReference<org.apache.sshd.common.kex.KexState> longorg.apache.sshd.common.mac.MacInformationgetMacInformation(boolean incoming) longbyte[]in()Retrieves the filter'sInputHandler.booleanbooleanisSecure()booleanout()Retrieves the filter'sOutputHandler.voidvoidremoveKexListener(KexListener listener) voidshutdown()startKex()
-
Constructor Details
-
SshTransportFilter
public SshTransportFilter(AbstractSession session, org.apache.sshd.common.random.Random random, SshIdentHandler identities, SessionListener events, KexFilter.Proposer proposer, KexFilter.HostKeyChecker checker) Creates a new SSH transport filter.- Parameters:
session-AbstractSessionthis filter is forrandom-Randominstance to useidentities-SshIdentHandlerfor handling the SSH identificaton stringevents-SessionListenerto report some eventsproposer-KexFilter.Proposerto get KEX proposalschecker-KexFilter.HostKeyCheckerto check the peer's host key; may benullif on a server
-
-
Method Details
-
in
Description copied from interface:FilterRetrieves the filter'sInputHandler.- Returns:
- the
InputHandleror codenullif this filter is an output-only filter
-
out
Description copied from interface:FilterRetrieves the filter'sOutputHandler.- Returns:
- the
OutputHandleror codenullif this filter is an input-only filter
-
startKex
- Throws:
Exception
-
shutdown
public void shutdown() -
isStrictKex
public boolean isStrictKex() -
isInitialKexDone
public boolean isInitialKexDone() -
getKexState
-
getNegotiated
-
getClientProposal
-
getServerProposal
-
getSessionId
public byte[] getSessionId() -
addKexListener
-
removeKexListener
-
addEncryptionListener
-
removeEncryptionListener
-
isSecure
public boolean isSecure() -
getLastInputSequenceNumber
public long getLastInputSequenceNumber() -
getInputSequenceNumber
public long getInputSequenceNumber() -
getOutputSequenceNumber
public long getOutputSequenceNumber() -
getCipherInformation
public org.apache.sshd.common.cipher.CipherInformation getCipherInformation(boolean incoming) -
getMacInformation
public org.apache.sshd.common.mac.MacInformation getMacInformation(boolean incoming) -
enableInputCompression
public void enableInputCompression() -
enableOutputCompression
public void enableOutputCompression() -
getCompressionInformation
public org.apache.sshd.common.compression.CompressionInformation getCompressionInformation(boolean incoming)
-