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

## org.apache.tapestry5.internal.services
Class ClusteredSessionImpl

    java.lang.Object
      org.apache.tapestry5.internal.services.SessionImpl
          org.apache.tapestry5.internal.services.ClusteredSessionImpl

All Implemented Interfaces:
  Session

    public class ClusteredSessionImpl

extends SessionImpl

A thin wrapper around `HttpSession`.

Since:
  5.3

Constructor Summary
`ClusteredSessionImpl(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpSession session, SessionPersistedObjectAnalyzer analyzer)`

Method Summary
`java.lang.Object` | `getAttribute(java.lang.String name)` Returns the value previously stored in the session.
`void` | `invalidate()` Invalidates this session then unbinds any objects bound to it.
`void` | `restoreDirtyObjects()` Re-stores dirty objects back into the session.
`void` | `setAttribute(java.lang.String name, java.lang.Object value)` Sets the value of an attribute.

Methods inherited from class org.apache.tapestry5.internal.services.SessionImpl
`getAttributeNames, getAttributeNames, getMaxInactiveInterval, isInvalidated, setMaxInactiveInterval`

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

Constructor Detail

### ClusteredSessionImpl

    public ClusteredSessionImpl(javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpSession session,
                                SessionPersistedObjectAnalyzer analyzer)

Method Detail

### getAttribute

    public java.lang.Object getAttribute(java.lang.String name)

  Description copied from interface: `Session`
  Returns the value previously stored in the session.

  Specified by:
    `getAttribute` in interface `Session`
  Overrides:
    `getAttribute` in class `SessionImpl`

### setAttribute

    public void setAttribute(java.lang.String name,
                             java.lang.Object value)

  Description copied from interface: `Session`
  Sets the value of an attribute. If the value is null, then the attribute is deleted.

  Specified by:
    `setAttribute` in interface `Session`
  Overrides:
    `setAttribute` in class `SessionImpl`

### invalidate

    public void invalidate()

  Description copied from interface: `Session`
  Invalidates this session then unbinds any objects bound to it.

  Specified by:
    `invalidate` in interface `Session`
  Overrides:
    `invalidate` in class `SessionImpl`

### restoreDirtyObjects

    public void restoreDirtyObjects()

  Description copied from interface: `Session`
  Re-stores dirty objects back into the session. This is necessary to support clustering, because (in most application servers) session objects are only broadcast around the cluster from setAttribute(). If a mutable session object is read and changed, those changes will be limited to a single server in the cluster, which can cause confusing application failures in the event of a failover. Does nothing if there are no changes, or the session has been invalidated.

  Specified by:
    `restoreDirtyObjects` in interface `Session`
  Overrides:
    `restoreDirtyObjects` in class `SessionImpl`
  See Also:
    `OptimizedSessionPersistedObject`, `OptimizedSessionPersistedObjectAnalyzer`, `ImmutableSessionPersistedObject`

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

Copyright © 2003-2012 The Apache Software Foundation.