public class ClientSessionImpl extends AbstractSession implements ClientSession
| Modifier and Type | Class and Description |
|---|---|
static class |
ClientSessionImpl.State |
Session.AttributeKey<T>attributes, authed, channels, clientProposal, clientVersion, closeFuture, closing, decodeLock, decoderBuffer, decoderLength, decoderState, encodeLock, factoryManager, I_C, I_S, inCipher, inCipherSize, inCompression, inMac, inMacResult, ioSession, kex, listeners, lock, log, negociated, nextChannelId, outCipher, outCipherSize, outCompression, outMac, random, seqi, seqo, serverProposal, serverVersion, SESSION, sessionId, uncompressBuffer, usernameAUTHED, CLOSED, TIMEOUT, WAIT_AUTH| Constructor and Description |
|---|
ClientSessionImpl(FactoryManager client,
org.apache.mina.core.session.IoSession session) |
| Modifier and Type | Method and Description |
|---|---|
AuthFuture |
authAgent(String username) |
AuthFuture |
authPassword(String username,
String password) |
AuthFuture |
authPublicKey(String username,
KeyPair key) |
CloseFuture |
close(boolean immediately)
Close this session.
|
ClientChannel |
createChannel(String type) |
ClientChannel |
createChannel(String type,
String subType) |
ChannelExec |
createExecChannel(String command) |
ChannelShell |
createShellChannel() |
ChannelSubsystem |
createSubsystemChannel(String subsystem) |
protected void |
doHandleMessage(Buffer buffer) |
ClientFactoryManager |
getClientFactoryManager() |
KeyExchange |
getKex() |
Map<Object,Object> |
getMetadataMap() |
protected void |
handleMessage(Buffer buffer)
Abstract method for processing incoming decoded packets.
|
protected boolean |
readIdentification(Buffer buffer)
Read the other side identification.
|
void |
setState(ClientSessionImpl.State newState) |
int |
waitFor(int mask,
long timeout) |
addListener, attachSession, channelClose, channelData, channelEof, channelExtendedData, channelFailure, channelOpenConfirmation, channelOpenFailure, channelRequest, channelWindowAdjust, createBuffer, createProposal, decode, disconnect, doReadIdentification, exceptionCaught, getAttribute, getChannel, getFactoryManager, getIntProperty, getIoSession, getNextChannelId, getSession, getSession, getUsername, messageReceived, negociate, notImplemented, receiveKexInit, receiveNewKeys, registerChannel, removeListener, sendIdentification, sendKexInit, sendNewKeys, setAttribute, unregisterChannel, writePacketpublic ClientSessionImpl(FactoryManager client, org.apache.mina.core.session.IoSession session) throws Exception
Exceptionpublic ClientFactoryManager getClientFactoryManager()
public KeyExchange getKex()
public AuthFuture authAgent(String username) throws IOException
authAgent in interface ClientSessionIOExceptionpublic AuthFuture authPassword(String username, String password) throws IOException
authPassword in interface ClientSessionIOExceptionpublic AuthFuture authPublicKey(String username, KeyPair key) throws IOException
authPublicKey in interface ClientSessionIOExceptionpublic ClientChannel createChannel(String type) throws Exception
createChannel in interface ClientSessionExceptionpublic ClientChannel createChannel(String type, String subType) throws Exception
createChannel in interface ClientSessionExceptionpublic ChannelShell createShellChannel() throws Exception
createShellChannel in interface ClientSessionExceptionpublic ChannelExec createExecChannel(String command) throws Exception
createExecChannel in interface ClientSessionExceptionpublic ChannelSubsystem createSubsystemChannel(String subsystem) throws Exception
createSubsystemChannel in interface ClientSessionExceptionpublic CloseFuture close(boolean immediately)
AbstractSessionclose in interface ClientSessionclose in class AbstractSessionprotected void handleMessage(Buffer buffer) throws Exception
AbstractSessionhandleMessage in class AbstractSessionbuffer - the buffer containing the packetException - if an exeption occurs while handling this packet.public int waitFor(int mask,
long timeout)
waitFor in interface ClientSessionpublic void setState(ClientSessionImpl.State newState)
protected boolean readIdentification(Buffer buffer) throws IOException
AbstractSessionAbstractSession.doReadIdentification(org.apache.sshd.common.util.Buffer) and
store the result in the needed property.readIdentification in class AbstractSessionbuffer - the buffer containing the remote identificationtrue if the identification has been fully read or
false if more data is neededIOException - if an error occurs such as a bad protocol versionpublic Map<Object,Object> getMetadataMap()
getMetadataMap in interface ClientSessionCopyright © 2008-2012 Apache Software Foundation. All Rights Reserved.