com.threerings.presents.server
Class InvocationDispatcher<T extends InvocationMarshaller<?>>

java.lang.Object
  extended by com.threerings.presents.server.InvocationDispatcher<T>
All Implemented Interfaces:
InvocationManager.Dispatcher

public abstract class InvocationDispatcher<T extends InvocationMarshaller<?>>
extends Object
implements InvocationManager.Dispatcher

Provides the base class via which invocation service requests are dispatched.


Field Summary
 InvocationProvider provider
          The invocation provider for whom we're dispatching.
 
Constructor Summary
InvocationDispatcher()
           
 
Method Summary
protected
<K> K
cast(Object value)
          Performs type casts in a way that works for parameterized types as well as simple types.
abstract  T createMarshaller()
          Creates an instance of the appropriate InvocationMarshaller derived class for use with this dispatcher.
 void dispatchRequest(ClientObject source, int methodId, Object[] args)
          Dispatches the specified method to our provider.
 InvocationProvider getProvider()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

provider

public InvocationProvider provider
The invocation provider for whom we're dispatching.

Constructor Detail

InvocationDispatcher

public InvocationDispatcher()
Method Detail

createMarshaller

public abstract T createMarshaller()
Creates an instance of the appropriate InvocationMarshaller derived class for use with this dispatcher.


getProvider

public InvocationProvider getProvider()
Specified by:
getProvider in interface InvocationManager.Dispatcher

dispatchRequest

public void dispatchRequest(ClientObject source,
                            int methodId,
                            Object[] args)
                     throws InvocationException
Dispatches the specified method to our provider.

Specified by:
dispatchRequest in interface InvocationManager.Dispatcher
Throws:
InvocationException

cast

protected <K> K cast(Object value)
Performs type casts in a way that works for parameterized types as well as simple types.