org.jgroups.stack

Class RpcProtocol

Implemented Interfaces:
RequestHandler
Known Direct 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, trace, up_handler, up_prot, up_queue, up_thread, up_thread_prio, warn

Method Summary

Object
callRemoteMethod(Address dest, String method_name, Object[] args, Class[] types, int mode, long timeout)
Object
callRemoteMethod(Address dest, String method_name, Object[] args, String[] signature, int mode, long timeout)
Object
callRemoteMethod(Address dest, String method_name, int mode, long timeout)
Object
callRemoteMethod(Address dest, MethodCall method_call, int mode, long timeout)
RspList
callRemoteMethods(Vector dests, String method_name, Object[] args, Class[] types, int mode, long timeout)
RspList
callRemoteMethods(Vector dests, String method_name, Object[] args, String[] signature, int mode, long timeout)
RspList
callRemoteMethods(Vector dests, MethodCall method_call, int mode, long timeout)
String
getName()
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, handle, handleDownEvent, handleUpEvent, sendMessage, start, stop, up, updateView

Methods inherited from class org.jgroups.stack.Protocol

destroy, down, downThreadEnabled, dumpStats, enableStats, getDownProtocol, getDownQueue, getName, getProperties, getUpProtocol, getUpQueue, handleSpecialDownEvent, init, isTrace, isWarn, passDown, passUp, printStats, providedDownServices, providedUpServices, receiveDownEvent, receiveUpEvent, requiredDownServices, requiredUpServices, resetStats, setDownProtocol, setObserver, setProperties, setPropertiesInternal, setProtocolStack, setTrace, setUpProtocol, setWarn, start, startDownHandler, startUpHandler, statsEnabled, stop, stopInternal, up, upThreadEnabled

Method Details

callRemoteMethod

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

callRemoteMethod

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

callRemoteMethod

public Object callRemoteMethod(Address dest,
                               String method_name,
                               int mode,
                               long timeout)
            throws TimeoutException,
                   SuspectedException

callRemoteMethod

public Object callRemoteMethod(Address dest,
                               MethodCall method_call,
                               int mode,
                               long timeout)
            throws TimeoutException,
                   SuspectedException

callRemoteMethods

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

callRemoteMethods

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

callRemoteMethods

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

getName

public String getName()
Overrides:
getName in interface Protocol

handle

public 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 interface MessageProtocol

handleDownEvent

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

handleUpEvent

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

Copyright B) 1998-2005 Bela Ban. All Rights Reserved.