org.jboss.remoting.marshal
Class MarshallerLoaderHandler

java.lang.Object
  extended by org.jboss.remoting.marshal.MarshallerLoaderHandler
All Implemented Interfaces:
MarshallerLoaderConstants, ServerInvocationHandler

public class MarshallerLoaderHandler
extends java.lang.Object
implements ServerInvocationHandler, MarshallerLoaderConstants

The invocation handler that receives requests for getting marshallers/unmarshallers and loading of these and any related classes to remoting client.

Author:
Tom Elrod

Field Summary
protected static org.jboss.logging.Logger log
           
 
Fields inherited from interface org.jboss.remoting.marshal.MarshallerLoaderConstants
CLASSNAME, GET_MARSHALLER_METHOD, GET_UNMARSHALLER_METHOD, LOAD_CLASS_METHOD, LOAD_MARSHALLER_METHOD, LOAD_UNMARSHALLER_METHOD
 
Constructor Summary
MarshallerLoaderHandler(java.util.List repositories)
           
 
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)
          called to handle a specific invocation.
protected  byte[] loadByteCode(java.lang.ClassLoader cl, java.lang.String classname)
          Adapted from org.jboss.mx.loading.RepositoryClassLoader.
 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
 

Field Detail

log

protected static final org.jboss.logging.Logger log
Constructor Detail

MarshallerLoaderHandler

public MarshallerLoaderHandler(java.util.List repositories)
Method Detail

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 -

invoke

public java.lang.Object invoke(InvocationRequest invocation)
                        throws java.lang.Throwable
called to handle a specific invocation. Please take care to make sure implementations are thread safe and can, and often will, receive concurrent calls on this method.

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

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 -

loadByteCode

protected byte[] loadByteCode(java.lang.ClassLoader cl,
                              java.lang.String classname)
                       throws java.lang.ClassNotFoundException,
                              java.io.IOException
Adapted from org.jboss.mx.loading.RepositoryClassLoader.

Parameters:
cl -
classname -
Returns:
Throws:
java.lang.ClassNotFoundException
java.io.IOException


Copyright 1998-2005 JBoss Inc . All Rights Reserved.