org.jboss.remoting.transporter
Class TransporterHandler

java.lang.Object
  extended by org.jboss.remoting.transporter.TransporterHandler
All Implemented Interfaces:
ServerInvocationHandler

public class TransporterHandler
extends java.lang.Object
implements ServerInvocationHandler

Simple handler that uses reflection to make calls on target POJO (as supplied in the constructor) when receive invocation requests.

Author:
Tom Elrod

Constructor Summary
TransporterHandler(java.lang.Object target)
           
 
Method Summary
 void addListener(InvokerCallbackHandler callbackHandler)
          Adds a callback handler that will listen for callbacks from the server invoker handler.
 java.lang.Object invoke(InvocationRequest invocation)
          Takes the invocation request, which should have a internal parameter of NameBasedInvocation, and convert that to a method call on the target POJO (using reflection).
 void removeListener(InvokerCallbackHandler callbackHandler)
          Removes the callback handler that was listening for callbacks from the server invoker handler.
 void setInvoker(ServerInvoker invoker)
          set the invoker that owns this handler
 void setMBeanServer(javax.management.MBeanServer server)
          set the mbean server that the handler can reference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.remoting.ServerInvocationHandler
toString
 

Constructor Detail

TransporterHandler

public TransporterHandler(java.lang.Object target)
Method Detail

invoke

public java.lang.Object invoke(InvocationRequest invocation)
                        throws java.lang.Throwable
Takes the invocation request, which should have a internal parameter of NameBasedInvocation, and convert that to a method call on the target POJO (using reflection). Then return the Object returned from the method call on the target POJO.

Specified by:
invoke in interface ServerInvocationHandler
Parameters:
invocation -
Returns:
Throws:
java.lang.Throwable

setMBeanServer

public void setMBeanServer(javax.management.MBeanServer server)
set the mbean server that the handler can reference

Specified by:
setMBeanServer in interface ServerInvocationHandler
Parameters:
server -

setInvoker

public void setInvoker(ServerInvoker invoker)
set the invoker that owns this handler

Specified by:
setInvoker in interface ServerInvocationHandler
Parameters:
invoker -

addListener

public void addListener(InvokerCallbackHandler callbackHandler)
Adds a callback handler that will listen for callbacks from the server invoker handler.

Specified by:
addListener in interface ServerInvocationHandler
Parameters:
callbackHandler -

removeListener

public void removeListener(InvokerCallbackHandler callbackHandler)
Removes the callback handler that was listening for callbacks from the server invoker handler.

Specified by:
removeListener in interface ServerInvocationHandler
Parameters:
callbackHandler -


Copyright 1998-2005 JBoss Inc . All Rights Reserved.