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.mule
Class RequestContext

    java.lang.Object
      org.mule.RequestContext

    public final class RequestContext

extends Object

`RequestContext` is a thread context where components can get the current event or set response properties that will be sent on the outgoing message.

RequestContext seems to be used to allow thread local mutation of events that are not otherwise available in the scope. so this is a good place to create a new thread local copy - it will be read because supporting code is expecting mutation.

Field Summary
`static boolean` | `SAFE`
`static boolean` | `UNSAFE`

Constructor Summary
`protected` | `RequestContext()` Do not instanciate.

Method Summary
`static void` | `clear()` Resets the current request context (clears all information).
`static MuleEvent` | `getEvent()`
`static MuleEventContext` | `getEventContext()`
`static ExceptionPayload` | `getExceptionPayload()`
`protected static MuleMessage` | `internalRewriteEvent(MuleMessage message, boolean safe)`
`protected static MuleEvent` | `internalSetEvent(MuleEvent event)`
`protected static MuleEvent` | `newEvent(MuleEvent event, boolean safe)`
`protected static MuleMessage` | `newMessage(MuleMessage message, boolean safe)`
`protected static void` | `resetAccessControl(Object object)`
`static MuleMessage` | `safeMessageCopy(MuleMessage message)`
`static MuleEvent` | `setEvent(MuleEvent event)` Set an event for out-of-scope thread access.
`static void` | `setExceptionPayload(ExceptionPayload exceptionPayload)` There is no unsafe version of this because it shouldn't be performance critical

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

Field Detail

### SAFE

    public static final boolean SAFE

See Also:
  Constant Field Values

### UNSAFE

    public static final boolean UNSAFE

See Also:
  Constant Field Values

Constructor Detail

### RequestContext

    protected RequestContext()

  Do not instanciate.

Method Detail

### getEventContext

    public static MuleEventContext getEventContext()

### getEvent

    public static MuleEvent getEvent()

### setEvent

    public static MuleEvent setEvent(MuleEvent event)

  Set an event for out-of-scope thread access. Safe: use by default

  Parameters:
    `event` - - the event to set
  Returns:
    A new mutable copy of the event set

### internalSetEvent

    protected static MuleEvent internalSetEvent(MuleEvent event)

### internalRewriteEvent

    protected static MuleMessage internalRewriteEvent(MuleMessage message,
                                                      boolean safe)

### clear

    public static void clear()

  Resets the current request context (clears all information).

### setExceptionPayload

    public static void setExceptionPayload(ExceptionPayload exceptionPayload)

  There is no unsafe version of this because it shouldn't be performance critical

  Parameters:
    `exceptionPayload` -

### getExceptionPayload

    public static ExceptionPayload getExceptionPayload()

### safeMessageCopy

    public static MuleMessage safeMessageCopy(MuleMessage message)

### newEvent

    protected static MuleEvent newEvent(MuleEvent event,
                                        boolean safe)

### newMessage

    protected static MuleMessage newMessage(MuleMessage message,
                                            boolean safe)

### resetAccessControl

    protected static void resetAccessControl(Object object)

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-2009 MuleSource, Inc.. All Rights Reserved.