|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sshtools.j2ssh.transport.TransportProtocolCommon
DOCUMENT ME!
Field Summary | |
protected TransportProtocolAlgorithmSync |
algorithmsIn
DOCUMENT ME! |
protected TransportProtocolAlgorithmSync |
algorithmsOut
DOCUMENT ME! |
protected java.lang.String |
clientIdent
DOCUMENT ME! |
protected SshMsgKexInit |
clientKexInit
DOCUMENT ME! |
protected java.lang.Boolean |
completeOnNewKeys
DOCUMENT ME! |
static int |
EOL_CRLF
DOCUMENT ME! |
static int |
EOL_LF
DOCUMENT ME! |
protected byte[] |
hostKey
DOCUMENT ME! |
protected HostKeyVerification |
hosts
DOCUMENT ME! |
protected java.math.BigInteger |
k
DOCUMENT ME! |
protected java.util.Map |
kexs
DOCUMENT ME! |
protected static org.apache.commons.logging.Log |
log
DOCUMENT ME! |
protected SshMessageStore |
messageStore
DOCUMENT ME! |
protected SshConnectionProperties |
properties
DOCUMENT ME! |
static java.lang.String |
PROTOCOL_VERSION
DOCUMENT ME! |
protected java.lang.String |
serverIdent
DOCUMENT ME! |
protected SshMsgKexInit |
serverKexInit
DOCUMENT ME! |
protected byte[] |
sessionIdentifier
DOCUMENT ME! |
protected byte[] |
signature
DOCUMENT ME! |
static java.lang.String |
SOFTWARE_VERSION_COMMENTS
DOCUMENT ME! |
protected com.sshtools.j2ssh.transport.TransportProtocolInputStream |
sshIn
DOCUMENT ME! |
protected com.sshtools.j2ssh.transport.TransportProtocolOutputStream |
sshOut
DOCUMENT ME! |
protected TransportProtocolState |
state
DOCUMENT ME! |
Constructor Summary | |
TransportProtocolCommon()
Creates a new TransportProtocolCommon object. |
Method Summary | |
void |
addEventHandler(TransportProtocolEventHandler eventHandler)
DOCUMENT ME! |
void |
addMessageStore(SshMessageStore store)
DOCUMENT ME! |
protected void |
beginKeyExchange()
DOCUMENT ME! |
protected void |
completeKeyExchange()
DOCUMENT ME! |
protected SshMsgKexInit |
createLocalKexInit()
DOCUMENT ME! |
protected java.lang.String |
determineAlgorithm(java.util.List clientAlgorithms,
java.util.List serverAlgorithms)
DOCUMENT ME! |
void |
disconnect(java.lang.String description)
DOCUMENT ME! |
int |
getConnectionId()
DOCUMENT ME! |
protected abstract java.lang.String |
getDecryptionAlgorithm()
DOCUMENT ME! |
protected abstract java.lang.String |
getEncryptionAlgorithm()
DOCUMENT ME! |
protected java.util.List |
getEventHandlers()
DOCUMENT ME! |
long |
getIncomingByteCount()
DOCUMENT ME! |
protected abstract java.lang.String |
getInputStreamCompAlgortihm()
DOCUMENT ME! |
protected abstract java.lang.String |
getInputStreamMacAlgorithm()
DOCUMENT ME! |
protected java.lang.String |
getKexAlgorithm()
DOCUMENT ME! |
abstract java.lang.String |
getLocalId()
DOCUMENT ME! |
protected abstract SshMsgKexInit |
getLocalKexInit()
DOCUMENT ME! |
long |
getOutgoingByteCount()
|
protected abstract java.lang.String |
getOutputStreamCompAlgorithm()
DOCUMENT ME! |
protected abstract java.lang.String |
getOutputStreamMacAlgorithm()
DOCUMENT ME! |
SshConnectionProperties |
getProperties()
DOCUMENT ME! |
int |
getRemoteEOL()
DOCUMENT ME! |
abstract java.lang.String |
getRemoteId()
DOCUMENT ME! |
protected abstract SshMsgKexInit |
getRemoteKexInit()
DOCUMENT ME! |
byte[] |
getSessionIdentifier()
DOCUMENT ME! |
TransportProtocolState |
getState()
DOCUMENT ME! |
java.lang.String |
getUnderlyingProviderDetail()
DOCUMENT ME! |
protected void |
onCorruptMac()
DOCUMENT ME! |
protected abstract void |
onDisconnect()
DOCUMENT ME! |
protected abstract void |
onMessageReceived(SshMessage msg)
DOCUMENT ME! |
protected abstract void |
onStartTransportProtocol()
DOCUMENT ME! |
protected abstract void |
performKeyExchange(SshKeyExchange kex)
DOCUMENT ME! |
protected SshMessage |
processMessages()
DOCUMENT ME! |
SshMessage |
readMessage(int[] filter)
DOCUMENT ME! |
abstract void |
registerTransportMessages()
DOCUMENT ME! |
void |
removeMessageStore(SshMessageStore ms)
DOCUMENT ME! |
void |
run()
DOCUMENT ME! |
protected void |
sendDisconnect(int reason,
java.lang.String description)
DOCUMENT ME! |
protected void |
sendDisconnect(int reason,
java.lang.String description,
java.io.IOException error)
DOCUMENT ME! |
protected void |
sendKeyExchangeInit()
DOCUMENT ME! |
void |
sendMessage(SshMessage msg,
java.lang.Object sender)
DOCUMENT ME! |
protected void |
sendNewKeys()
DOCUMENT ME! |
void |
setKexTimeout(long seconds)
DOCUMENT ME! |
void |
setKexTransferLimit(long kilobytes)
DOCUMENT ME! |
protected abstract void |
setLocalIdent()
DOCUMENT ME! |
protected abstract void |
setLocalKexInit(SshMsgKexInit msg)
DOCUMENT ME! |
protected abstract void |
setRemoteIdent(java.lang.String ident)
DOCUMENT ME! |
protected abstract void |
setRemoteKexInit(SshMsgKexInit msg)
DOCUMENT ME! |
void |
setSendIgnore(boolean sendIgnore)
DOCUMENT ME! |
protected abstract void |
setupNewKeys(byte[] encryptCSKey,
byte[] encryptCSIV,
byte[] encryptSCKey,
byte[] encryptSCIV,
byte[] macCSKey,
byte[] macSCKey)
DOCUMENT ME! |
protected void |
startBinaryPacketProtocol()
DOCUMENT ME! |
void |
startTransportProtocol(TransportProvider provider,
SshConnectionProperties properties)
DOCUMENT ME! |
protected void |
stop()
DOCUMENT ME! |
void |
unregisterMessage(java.lang.Integer messageId,
SshMessageStore store)
DOCUMENT ME! |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.apache.commons.logging.Log log
public static final int EOL_CRLF
public static final int EOL_LF
public static final java.lang.String PROTOCOL_VERSION
public static java.lang.String SOFTWARE_VERSION_COMMENTS
protected java.math.BigInteger k
protected java.lang.Boolean completeOnNewKeys
protected HostKeyVerification hosts
protected java.util.Map kexs
protected SshConnectionProperties properties
protected SshMessageStore messageStore
protected SshMsgKexInit clientKexInit
protected SshMsgKexInit serverKexInit
protected java.lang.String clientIdent
protected java.lang.String serverIdent
protected TransportProtocolAlgorithmSync algorithmsIn
protected TransportProtocolAlgorithmSync algorithmsOut
protected TransportProtocolState state
protected byte[] sessionIdentifier
protected byte[] hostKey
protected byte[] signature
protected com.sshtools.j2ssh.transport.TransportProtocolInputStream sshIn
protected com.sshtools.j2ssh.transport.TransportProtocolOutputStream sshOut
Constructor Detail |
public TransportProtocolCommon()
Method Detail |
public int getConnectionId()
getConnectionId
in interface TransportProtocol
public int getRemoteEOL()
public TransportProtocolState getState()
getState
in interface TransportProtocol
public SshConnectionProperties getProperties()
protected abstract void onDisconnect()
public void disconnect(java.lang.String description)
disconnect
in interface TransportProtocol
description
- DOCUMENT ME!public void setSendIgnore(boolean sendIgnore)
sendIgnore
- DOCUMENT ME!public void setKexTimeout(long seconds) throws TransportProtocolException
seconds
- DOCUMENT ME!
TransportProtocolException
- DOCUMENT ME!public void setKexTransferLimit(long kilobytes) throws TransportProtocolException
kilobytes
- DOCUMENT ME!
TransportProtocolException
- DOCUMENT ME!public long getOutgoingByteCount()
public long getIncomingByteCount()
public void addEventHandler(TransportProtocolEventHandler eventHandler)
eventHandler
- DOCUMENT ME!public abstract void registerTransportMessages() throws MessageAlreadyRegisteredException
MessageAlreadyRegisteredException
- DOCUMENT ME!public byte[] getSessionIdentifier()
getSessionIdentifier
in interface TransportProtocol
public void run()
run
in interface java.lang.Runnable
public void sendMessage(SshMessage msg, java.lang.Object sender) throws java.io.IOException
sendMessage
in interface TransportProtocol
msg
- DOCUMENT ME!sender
- DOCUMENT ME!
java.io.IOException
- DOCUMENT ME!
TransportProtocolException
- DOCUMENT ME!protected abstract void onStartTransportProtocol() throws java.io.IOException
java.io.IOException
- DOCUMENT ME!public void startTransportProtocol(TransportProvider provider, SshConnectionProperties properties) throws java.io.IOException
provider
- DOCUMENT ME!properties
- DOCUMENT ME!
java.io.IOException
- DOCUMENT ME!public java.lang.String getUnderlyingProviderDetail()
getUnderlyingProviderDetail
in interface TransportProtocol
public void unregisterMessage(java.lang.Integer messageId, SshMessageStore store) throws MessageNotRegisteredException
messageId
- DOCUMENT ME!store
- DOCUMENT ME!
MessageNotRegisteredException
- DOCUMENT ME!protected abstract java.lang.String getDecryptionAlgorithm() throws AlgorithmNotAgreedException
AlgorithmNotAgreedException
- DOCUMENT ME!protected abstract java.lang.String getEncryptionAlgorithm() throws AlgorithmNotAgreedException
AlgorithmNotAgreedException
- DOCUMENT ME!protected abstract java.lang.String getInputStreamCompAlgortihm() throws AlgorithmNotAgreedException
AlgorithmNotAgreedException
- DOCUMENT ME!protected abstract java.lang.String getInputStreamMacAlgorithm() throws AlgorithmNotAgreedException
AlgorithmNotAgreedException
- DOCUMENT ME!protected abstract void setLocalIdent()
public abstract java.lang.String getLocalId()
protected abstract void setLocalKexInit(SshMsgKexInit msg)
msg
- DOCUMENT ME!protected abstract SshMsgKexInit getLocalKexInit()
protected abstract java.lang.String getOutputStreamCompAlgorithm() throws AlgorithmNotAgreedException
AlgorithmNotAgreedException
- DOCUMENT ME!protected abstract java.lang.String getOutputStreamMacAlgorithm() throws AlgorithmNotAgreedException
AlgorithmNotAgreedException
- DOCUMENT ME!protected abstract void setRemoteIdent(java.lang.String ident)
ident
- DOCUMENT ME!public abstract java.lang.String getRemoteId()
protected abstract void setRemoteKexInit(SshMsgKexInit msg)
msg
- DOCUMENT ME!protected abstract SshMsgKexInit getRemoteKexInit()
protected abstract void performKeyExchange(SshKeyExchange kex) throws java.io.IOException, KeyExchangeException
kex
- DOCUMENT ME!
java.io.IOException
- DOCUMENT ME!
KeyExchangeException
- DOCUMENT ME!protected java.lang.String getKexAlgorithm() throws AlgorithmNotAgreedException
AlgorithmNotAgreedException
- DOCUMENT ME!protected void beginKeyExchange() throws java.io.IOException, KeyExchangeException
java.io.IOException
- DOCUMENT ME!
KeyExchangeException
- DOCUMENT ME!protected SshMsgKexInit createLocalKexInit() throws java.io.IOException
java.io.IOException
- DOCUMENT ME!protected void onCorruptMac()
protected abstract void onMessageReceived(SshMessage msg) throws java.io.IOException
msg
- DOCUMENT ME!
java.io.IOException
- DOCUMENT ME!protected void sendDisconnect(int reason, java.lang.String description)
reason
- DOCUMENT ME!description
- DOCUMENT ME!protected void sendDisconnect(int reason, java.lang.String description, java.io.IOException error)
reason
- DOCUMENT ME!description
- DOCUMENT ME!error
- DOCUMENT ME!protected void sendKeyExchangeInit() throws java.io.IOException
java.io.IOException
- DOCUMENT ME!protected void sendNewKeys() throws java.io.IOException
java.io.IOException
- DOCUMENT ME!protected abstract void setupNewKeys(byte[] encryptCSKey, byte[] encryptCSIV, byte[] encryptSCKey, byte[] encryptSCIV, byte[] macCSKey, byte[] macSCKey) throws AlgorithmNotAgreedException, AlgorithmOperationException, AlgorithmNotSupportedException, AlgorithmInitializationException
encryptCSKey
- DOCUMENT ME!encryptCSIV
- DOCUMENT ME!encryptSCKey
- DOCUMENT ME!encryptSCIV
- DOCUMENT ME!macCSKey
- DOCUMENT ME!macSCKey
- DOCUMENT ME!
AlgorithmNotAgreedException
- DOCUMENT ME!
AlgorithmOperationException
- DOCUMENT ME!
AlgorithmNotSupportedException
- DOCUMENT ME!
AlgorithmInitializationException
- DOCUMENT ME!protected void completeKeyExchange() throws java.io.IOException
java.io.IOException
- DOCUMENT ME!
TransportProtocolException
- DOCUMENT ME!protected java.util.List getEventHandlers()
protected java.lang.String determineAlgorithm(java.util.List clientAlgorithms, java.util.List serverAlgorithms) throws AlgorithmNotAgreedException
clientAlgorithms
- DOCUMENT ME!serverAlgorithms
- DOCUMENT ME!
AlgorithmNotAgreedException
- DOCUMENT ME!protected void startBinaryPacketProtocol() throws java.io.IOException
java.io.IOException
- DOCUMENT ME!protected final void stop()
public SshMessage readMessage(int[] filter) throws java.io.IOException
readMessage
in interface TransportProtocol
filter
- DOCUMENT ME!
java.io.IOException
- DOCUMENT ME!protected SshMessage processMessages() throws java.io.IOException
java.io.IOException
- DOCUMENT ME!public void addMessageStore(SshMessageStore store) throws MessageAlreadyRegisteredException
addMessageStore
in interface TransportProtocol
store
- DOCUMENT ME!
MessageAlreadyRegisteredException
- DOCUMENT ME!public void removeMessageStore(SshMessageStore ms)
ms
- DOCUMENT ME!
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |