class XrlRouter

XRL transmission and reception point. More...

Definition#include <xrlrouter.hh>
InheritsXrlCmdMap [public ]
Inherited byXrlStdRouter
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Public 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.

typedef XorpCallback4<void, const XrlError&, XrlRouter&, const Xrl&, XrlArgs*>::RefPtr 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.

typedef void  (*ResponseCallback) (const XrlError& e, XrlRouter& router, const Xrl& request, XrlArgs* response, void* cookie)

(*ResponseCallback)

inline bool  send (const Xrl& xrl, ResponseCallback user_callback, void* cookie = 0)

send

[Deprecated] 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.
user_callbackinvoked when the Xrl has returns or fails.
cookieto be passed to the user_callback.

Returns: true if sufficient resources available, false otherwise.

bool  pending ()

pending

[const]

Returns true if this router has any pending actions.

XrlRouter&  operator= (const XrlRouter&)

operator=

Assignment operator (unimplemented and compiler generated not wanted).

 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.


Generated by: pavlin on possum.icir.org on Wed Dec 11 16:50:42 2002, using kdoc 2.0a54+XORP.