public interface ProtocolSession
Modifier and Type | Interface and Description |
---|---|
static class |
ProtocolSession.State |
Modifier and Type | Method and Description |
---|---|
Object |
getAttachment(String key,
ProtocolSession.State state)
Return the value which is stored for the given key in the specified
ProtocolSession.State or null if non was stored before. |
Charset |
getCharset()
Return the
Charset which is used by the ProtocolSession |
ProtocolConfiguration |
getConfiguration()
Return the
ProtocolConfiguration |
Map<String,Object> |
getConnectionState()
Deprecated.
|
String |
getLineDelimiter()
Return the line delimiter which is used
|
InetSocketAddress |
getLocalAddress()
Return the
InetSocketAddress of the local bound address |
Logger |
getLogger()
Gets the context sensitive log for this session.
|
int |
getPushedLineHandlerCount()
Return the size of the pushed
LineHandler |
InetSocketAddress |
getRemoteAddress()
Return the
InetSocketAddress of the remote peer |
String |
getSessionID()
Return the ID for the session
|
Map<String,Object> |
getState()
Deprecated.
|
String |
getUser()
Returns the user name associated with this interaction.
|
boolean |
isStartTLSSupported()
Return true if StartTLS is supported by the configuration
|
boolean |
isTLSStarted()
Return true if the starttls was started
|
Response |
newFatalErrorResponse()
Define a response object to be used as reply during a fatal error.
|
Response |
newLineTooLongResponse()
Define a response object to be used as reply for a too long input line
|
void |
popLineHandler()
Pop the last command handler
|
<T extends ProtocolSession> |
pushLineHandler(LineHandler<T> overrideCommandHandler)
Put a new line handler in the chain
|
void |
resetState()
Reset the state
|
Object |
setAttachment(String key,
Object value,
ProtocolSession.State state)
Store the given value with the given key in the specified
ProtocolSession.State . |
void |
setUser(String user)
Sets the user name associated with this interaction.
|
Logger getLogger()
Object setAttachment(String key, Object value, ProtocolSession.State state)
ProtocolSession.State
. If you want to remove a value you need to use null
as valuekey
- the key under which the value should get storedvalue
- the value which will get stored under the given key or null
if you want to remove any value which is stored under the keystate
- the ProtocolSession.State
to which the mapping belongsnull
if non was stored before.Object getAttachment(String key, ProtocolSession.State state)
ProtocolSession.State
or null
if non was stored before.key
- the key under which the value should be searchedstate
- the ProtocolSession.State
in which the value was stored for the key@Deprecated Map<String,Object> getState()
setAttachment(String, Object, State)
@Deprecated Map<String,Object> getConnectionState()
getAttachment(String, State)
ProtocolSession
per connectionProtocolSession
state per connectionvoid resetState()
InetSocketAddress getRemoteAddress()
InetSocketAddress
of the remote peerInetSocketAddress getLocalAddress()
InetSocketAddress
of the local bound addressString getSessionID()
Response newLineTooLongResponse()
Response newFatalErrorResponse()
String getUser()
void setUser(String user)
user
- the user nameboolean isStartTLSSupported()
boolean isTLSStarted()
ProtocolConfiguration getConfiguration()
ProtocolConfiguration
Charset getCharset()
Charset
which is used by the ProtocolSession
String getLineDelimiter()
<T extends ProtocolSession> void pushLineHandler(LineHandler<T> overrideCommandHandler)
overrideCommandHandler
- void popLineHandler()
int getPushedLineHandlerCount()
LineHandler
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.