org.globus.axis.utils
Class MessageContextHelper

java.lang.Object
  extended byorg.globus.axis.utils.MessageContextHelper

public class MessageContextHelper
extends java.lang.Object

An utility class to help associate a specific MessageContext with an arbitrary thread.
Usage:

 MessageContextHelper helper = new MessageContextHelper(newCtx);
 helper.set();
 try {
   // call code that needs MessageContext associated with the thread
 } finnally {
   helper.restore();
 }
 


Nested Class Summary
static class MessageContextHelper.HelperAxisEngine
           
 
Field Summary
private  org.apache.axis.MessageContext newCtx
           
private  org.apache.axis.MessageContext oldCtx
           
 
Constructor Summary
MessageContextHelper(org.apache.axis.MessageContext newCtx)
           
 
Method Summary
 void set()
          Saves the old MessageContext associated with the current thread and associates a new context with the current thread.
 void unset()
          Restores the MessageContext that was previously associated with the current thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

newCtx

private org.apache.axis.MessageContext newCtx

oldCtx

private org.apache.axis.MessageContext oldCtx
Constructor Detail

MessageContextHelper

public MessageContextHelper(org.apache.axis.MessageContext newCtx)
Method Detail

set

public void set()
Saves the old MessageContext associated with the current thread and associates a new context with the current thread.


unset

public void unset()
Restores the MessageContext that was previously associated with the current thread.