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

## com.bea.wlcp.wlng.api.plugin.context
Class RequestContextManager

    java.lang.Object
      com.bea.wlcp.wlng.api.plugin.context.RequestContextManager

public class RequestContextManager
extends Object

This class is used to create, get and remove the RequestContext object per thread.

  Copyright © 2008 Oracle Corporation Systems, Inc. All Rights Reserved.

Constructor Summary
`RequestContextManager()`

Method Summary
`static void` | `addListener(RequestContextListener listener)` Adds a RequestContext listener to the manager.
`static void` | `clearCurrent()` Removes the RequestContext object of the current thread
`static RequestContext` | `createCurrent()` Creates a RequestContext for the current thread.
`static RequestContext` | `getCurrent()` Gets the current RequestContext object from the current thread
`static boolean` | `hasContext()` Returns true if a current context exists
`static void` | `notifyListener(RequestContextListenerEvent event)` Notify the RequestContext listeners of an event.
`static void` | `notifyListener(RequestContextListenerEvent event, RequestContextListenerData data)` Notify the RequestContext listeners of an event.
`static void` | `removeListener(RequestContextListener listener)` Removes a RequestContext listener from the manager.

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

Constructor Detail

### RequestContextManager

    public RequestContextManager()

Method Detail

### addListener

    public static void addListener(RequestContextListener listener)

  Adds a RequestContext listener to the manager. This listener will be invoked when particular events happen (see RequestContextListenerEvent enum class).

  Parameters:
    `listener` - The listener to add

### clearCurrent

    public static void clearCurrent()

  Removes the RequestContext object of the current thread

### createCurrent

    public static RequestContext createCurrent()

  Creates a RequestContext for the current thread. This method is usually invoked by an aspect at the north/south interface.

  Returns:
    The newly created RequestContext object

### getCurrent

    public static RequestContext getCurrent()

  Gets the current RequestContext object from the current thread

  Returns:
    RequestContext

### hasContext

    public static boolean hasContext()

  Returns true if a current context exists

  Returns:
    true if a current context exists

### notifyListener

    public static void notifyListener(RequestContextListenerEvent event)

  Notify the RequestContext listeners of an event. This method is not synchronized for performance reason. It is assumed that adding/removing listeners only happens at startup/shutdown, before any traffic is run.

  Parameters:
    `event` - The event of event

### notifyListener

    public static void notifyListener(RequestContextListenerEvent event,
                                      RequestContextListenerData data)

  Notify the RequestContext listeners of an event. This method is not synchronized for performance reason. It is assumed that adding/removing listeners only happens at startup/shutdown, before any traffic is run.

  Parameters:
    `event` - The event of event
    `data` - The request context listener data

### removeListener

    public static void removeListener(RequestContextListener listener)

  Removes a RequestContext listener from the manager.

  Parameters:
    `listener` - The listener to remove

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