Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2008 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.portlet
Class AsyncContentContext

    java.lang.Object
      com.bea.portlet.AsyncContentContext

    public final class AsyncContentContext

extends Object

Allows async content to be disabled for a limited scope.

### Preferred Usage

To use `AsyncContentContext` to disable async content for a limited scope, surround the code for which async content should be disabled with this code:

        try {
           AsyncContentContext.push(request).setAsyncContentDisabled(true);

              // ... code to execute with async content disabled ...

        }
        finally {
           AsyncContentContext.pop(request);
        }

Method Summary
`static boolean` | `isAsyncContentDisabled(javax.servlet.ServletRequest request)` Determine if async content is disabled for the given request.
`static void` | `pop(javax.servlet.ServletRequest request)` Pop the most recent `AsyncContentContext` from the given `ServletRequest`.
`static AsyncContentContext` | `push(javax.servlet.ServletRequest request)` Push a new `AsyncContentContext` into the given request.
`AsyncContentContext` | `setAsyncContentDisabled(boolean asyncContentDisabled)` Change if async content is disabled.
`AsyncContentContext` | `unsetAsyncContentDisabled()` Change if async content is disabled.

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

Method Detail

### push

    public static AsyncContentContext push(javax.servlet.ServletRequest request)

  Push a new `AsyncContentContext` into the given request.

  Parameters
    `request` - the request
  Returns
    the `AsyncContentContext`

### pop

    public static void pop(javax.servlet.ServletRequest request)

  Pop the most recent `AsyncContentContext` from the given `ServletRequest`.

  If the most recent `AsyncContentContext` is not of the specified type, then an `IllegalStateException` is thrown.

  Parameters
    `request` - the `ServletRequest`

### isAsyncContentDisabled

    public static boolean isAsyncContentDisabled(javax.servlet.ServletRequest request)

  Determine if async content is disabled for the given request.

  Returns
    `true` if async content is disabled

### setAsyncContentDisabled

    public AsyncContentContext setAsyncContentDisabled(boolean asyncContentDisabled)

  Change if async content is disabled.

  Parameters
    `asyncContentDisabled` - indicates if async content is disabled
  Returns
    `this`

### unsetAsyncContentDisabled

    public AsyncContentContext unsetAsyncContentDisabled()

  Change if async content is disabled.

  Returns
    `this`

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

Copyright © 2008 BEA Systems, Inc. All Rights Reserved