RpcListener Class Reference

#include <RpcListener.h>

Inheritance diagram for RpcListener:

BaseRpc IterativeLookup RecursiveLookup BaseApp BaseOverlay BootstrapList DHT DHTTestApp GIASearchApp I3 KBRTestApp P2pns RealWorldTestApp Scribe SimMud SimpleGameClient TierDummy XmlRpcInterface BasePastry Broose Chord Gia Kademlia OverlayDummy PubSubLobby PubSubMMOG Vast

List of all members.


Detailed Description

A Remote-Procedure-Call listener class.

Author:
Sebastian Mies

Public Member Functions

virtual ~RpcListener ()
 destructor

Protected Member Functions

virtual void handleRpcResponse (BaseResponseMessage *msg, cPolymorphic *context, int rpcId, simtime_t rtt)
 This method is called if an RPC response has been received.
virtual void handleRpcTimeout (BaseCallMessage *msg, const TransportAddress &dest, cPolymorphic *context, int rpcId, const OverlayKey &destKey)
 This method is called if an RPC timeout has been reached.

Friends

class BaseRpc

Constructor & Destructor Documentation

RpcListener::~RpcListener (  )  [virtual]

destructor

00025 {}


Member Function Documentation

void RpcListener::handleRpcResponse ( BaseResponseMessage *  msg,
cPolymorphic *  context,
int  rpcId,
simtime_t  rtt 
) [protected, virtual]

This method is called if an RPC response has been received.

Parameters:
msg The response message.
context Pointer to an optional state object. The object has to be handled/deleted by the handleRpcResponse() code
rpcId The RPC id.
rtt The Round-Trip-Time of this RPC

Reimplemented in DHT, KBRTestApp, Scribe, BootstrapList, IterativeLookup, RecursiveLookup, Broose, Chord, Kademlia, Koorde, PubSubLobby, PubSubMMOG, DHTTestApp, P2pns, SimMud, and XmlRpcInterface.

Referenced by BaseRpc::internalHandleRpcMessage(), BaseRpc::pingNode(), and BaseRpc::pingRpcResponse().

00030 {
00031     //cout << "Default RpcListener Response: from="
00032     //     << msg->getSrcNode().ip << " msg=" << *msg << endl;
00033 }

void RpcListener::handleRpcTimeout ( BaseCallMessage *  msg,
const TransportAddress dest,
cPolymorphic *  context,
int  rpcId,
const OverlayKey destKey 
) [protected, virtual]

This method is called if an RPC timeout has been reached.

Parameters:
msg The original RPC message.
dest The destination node
context Pointer to an optional state object. The object has to be handled/deleted by the handleRpcResponse() code
rpcId The RPC id.
destKey the destination OverlayKey

Reimplemented in DHT, IterativeLookup, RecursiveLookup, Broose, Chord, Kademlia, Koorde, PubSubLobby, PubSubMMOG, P2pns, and XmlRpcInterface.

Referenced by BaseRpc::internalHandleRpcMessage(), and BaseRpc::pingRpcTimeout().

00039 {
00040     //cout << "Default RpcListener Timeout: " << msg->name() << endl;
00041 }


Friends And Related Function Documentation

friend class BaseRpc [friend]


The documentation for this class was generated from the following files:

Generated on Fri Sep 19 13:05:08 2008 for ITM OverSim by  doxygen 1.5.5