C# Class Brunet.Applications.Information

This class provides a Rpc to be used during crawls of the network. It provides base informatoin such as geographical coordinates, local end points, the type of node, and neighbors. There is also support for user's to put their own data in the return value.
Inheritance: IRpcHandler
Mostrar archivo Open project: johnynek/brunet Class Usage Examples

Public Properties

Property Type Description
UserData System.Collections.Hashtable
_so Brunet.Security.SecurityOverlord

Protected Properties

Property Type Description
_last_called System.DateTime
_node StructuredNode
_rpc RpcManager
_type String
geo_loc String
in_geoloc bool

Public Methods

Method Description
HandleRpc ( ISender caller, String method, IList arguments, object request_state ) : void

Implements IRpcHandler that is called by the RpcManager when an Rpc method requests any method with Information.*.

Info ( ) : IDictionary

This returns all the gathered information as a hashtable. Particularly useful for crawling.

Information ( StructuredNode node, String type ) : Brunet

Creates an Information object for the node and type of service provider.

Information ( StructuredNode node, String type, Brunet.Security.SecurityOverlord so ) : Brunet

Protected Methods

Method Description
GetGeoLoc ( ) : void

Used to have Geographical coordinates looked up in another thread.

GetGeoLocAsThread ( object o ) : void

Sets the geographical location of the running node.

Method Details

GetGeoLoc() protected method

Used to have Geographical coordinates looked up in another thread.
protected GetGeoLoc ( ) : void
return void

GetGeoLocAsThread() protected method

Sets the geographical location of the running node.
protected GetGeoLocAsThread ( object o ) : void
o object
return void

HandleRpc() public method

Implements IRpcHandler that is called by the RpcManager when an Rpc method requests any method with Information.*.
public HandleRpc ( ISender caller, String method, IList arguments, object request_state ) : void
caller ISender The remote caller
method String The name of the method called.
arguments IList An IList of arguments supplied
request_state object Provides a return path back to the caller.
return void

Info() public method

This returns all the gathered information as a hashtable. Particularly useful for crawling.
public Info ( ) : IDictionary
return IDictionary

Information() public method

Creates an Information object for the node and type of service provider.
public Information ( StructuredNode node, String type ) : Brunet
node StructuredNode The node where the service is to be provided
type String The name of the application providing service (example: BasicNode)
return Brunet

Information() public method

public Information ( StructuredNode node, String type, Brunet.Security.SecurityOverlord so ) : Brunet
node StructuredNode
type String
so Brunet.Security.SecurityOverlord
return Brunet

Property Details

UserData public_oe property

A hashtable providing user information.
public Hashtable,System.Collections UserData
return System.Collections.Hashtable

_last_called protected_oe property

Last time the geographical update service was called
protected DateTime,System _last_called
return System.DateTime

_node protected_oe property

The node where service is being provided.
protected StructuredNode _node
return StructuredNode

_rpc protected_oe property

The rpc service provider.
protected RpcManager _rpc
return RpcManager

_so public_oe property

public SecurityOverlord,Brunet.Security _so
return Brunet.Security.SecurityOverlord

_type protected_oe property

The name of the application providing service.
protected String _type
return String

geo_loc protected_oe property

The geographical coords for the system.
protected String geo_loc
return String

in_geoloc protected_oe property

Only want one thread of geo lookup at a time
protected bool in_geoloc
return bool