org.jgroups.stack
Class RpcProtocol

java.lang.Object
  extended by org.jgroups.stack.Protocol
      extended by org.jgroups.stack.MessageProtocol
          extended by org.jgroups.stack.RpcProtocol
All Implemented Interfaces:
RequestHandler
Direct Known Subclasses:
DEADLOCK, FLUSH, GMS, RpcProtocolEXAMPLE, STABLE, TOTAL_TOKEN

public class RpcProtocol
extends MessageProtocol

Base class for group RMC peer protocols.

Author:
Bela Ban

Field Summary
 
Fields inherited from class org.jgroups.stack.MessageProtocol
_corr, members
 
Fields inherited from class org.jgroups.stack.Protocol
down_handler, down_prot, down_queue, down_thread, down_thread_prio, log, observer, props, stack, stats, up_handler, up_prot, up_queue, up_thread, up_thread_prio
 
Constructor Summary
RpcProtocol()
           
 
Method Summary
 java.lang.Object callRemoteMethod(Address dest, MethodCall method_call, int mode, long timeout)
           
 java.lang.Object callRemoteMethod(Address dest, java.lang.String method_name, int mode, long timeout)
           
 java.lang.Object callRemoteMethod(Address dest, java.lang.String method_name, java.lang.Object[] args, java.lang.Class[] types, int mode, long timeout)
           
 java.lang.Object callRemoteMethod(Address dest, java.lang.String method_name, java.lang.Object[] args, java.lang.String[] signature, int mode, long timeout)
           
 RspList callRemoteMethods(java.util.Vector dests, MethodCall method_call, int mode, long timeout)
           
 RspList callRemoteMethods(java.util.Vector dests, java.lang.String method_name, java.lang.Object[] args, java.lang.Class[] types, int mode, long timeout)
           
 RspList callRemoteMethods(java.util.Vector dests, java.lang.String method_name, java.lang.Object[] args, java.lang.String[] signature, int mode, long timeout)
           
 java.lang.String getName()
           
 java.lang.Object handle(Message req)
          Message contains MethodCall.
 boolean handleDownEvent(Event evt)
          Handle down event.
 boolean handleUpEvent(Event evt)
          Handle up event.
 
Methods inherited from class org.jgroups.stack.MessageProtocol
castMessage, down, sendMessage, start, stop, up, updateView
 
Methods inherited from class org.jgroups.stack.Protocol
destroy, downThreadEnabled, dumpStats, enableStats, getDownProtocol, getDownQueue, getProperties, getUpProtocol, getUpQueue, handleSpecialDownEvent, init, passDown, passUp, printStats, providedDownServices, providedUpServices, receiveDownEvent, receiveUpEvent, requiredDownServices, requiredUpServices, resetStats, setDownProtocol, setObserver, setProperties, setPropertiesInternal, setProtocolStack, setUpProtocol, startDownHandler, startUpHandler, statsEnabled, stopInternal, upThreadEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RpcProtocol

public RpcProtocol()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in class Protocol

callRemoteMethods

public RspList callRemoteMethods(java.util.Vector dests,
                                 java.lang.String method_name,
                                 java.lang.Object[] args,
                                 java.lang.Class[] types,
                                 int mode,
                                 long timeout)

callRemoteMethods

public RspList callRemoteMethods(java.util.Vector dests,
                                 java.lang.String method_name,
                                 java.lang.Object[] args,
                                 java.lang.String[] signature,
                                 int mode,
                                 long timeout)

callRemoteMethods

public RspList callRemoteMethods(java.util.Vector dests,
                                 MethodCall method_call,
                                 int mode,
                                 long timeout)

callRemoteMethod

public java.lang.Object callRemoteMethod(Address dest,
                                         java.lang.String method_name,
                                         int mode,
                                         long timeout)
                                  throws TimeoutException,
                                         SuspectedException
Throws:
TimeoutException
SuspectedException

callRemoteMethod

public java.lang.Object callRemoteMethod(Address dest,
                                         java.lang.String method_name,
                                         java.lang.Object[] args,
                                         java.lang.Class[] types,
                                         int mode,
                                         long timeout)
                                  throws TimeoutException,
                                         SuspectedException
Throws:
TimeoutException
SuspectedException

callRemoteMethod

public java.lang.Object callRemoteMethod(Address dest,
                                         java.lang.String method_name,
                                         java.lang.Object[] args,
                                         java.lang.String[] signature,
                                         int mode,
                                         long timeout)
                                  throws TimeoutException,
                                         SuspectedException
Throws:
TimeoutException
SuspectedException

callRemoteMethod

public java.lang.Object callRemoteMethod(Address dest,
                                         MethodCall method_call,
                                         int mode,
                                         long timeout)
                                  throws TimeoutException,
                                         SuspectedException
Throws:
TimeoutException
SuspectedException

handle

public java.lang.Object handle(Message req)
Message contains MethodCall. Execute it against *this* object and return result. Use MethodCall.invoke() to do this. Return result.

Specified by:
handle in interface RequestHandler
Overrides:
handle in class MessageProtocol

handleUpEvent

public boolean handleUpEvent(Event evt)
Handle up event. Return false if it should not be passed up the stack.

Overrides:
handleUpEvent in class MessageProtocol

handleDownEvent

public boolean handleDownEvent(Event evt)
Handle down event. Return false if it should not be passed down the stack.

Overrides:
handleDownEvent in class MessageProtocol


Copyright ? 1998-2006 Bela Ban. All Rights Reserved.