class XrlRouter


 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods

Protected Methods

Protected Members


Detailed Description

typedef XrlSender::Callback XrlCallback

XrlCallback

typedef XrlRouterDispatchState DispatchState

DispatchState

 XrlRouter (EventLoop& e, const char* class_name, const char* finder_address, uint16_t finder_port)
throw (InvalidAddress)

XrlRouter

 XrlRouter (EventLoop& e, const char* class_name, IPv4 finder_address, uint16_t finder_port)
throw (InvalidAddress)

XrlRouter

 ~XrlRouter ()

~XrlRouter

[virtual]

bool  add_listener (XrlPFListener* listener)

add_listener

Add a protocol family listener. When XRLs are registered through XrlRouter::finalize() they will register support for each protocol family listener added.

void  finalize ()

finalize

Start registration of XRLs that have been registered via add_handler with the Finder.

Reimplemented from XrlCmdMap.

inline bool  finalized ()

finalized

[const]

Returns: true when XRLs

bool  connected ()

connected

[const]

Returns: true if instance has established a connection to the Finder.

bool  ready ()

ready

[const]

Returns: true if instance has established a connection to the Finder, registered own XRLs, and should be considered operational.

bool  failed ()

failed

[const]

Returns: true if instance has experienced an unrecoverable error.

bool  send (const Xrl& xrl, const XrlCallback& cb)

send

Send XRL.

Parameters:

xrlXRL to be sent.
cbcallback to be dispatched with XRL result and return values.

Returns: true if XRL accepted for sending, false if insufficient resources are available.

Reimplemented from XrlSender.

bool  pending ()

pending

[const]

Returns: true if at least one XrlRouter::send() call is still pending a result.

Reimplemented from XrlSender.

bool  add_handler (const string& cmd, const XrlRecvCallback& rcb)

add_handler

Add an XRL method handler.

Parameters:

cmdXRL method path name.
rcbcallback to be dispatched when XRL method is received for invocation.

Reimplemented from XrlCmdMap.

inline EventLoop&  eventloop ()

eventloop

Returns: EventLoop used by XrlRouter instance.

inline const string&  instance_name ()

instance_name

[const]

inline const string&  class_name ()

class_name

[const]

IPv4  finder_address ()

finder_address

[const]

uint16_t  finder_port ()

finder_port

[const]

void  finder_connect_event ()

finder_connect_event

[protected virtual]

Called when Finder connection is established.

Reimplemented from FinderClientObserver.

void  finder_disconnect_event ()

finder_disconnect_event

[protected virtual]

Called when Finder disconnect occurs.

Reimplemented from FinderClientObserver.

void  finder_ready_event (const string& tgt_name)

finder_ready_event

[protected virtual]

Called when an Xrl Target becomes visible to other processes. Implementers of this method should check tgt_name corresponds to the XrlRouter::instance_name as other targets within same process may cause this method to be invoked.

Default implementation is a no-op.

Parameters:

tgt_namename of Xrl Target becoming ready.

Reimplemented from FinderClientObserver.

XrlError  dispatch_xrl (const string& method_name, const XrlArgs& inputs, XrlArgs& outputs)

dispatch_xrl

[protected const]

Reimplemented from XrlDispatcher.

void  resolve_callback (const XrlError& e, const FinderDBEntry* dbe, XrlRouterDispatchState* ds)

resolve_callback

[protected]

Resolve callback (slow path).

Called with results from asynchronous FinderClient Xrl queries.

void  send_callback (const XrlError& e, XrlArgs* reply, XrlPFSender* sender, XrlCallback user_callback)

send_callback

[protected]

Send callback (fast path).

bool  send_resolved (const Xrl& xrl, const FinderDBEntry* dbe, const XrlCallback& dispatch_cb, bool direct_call)

send_resolved

[protected]

Choose appropriate XrlPFSender and execute Xrl dispatch.

Returns: true on success, false otherwise.

void  initialize (const char* class_name, IPv4 finder_addr, uint16_t finder_port)

initialize

[protected]

EventLoop& _e

_e

[protected]

FinderClient* _fc

_fc

[protected]

FinderClientXrlTarget* _fxt

_fxt

[protected]

FinderTcpAutoConnector* _fac

_fac

[protected]

string _instance_name

_instance_name

[protected]

bool _finalized

_finalized

[protected]

list<XrlPFListener*> _listeners

_listeners

[protected]

list<XrlRouterDispatchState*> _dsl

_dsl

[protected]

list<XrlPFSender*> _senders

_senders

[protected]

static uint32_t _icnt

_icnt

[protected]


Generated by: pavlin on possum.icir.org on Wed Aug 2 15:36:00 2006, using kdoc $.