Package wt.servlet
Interface SessionMBean
- All Superinterfaces:
SelfEmailingMBean
Detailed information related to a single servlet engine session.
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionEstimates the memory size (in bytes) of session attributes by performing Java serialization of those attributes; in instances where an attribute cannot be serialized -1 is returned.longEstimates the total memory size (in bytes) of a session by serializing it.getAttributeAsString(String attributeName) Returns a string representation of the value of the specified session attribute.String[]Session attribute names
Supported API: trueTime at which session was created
Supported API: trueId of servlet request which resulted in the creation of this session
Supported API: truegetId()Session id
Supported API: trueLast time at which session was accessed
Supported API: trueintMaximum time interval, in seconds, that the servlet container will keep this session open between client accesses
Supported API: trueOriginal session id
Supported API: trueInternet Protocol (IP) address session was last associated with
Supported API: trueThe name of the remote user, if known
Supported API: truedoubleDuration of session in seconds
Supported API: trueClient user-agent session was last associated with
Supported API: truevoidInvalidates this session then unbinds any objects bound to it
Supported API: truebooleanisNew()Whether or not the client either does not know about the session or has chosen not to join the session
Supported API: truevoidsetMaxInactiveSeconds(int maxInactiveSeconds) Maximum time interval, in seconds, that the servlet container will keep this session open between client accesses
Supported API: trueMethods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean
emailThisMBean
-
Method Details
-
getId
String getId()Session id
Supported API: true -
getOriginalId
String getOriginalId()Original session id
Supported API: true -
getAttributeNames
String[] getAttributeNames()Session attribute names
Supported API: true -
getCreationTime
Timestamp getCreationTime()Time at which session was created
Supported API: true -
getLastAccessedTime
Timestamp getLastAccessedTime()Last time at which session was accessed
Supported API: true -
getSessionDurationSeconds
double getSessionDurationSeconds()Duration of session in seconds
Supported API: true -
isNew
boolean isNew()Whether or not the client either does not know about the session or has chosen not to join the session
Supported API: true -
getRemoteUser
String getRemoteUser()The name of the remote user, if known
Supported API: true -
getRemoteAddr
String getRemoteAddr()Internet Protocol (IP) address session was last associated with
Supported API: true -
getUserAgent
String getUserAgent()Client user-agent session was last associated with
Supported API: true -
getCreatorRequestId
String getCreatorRequestId()Id of servlet request which resulted in the creation of this session
Supported API: true -
getMaxInactiveSeconds
int getMaxInactiveSeconds()Maximum time interval, in seconds, that the servlet container will keep this session open between client accesses
Supported API: true -
setMaxInactiveSeconds
void setMaxInactiveSeconds(int maxInactiveSeconds) Maximum time interval, in seconds, that the servlet container will keep this session open between client accesses
Supported API: true -
getAttributeAsString
Returns a string representation of the value of the specified session attribute.
Supported API: true- Parameters:
attributeName- Name of session attribute to target
-
invalidate
Invalidates this session then unbinds any objects bound to it
Supported API: true -
estimateTotalSize
Estimates the total memory size (in bytes) of a session by serializing it.
Supported API: true- Throws:
Exception
-
estimateAttributeSizes
Estimates the memory size (in bytes) of session attributes by performing Java serialization of those attributes; in instances where an attribute cannot be serialized -1 is returned.
Supported API: true- Throws:
Exception
-