jgroup.relacs.gmi.protocols
Class BasicDispatcher

java.lang.Object
  extended by jgroup.relacs.gmi.protocols.BasicDispatcher
All Implemented Interfaces:
ProtocolDispatcher
Direct Known Subclasses:
Anycast, Atomic, Leadercast, Multicast

public class BasicDispatcher
extends java.lang.Object
implements ProtocolDispatcher

BasicDispatcher is the super class for all protocols, and must be subclassed.

Author:
Hein Meling

Constructor Summary
BasicDispatcher(GroupInvocationDispatcher dispatcher)
           
 
Method Summary
 InvocationResult dispatch(java.io.InputStream in)
          Invoked to dispatch a method invocation on the local endpoint or on multiple external endpoints.
static IID getIdentifier()
          Returns the invocation identifier (IID) for the currently executing method.
 void setServer(java.lang.Object server)
          The default implementation does not need access to the server object, and hence the call is ignored.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicDispatcher

public BasicDispatcher(GroupInvocationDispatcher dispatcher)
Method Detail

dispatch

public InvocationResult dispatch(java.io.InputStream in)
                          throws java.io.IOException
Description copied from interface: ProtocolDispatcher
Invoked to dispatch a method invocation on the local endpoint or on multiple external endpoints. The method may block until a result can be returned to the caller. It may also return null if problems occur, e.g. connectivity problems.

Specified by:
dispatch in interface ProtocolDispatcher
Parameters:
in - the method to invoke, encoded in the provided InputStream.
Returns:
the result of the method invocation.
Throws:
java.io.IOException - Raised if the method invocation read from the InputStream could not be executed for some reason.

setServer

public void setServer(java.lang.Object server)
The default implementation does not need access to the server object, and hence the call is ignored. Implementations that need access to the server object needs to override this method.

Specified by:
setServer in interface ProtocolDispatcher

getIdentifier

public static IID getIdentifier()
Returns the invocation identifier (IID) for the currently executing method.



Copyright © 1998-2006 The Jgroup/ARM development team. All Rights Reserved.