Package wt.servlet

Interface SessionMBean

All Superinterfaces:
SelfEmailingMBean

public interface SessionMBean extends SelfEmailingMBean
Detailed information related to a single servlet engine session.

Supported API: true

Extendable: true
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    long
    Estimates the total memory size (in bytes) of a session by serializing it.
    Returns a string representation of the value of the specified session attribute.
    Session attribute names

    Supported API: true
    Time at which session was created

    Supported API: true
    Id of servlet request which resulted in the creation of this session

    Supported API: true
    Session id

    Supported API: true
    Last time at which session was accessed

    Supported API: true
    int
    Maximum time interval, in seconds, that the servlet container will keep this session open between client accesses

    Supported API: true
    Original session id

    Supported API: true
    Internet Protocol (IP) address session was last associated with

    Supported API: true
    The name of the remote user, if known

    Supported API: true
    double
    Duration of session in seconds

    Supported API: true
    Client user-agent session was last associated with

    Supported API: true
    void
    Invalidates this session then unbinds any objects bound to it

    Supported API: true
    boolean
    Whether or not the client either does not know about the session or has chosen not to join the session

    Supported API: true
    void
    setMaxInactiveSeconds(int maxInactiveSeconds)
    Maximum time interval, in seconds, that the servlet container will keep this session open between client accesses

    Supported API: true

    Methods 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

      @MBeanOperationImpact(0) String getAttributeAsString(String attributeName)
      Returns a string representation of the value of the specified session attribute.

      Supported API: true
      Parameters:
      attributeName - Name of session attribute to target
    • invalidate

      @MBeanOperationImpact(1) void invalidate()
      Invalidates this session then unbinds any objects bound to it

      Supported API: true
    • estimateTotalSize

      @MBeanOperationImpact(0) long estimateTotalSize() throws Exception
      Estimates the total memory size (in bytes) of a session by serializing it.

      Supported API: true
      Throws:
      Exception
    • estimateAttributeSizes

      @MBeanOperationImpact(0) TabularData estimateAttributeSizes() throws Exception
      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