Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## php.java.servlet
Class HttpSessionFacade

    java.lang.Object
      php.java.servlet.HttpSessionFacade

All Implemented Interfaces:
  ISession

    public class HttpSessionFacade

extends java.lang.Object
implements ISession

Wraps the J2EE session interface

Method Summary
`void` | `destroy()` Causes this representation of the session to be invalidated an removed from its context.
`java.lang.Object` | `get(java.lang.Object ob)` Returns the object bound to the given name in the session's context layer data.
`java.util.Map` | `getAll()` Returns a map of all bindings maintained by this session.
`long` | `getCreationTime()` Returns the time when this session was created, measured in milliseconds since midnight January 1, 1970 GMT.
`javax.servlet.http.HttpServletRequest` | `getHttpServletRequest()` Returns the HttpServletRequest
`javax.servlet.http.HttpServletResponse` | `getHttpServletResponse()` Returns the ServletResponse
`long` | `getLastAccessedTime()` Returns the last time the client sent a request associated with this session, as the number of milliseconds since midnight January 1, 1970 GMT.
`javax.servlet.ServletContext` | `getServletContext()` Returns the ServletContext
`int` | `getSessionCount()` Returns the number of active sessions.
`int` | `getTimeout()` Returns the maximum time interval, in seconds, that the servlet container will keep this session open between client accesses.
`boolean` | `isNew()` A session is considered to be "new" if it has been created by the server, but the client has not yet acknowledged joining the session.
`void` | `put(java.lang.Object ob1, java.lang.Object ob2)` Binds the specified object into the session's context layer data with the given name.
`void` | `putAll(java.util.Map vars)` Copies all bindings to the session's context layer data.
`java.lang.Object` | `remove(java.lang.Object ob)` Removes the object bound to the given name in the session's context layer data.
`void` | `setTimeout(int timeout)` Specifies the time, in seconds, between client requests before the servlet container will invalidate this session.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getHttpServletRequest

    public javax.servlet.http.HttpServletRequest getHttpServletRequest()

  Returns the HttpServletRequest

  Returns:
    The HttpServletRequest.

### getServletContext

    public javax.servlet.ServletContext getServletContext()

  Returns the ServletContext

  Returns:
    The ServletContext.

### getHttpServletResponse

    public javax.servlet.http.HttpServletResponse getHttpServletResponse()

  Returns the ServletResponse

  Returns:
    The ServletResponse.

### get

    public java.lang.Object get(java.lang.Object ob)

  Description copied from interface: `ISession`
  Returns the object bound to the given name in the session's context layer data. Returns null if there is no such binding.

  Specified by:
    `get` in interface `ISession`
  Parameters:
    `ob` - the name of the binding to find
  Returns:
    the value bound to that name, or null if the binding does not exist.

### put

    public void put(java.lang.Object ob1,
                    java.lang.Object ob2)

  Description copied from interface: `ISession`
  Binds the specified object into the session's context layer data with the given name. Any existing binding with the same name is replaced.

  Specified by:
    `put` in interface `ISession`
  Parameters:
    `ob1` - the name to which the data object will be bound. This parameter cannot be null.
    `ob2` - the data object to be bound. This parameter cannot be null.

### remove

    public java.lang.Object remove(java.lang.Object ob)

  Description copied from interface: `ISession`
  Removes the object bound to the given name in the session's context layer data. Does nothing if there is no object bound to the given name.

  Specified by:
    `remove` in interface `ISession`
  Parameters:
    `ob` - the name of the object to remove

### setTimeout

    public void setTimeout(int timeout)

  Description copied from interface: `ISession`
  Specifies the time, in seconds, between client requests before the servlet container will invalidate this session. A negative time indicates the session should never timeout.

  Specified by:
    `setTimeout` in interface `ISession`
  Parameters:
    `timeout` - An integer specifying the number of seconds

### getTimeout

    public int getTimeout()

  Description copied from interface: `ISession`
  Returns the maximum time interval, in seconds, that the servlet container will keep this session open between client accesses. After this interval, the servlet container will invalidate the session. The maximum time interval can be set with the `setTimeout` method. A negative time indicates the session should never timeout.

  Specified by:
    `getTimeout` in interface `ISession`
  Returns:
    an integer specifying the number of seconds this session remains open between client requests
  See Also:
    `ISession.setTimeout(int)`

### getSessionCount

    public int getSessionCount()

  Description copied from interface: `ISession`
  Returns the number of active sessions.

  Specified by:
    `getSessionCount` in interface `ISession`
  Returns:
    # of active sessions.

### isNew

    public boolean isNew()

  Description copied from interface: `ISession`
  A session is considered to be "new" if it has been created by the server, but the client has not yet acknowledged joining the session. For example, if the server supported only cookie-based sessions and the client had completely disabled the use of cookies, then calls to JavaBridge.getSession() would always return "new" sessions.

  Specified by:
    `isNew` in interface `ISession`
  Returns:
    true if the session has been created by the server but the client has not yet acknowledged joining the session; false otherwise

### destroy

    public void destroy()

  Description copied from interface: `ISession`
  Causes this representation of the session to be invalidated an removed from its context.

  Specified by:
    `destroy` in interface `ISession`

### putAll

    public void putAll(java.util.Map vars)

  Description copied from interface: `ISession`
  Copies all bindings to the session's context layer data. Any existing binding with the same name is replaced.

  Specified by:
    `putAll` in interface `ISession`
  Parameters:
    `vars` - the map parameter cannot be null.

### getAll

    public java.util.Map getAll()

  Description copied from interface: `ISession`
  Returns a map of all bindings maintained by this session.

  Specified by:
    `getAll` in interface `ISession`
  Returns:
    the map

### getCreationTime

    public long getCreationTime()

  Description copied from interface: `ISession`
  Returns the time when this session was created, measured in milliseconds since midnight January 1, 1970 GMT.

  Specified by:
    `getCreationTime` in interface `ISession`
  Returns:
    a `long` specifying when this session was created, expressed in milliseconds since 1/1/1970 GMT

### getLastAccessedTime

    public long getLastAccessedTime()

  Description copied from interface: `ISession`
  Returns the last time the client sent a request associated with this session, as the number of milliseconds since midnight January 1, 1970 GMT.

  Actions that your application takes, such as getting or setting a value associated with the session, do not affect the access time.

  Specified by:
    `getLastAccessedTime` in interface `ISession`
  Returns:
    a `long` representing the last time the client sent a request associated with this session, expressed in milliseconds since 1/1/1970 GMT

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD