class XrlRouter

XRL transmission and reception point. More...

Definition#include <xrl_router.hh>
InheritsXrlCmdDispatcher [public ], XrlCmdDispatcher [public ], XrlSender [public ], XrlSender [public ]
Inherited byXrlStdRouter
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Protected Methods

Protected Members


Detailed Description

An XrlRouter is responsible for sending and receiving XRL requests for entities in a XORP Router. A single process may have multiple XrlRouter objects. In this case each XrlRouter object corresponds to an independent entity within the process.

 XrlRouter (EventLoop& event_loop, const char* entity_name)

XrlRouter

Constructor for when the Finder is running on the local host.

Parameters:
event_loopthe EventLoop that the XrlRouter should associate itself with.
entity_namethe name this router will register with the Finder.

 XrlRouter (EventLoop& event_loop, const char* entity_name, const char* finder_address)

XrlRouter

Constructor for when the Finder is running on another host on the default Finder port.

Parameters:
event_loopthe EventLoop that the XrlRouter should associate itself with.
entity_namethe name this router will register with the Finder.
finder_addressthe hostname running the Finder process.

 XrlRouter (EventLoop& event_loop, const char* entity_name, const char* finder_address, uint16_t finder_port)

XrlRouter

Constructor for when the Finder is running on another host on and listening on a custom port.

Parameters:
event_loopthe EventLoop that the XrlRouter should associate itself with.
entity_namethe name this router will register with the Finder.
finder_addressthe hostname running the Finder process.
finder_portthe port the Finder process is listening on.

 ~XrlRouter ()

~XrlRouter

[virtual]

bool  add_listener (XrlPFListener* pf)

add_listener

Add a protocol family listener.

This call associates the entity name of the XrlRouter with the protocol family listener at the Finder. Other processes may then contact this XrlRouter through the Listener by resolving the entity name.

Registration may fail if the entity name of the XrlRouter object is already in use at the Finder, or if the Finder is not contactable.

Returns: true if registration succeeds, false otherwise.

void  finalize ()

finalize

Signal end of listener and additions to Xrl Command map.

Reimplemented from XrlCmdMap.

typedef XrlSender::Callback XrlCallback

XrlCallback

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

send

Dispatch an Xrl.

NB A callback must be supplied if the Xrl returns a value. If the Xrl returns nothing, a callback is only necessary if the dispatcher wants to know that the Xrl dispatch was successful and completed.

Parameters:
xrlThe Xrl to be dispatched.
callbackinvoked when the Xrl has returns or fails.

Returns: true if sufficient resources available, false otherwise.

Reimplemented from XrlSender.

bool  pending ()

pending

[const]

Returns true if this router has any pending actions.

Reimplemented from XrlSender.

XrlRouter&  operator= (const XrlRouter&)

operator=

Assignment operator (unimplemented and compiler generated not wanted).

Reimplemented from XrlCmdMap.

 XrlRouter (const XrlRouter&)

XrlRouter

Copy constructor (unimplemented and compiler generated not wanted).

inline bool  connected ()

connected

[const]

Check if XrlRouter has connection to finder, ie is operational.

Returns: true if connected to finder, false if attempting to connect to finder.

typedef XrlSender::Callback XrlCallback

XrlCallback

typedef XrlRouterDispatchState DispatchState

DispatchState

 XrlRouter (EventLoop& e, const char* entity_name, const char* finder_address = "localhost", uint16_t finder_port = 0)
throw (InvalidAddress)

XrlRouter

 ~XrlRouter ()

~XrlRouter

[virtual]

bool  add_listener (XrlPFListener* listener)

add_listener

void  finalize ()

finalize

Reimplemented from XrlCmdMap.

bool  connected ()

connected

[const]

bool  pending ()

pending

[const]

Reimplemented from XrlSender.

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

send

Reimplemented from XrlSender.

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

add_handler

Reimplemented from XrlCmdMap.

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

resolve_callback

[protected]

void  send_callback (const XrlError& e, const Xrl& xrl, XrlArgs* reply, XrlRouterDispatchState* ds)

send_callback

[protected]

void  dispose (XrlRouterDispatchState*)

dispose

[protected]

EventLoop& _e

_e

[protected]

FinderNGClient* _fc

_fc

[protected]

FinderNGClientXrlTarget* _fxt

_fxt

[protected]

FinderNGTcpAutoConnector* _fac

_fac

[protected]

uint32_t _id

_id

[protected]

uint32_t _rpend

_rpend

[protected]

uint32_t _spend

_spend

[protected]

list<XrlPFListener*> _listeners

_listeners

[protected]

list<XrlRouterDispatchState*> _dsl

_dsl

[protected]


Generated by: pavlin on possum.icir.org on Mon Mar 10 19:34:49 2003, using kdoc 2.0a54+XORP.