public class ServerSession extends AbstractSession
AbstractSession.PendingWriteFutureSession.AttributeKey<T>| Modifier and Type | Field and Description |
|---|---|
protected static long |
MAX_PACKETS |
attributes, authed, clientProposal, clientVersion, currentService, decodeLock, decoderBuffer, decoderLength, decoderState, encodeLock, factoryManager, I_C, I_S, 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, uncompressBuffer, usernameCLOSED, closeFuture, GRACEFUL, IMMEDIATE, lock, log, OPENED, state| Constructor and Description |
|---|
ServerSession(ServerFactoryManager server,
IoSession ioSession) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkForTimeouts()
Checks whether the server session has timed out (both auth and idle timeouts are checked).
|
protected void |
checkKeys() |
protected void |
checkRekey() |
protected int |
getActiveSessionCountForUser(java.lang.String userName)
Retrieve the current number of sessions active for a given username.
|
ServerFactoryManager |
getFactoryManager()
Retrieve the factory manager
|
java.security.KeyPair |
getHostKey() |
long |
getId()
Returns the session id.
|
java.lang.String |
getNegotiated(int index) |
protected boolean |
readIdentification(Buffer buffer)
Read the other side identification.
|
protected void |
receiveKexInit(Buffer buffer) |
void |
resetIdleTimeout() |
protected void |
sendKexInit() |
protected void |
serviceAccept() |
void |
startService(java.lang.String name) |
addListener, attachSession, createBuffer, createBuffer, createProposal, decode, disconnect, doHandleMessage, doReadIdentification, doWritePacket, exceptionCaught, getAttribute, getClientVersion, getInnerCloseable, getIntProperty, getIoSession, getKex, getLock, getLongProperty, getServerVersion, getServices, getSession, getSession, getSessionId, getUsername, handleMessage, isAuthenticated, messageReceived, negotiate, notImplemented, postClose, receiveKexInit, receiveNewKeys, reExchangeKeys, removeListener, request, requestFailure, requestSuccess, sendEvent, sendIdentification, sendKexInit, sendNewKeys, setAttribute, setAuthenticated, setUsername, toString, writePacketdoCloseGracefully, doCloseImmediatelycloseprotected static final long MAX_PACKETS
public ServerSession(ServerFactoryManager server, IoSession ioSession) throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getNegotiated(int index)
public ServerFactoryManager getFactoryManager()
AbstractSessiongetFactoryManager in interface SessiongetFactoryManager in class AbstractSessionprotected void checkKeys()
checkKeys in class AbstractSessionpublic void startService(java.lang.String name)
throws java.lang.Exception
startService in class AbstractSessionjava.lang.Exceptionprotected void serviceAccept()
throws java.io.IOException
serviceAccept in class AbstractSessionjava.io.IOExceptionprotected void checkForTimeouts()
throws java.io.IOException
java.io.IOExceptionprotected void checkRekey()
throws java.io.IOException
checkRekey in class AbstractSessionjava.io.IOExceptionpublic void resetIdleTimeout()
resetIdleTimeout in class AbstractSessionprotected void sendKexInit()
throws java.io.IOException
sendKexInit in class AbstractSessionjava.io.IOExceptionprotected boolean readIdentification(Buffer buffer) throws java.io.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 neededjava.io.IOException - if an error occurs such as a bad protocol versionprotected void receiveKexInit(Buffer buffer) throws java.io.IOException
receiveKexInit in class AbstractSessionjava.io.IOExceptionpublic java.security.KeyPair getHostKey()
protected int getActiveSessionCountForUser(java.lang.String userName)
userName - The name of the userSshSession objects associated with the userpublic long getId()
Copyright © 2008-2014 The Apache Software Foundation. All Rights Reserved.