public class ServerSession extends AbstractSession
AbstractSession.PendingWriteFutureCloseableUtils.AbstractCloseable.StateSession.AttributeKey<T>, Session.TimeoutStatus| Modifier and Type | Field and Description |
|---|---|
protected static long |
MAX_PACKETS |
attributes, authed, authTimeoutMs, authTimeoutTimestamp, clientProposal, clientVersion, currentService, decodeLock, decoderBuffer, decoderLength, decoderState, disconnectTimeoutMs, encodeLock, factoryManager, I_C, I_S, idleTimeoutMs, idleTimeoutTimestamp, inBytes, inCipher, inCipherSize, inCompression, inMac, inMacResult, inPackets, ioSession, isServer, kex, KEX_STATE_DONE, KEX_STATE_INIT, KEX_STATE_KEYS, KEX_STATE_RUN, kexState, lastKeyTime, listeners, negotiated, outBytes, outCipher, outCipherSize, outCompression, outMac, outPackets, pendingPackets, random, reexchangeFuture, requestLock, requestResult, seqi, seqo, serverProposal, serverVersion, SESSION, sessionId, sessionListenerProxy, timeoutStatus, uncompressBuffer, usernamecloseFuture, lock, log, state| Constructor and Description |
|---|
ServerSession(ServerFactoryManager server,
IoSession ioSession) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkKeys() |
protected void |
checkRekey() |
protected int |
getActiveSessionCountForUser(String userName)
Retrieve the current number of sessions active for a given username.
|
ServerFactoryManager |
getFactoryManager()
Retrieve the factory manager
|
KeyPair |
getHostKey() |
long |
getId()
Returns the session id.
|
String |
getNegotiated(int index) |
protected boolean |
readIdentification(Buffer buffer)
Read the other side identification.
|
protected void |
receiveKexInit(Buffer buffer) |
protected void |
sendKexInit() |
protected void |
serviceAccept() |
void |
startService(String name) |
addListener, attachSession, checkForTimeouts, createBuffer, createBuffer, createProposal, decode, disconnect, doCloseImmediately, doHandleMessage, doReadIdentification, doWritePacket, exceptionCaught, getAttribute, getAuthTimeout, getClientVersion, getIdleTimeout, getInnerCloseable, getIntProperty, getIoSession, getKex, getLock, getLongProperty, getNegotiatedKexParameter, getServerVersion, getService, getServices, getSession, getSession, getSessionId, getTimeoutStatus, getUsername, handleMessage, isAuthenticated, messageReceived, negotiate, notImplemented, receiveKexInit, receiveNewKeys, reExchangeKeys, removeListener, request, requestFailure, requestSuccess, resetIdleTimeout, sendEvent, sendIdentification, sendKexInit, sendNewKeys, setAttribute, setAuthenticated, setUsername, toString, writePacket, writePacketdoCloseGracefullybuilder, close, isClosed, isClosing, preCloseprotected static final long MAX_PACKETS
public ServerSession(ServerFactoryManager server, IoSession ioSession) throws Exception
Exceptionpublic String getNegotiated(int index)
public ServerFactoryManager getFactoryManager()
AbstractSessiongetFactoryManager in interface SessiongetFactoryManager in class AbstractSessionprotected void checkKeys()
checkKeys in class AbstractSessionpublic void startService(String name) throws Exception
startService in class AbstractSessionExceptionprotected void serviceAccept()
throws IOException
serviceAccept in class AbstractSessionIOExceptionprotected void checkRekey()
throws IOException
checkRekey in class AbstractSessionIOExceptionprotected void sendKexInit()
throws IOException
sendKexInit in class AbstractSessionIOExceptionprotected boolean readIdentification(Buffer buffer) throws IOException
AbstractSessionAbstractSession.doReadIdentification(org.apache.sshd.common.util.Buffer,boolean) 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 versionprotected void receiveKexInit(Buffer buffer) throws IOException
receiveKexInit in class AbstractSessionIOExceptionpublic KeyPair getHostKey()
protected int getActiveSessionCountForUser(String userName)
userName - The name of the userSshSession objects associated with the userpublic long getId()
Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.