public class ServerSession extends AbstractSession
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, username
Constructor and Description |
---|
ServerSession(FactoryManager server,
org.apache.mina.core.session.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() |
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.
|
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, writePacket
public ServerSession(FactoryManager server, org.apache.mina.core.session.IoSession ioSession) throws Exception
Exception
public CloseFuture close(boolean immediately)
AbstractSession
close
in class AbstractSession
public String getNegociated(int index)
public KeyExchange getKex()
public byte[] getSessionId()
public ServerFactoryManager getServerFactoryManager()
protected ScheduledExecutorService getScheduledExecutorService()
protected void handleMessage(Buffer buffer) throws Exception
AbstractSession
handleMessage
in class AbstractSession
buffer
- the buffer containing the packetException
- if an exeption occurs while handling this packet.protected boolean readIdentification(Buffer buffer) throws IOException
AbstractSession
AbstractSession.doReadIdentification(org.apache.sshd.common.util.Buffer)
and
store the result in the needed property.readIdentification
in class AbstractSession
buffer
- 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
IOException
public String createX11Display(boolean singleConnection, String authenticationProtocol, String authenticationCookie, int screen) throws IOException
IOException
Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.