public class ServerSession extends AbstractSession
Session.AttributeKey<T>, Session.Stateattributes, 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, requestLock, requestResult, seqi, seqo, serverProposal, serverVersion, SESSION, sessionId, tcpipForwarder, uncompressBuffer, username| Constructor and Description |
|---|
ServerSession(ServerFactoryManager server,
IoSession ioSession) |
| Modifier and Type | Method and Description |
|---|---|
CloseFuture |
close(boolean immediately)
Close this session.
|
String |
createX11Display(boolean singleConnection,
String authenticationProtocol,
String authenticationCookie,
int screen) |
protected int |
getActiveSessionCountForUser(String userName)
Retrieve the current number of sessions active for a given username.
|
KeyPair |
getHostKey() |
long |
getId()
Returns the session id.
|
KeyExchange |
getKex() |
String |
getNegociated(int index) |
protected ScheduledExecutorService |
getScheduledExecutorService() |
ServerFactoryManager |
getServerFactoryManager() |
byte[] |
getSessionId() |
protected void |
handleMessage(Buffer buffer)
Abstract method for processing incoming decoded packets.
|
String |
initAgentForward() |
protected boolean |
readIdentification(Buffer buffer)
Read the other side identification.
|
IoWriteFuture |
writePacket(Buffer buffer)
Encode and send the given buffer.
|
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, getState, getTcpipForwarder, getUsername, messageReceived, negociate, notImplemented, receiveKexInit, receiveNewKeys, registerChannel, removeListener, request, requestFailure, requestSuccess, sendIdentification, sendKexInit, sendNewKeys, setAttribute, setState, unregisterChannelpublic ServerSession(ServerFactoryManager server, IoSession ioSession) throws Exception
Exceptionpublic CloseFuture close(boolean immediately)
AbstractSessionclose in class AbstractSessionpublic String getNegociated(int index)
public KeyExchange getKex()
public byte[] getSessionId()
public ServerFactoryManager getServerFactoryManager()
protected ScheduledExecutorService getScheduledExecutorService()
public IoWriteFuture writePacket(Buffer buffer) throws IOException
AbstractSessionwritePacket in interface SessionwritePacket in class AbstractSessionbuffer - the buffer to encode and sendIOException - if an error occured when encoding sending the packetprotected void handleMessage(Buffer buffer) throws Exception
AbstractSessionhandleMessage in class AbstractSessionbuffer - the buffer containing the packetException - if an exeption occurs while handling this packet.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 KeyPair getHostKey()
protected int getActiveSessionCountForUser(String userName)
userName - The name of the userSshSession objects associated with the userpublic String initAgentForward() throws IOException
IOExceptionpublic String createX11Display(boolean singleConnection, String authenticationProtocol, String authenticationCookie, int screen) throws IOException
IOExceptionpublic long getId()
Copyright © 2008–2013 The Apache Software Foundation. All rights reserved.