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.sandesha2.context
Interface ContextManager

All Known Implementing Classes:
  DummyContextManager

public interface ContextManager

This interface allows the context surrounding an invocation to be saved and restored. This is useful when we are doing inOrder processing, as the service will be dispatched by the InvokerWorker (not the original transport thread), and context may have been lost by that switch. Each ContextManager implementation should have a constructor that takes a Axis ConfigurationContext object.

Method Summary
`java.io.Serializable` | `storeContext()` Store the current threads execution context.
`java.lang.Runnable` | `wrapWithContext(java.lang.Runnable work, java.io.Serializable context)` Wrap the provided runnable with execution context that was previously stored.

Method Detail

### storeContext

    public java.io.Serializable storeContext()

  Store the current threads execution context. When embedded in an appserver, this provides a hook point to store classloaders, security context, JNDI, etc.

### wrapWithContext

    public java.lang.Runnable wrapWithContext(java.lang.Runnable work,
                                              java.io.Serializable context)

  Wrap the provided runnable with execution context that was previously stored. We expect the resulting runnable to be dispatched by a thread pool or other worker, and the wrapper ensures that the correct execution context will be applied.

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 © 2007 Apache Web Services Project. All Rights Reserved.