org.exolab.jms.net.connector
Class ContextInvocationHandler

java.lang.Object
  |
  +--org.exolab.jms.net.connector.ContextInvocationHandler
All Implemented Interfaces:
InvocationHandler

public class ContextInvocationHandler
extends java.lang.Object
implements InvocationHandler

InvocationHandler implementation that sets the current ConnectionContext. before delegating invocations.
This ensures Proxy instances are associated with the appropriate Connection and ConnectionFactory on deserialization.

Version:
$Revision: 1.4 $ $Date: 2005/12/01 13:44:38 $
Author:
Tim Anderson
See Also:
ConnectionContext

Constructor Summary
ContextInvocationHandler(InvocationHandler handler, ConnectionFactory resolver, ManagedConnection connection)
          Construct a new ContextInvocationHandler.
 
Method Summary
 void invoke(Invocation invocation)
          Perform an invocation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextInvocationHandler

public ContextInvocationHandler(InvocationHandler handler,
                                ConnectionFactory resolver,
                                ManagedConnection connection)
Construct a new ContextInvocationHandler.
Parameters:
handler - the handler to delegate to
resolver - the connection factory for resolving connections via their URI
connection - the connection performing the invocation
Method Detail

invoke

public void invoke(Invocation invocation)
Perform an invocation.
Specified by:
invoke in interface InvocationHandler
Parameters:
invocation - the invocation


Copyright © 1999-2007 The OpenJMS Group. All Rights Reserved.