C# Class Brunet.Applications.BasicNode

BasicNode provides the core Brunet features in a deployable model the inputs are a xml config file called NodeConfig, which specifies which if any services to deploy. Other projects should inherit this as their base class rather than implementing their own interfaces to Brunet.
Afficher le fichier Open project: pstjuste/brunet Class Usage Examples

Méthodes publiques

Свойство Type Description
XmppService XmppService

Protected Properties

Свойство Type Description
_app_node ApplicationNode
_fe_stop_pem FuzzyEvent
_node_config NodeConfig
_node_config_path string
_path String
_rand System.Random
_running bool
_shutdown Brunet.Applications.Shutdown
_type_to_pem PathELManager>.Dictionary
_xrm Brunet.Services.XmlRpc.XmlRpcManagerServer

Méthodes publiques

Méthode Description
BasicNode ( NodeConfig node_config ) : System

Prepares a BasicNode.

CreateNode ( NodeConfig node_config ) : ApplicationNode

Creates an ApplicationNode and prepares it for connection to the overlay. For historical reasons it is linked to _node, _dht, _rpc_dht, and _bso.

OnExit ( ) : void

This method is registered as a delegate to Shutdown.OnExit and will be called when ctrl-c is pressed by the user. This stops services, prevents the node from reincarnating, and then disconnects the node.

Run ( ) : void

This should be called by the Main after all the setup is done this passes control to the _node and won't return until the program is exiting. (It is synchronous.)

Méthodes protégées

Méthode Description
CreateBaseEdgeListener ( NodeConfig el_info, ApplicationNode node, IEnumerable addresses ) : EdgeListener

Given a EdgeListener info and a list of addresses to advertise, returns an EdgeListener.

CreateEdgeListener ( NodeConfig el_info, ApplicationNode node, IEnumerable addresses ) : EdgeListener

Given an EdgeListener info, attempts to find a PathEL, if one is not found, creates a base EL and wraps it with a PathEL.

CreatePrivateNode ( ApplicationNode shared, NodeConfig node_config ) : void

Create a PrivateNode given a shared node and a node_config.

GetXmlRpcUri ( ApplicationNode appnode ) : string
StopPem ( System.DateTime now ) : void

All nodes are disconnected? Stop the PathEL.

Method Details

BasicNode() public méthode

Prepares a BasicNode.
public BasicNode ( NodeConfig node_config ) : System
node_config NodeConfig A node config object.
Résultat System

CreateBaseEdgeListener() protected méthode

Given a EdgeListener info and a list of addresses to advertise, returns an EdgeListener.
protected CreateBaseEdgeListener ( NodeConfig el_info, ApplicationNode node, IEnumerable addresses ) : EdgeListener
el_info NodeConfig
node ApplicationNode
addresses IEnumerable
Résultat EdgeListener

CreateEdgeListener() protected méthode

Given an EdgeListener info, attempts to find a PathEL, if one is not found, creates a base EL and wraps it with a PathEL.
protected CreateEdgeListener ( NodeConfig el_info, ApplicationNode node, IEnumerable addresses ) : EdgeListener
el_info NodeConfig
node ApplicationNode
addresses IEnumerable
Résultat EdgeListener

CreateNode() public méthode

Creates an ApplicationNode and prepares it for connection to the overlay. For historical reasons it is linked to _node, _dht, _rpc_dht, and _bso.
public CreateNode ( NodeConfig node_config ) : ApplicationNode
node_config NodeConfig
Résultat ApplicationNode

CreatePrivateNode() protected méthode

Create a PrivateNode given a shared node and a node_config.
protected CreatePrivateNode ( ApplicationNode shared, NodeConfig node_config ) : void
shared ApplicationNode
node_config NodeConfig
Résultat void

GetXmlRpcUri() protected méthode

protected GetXmlRpcUri ( ApplicationNode appnode ) : string
appnode ApplicationNode
Résultat string

OnExit() public méthode

This method is registered as a delegate to Shutdown.OnExit and will be called when ctrl-c is pressed by the user. This stops services, prevents the node from reincarnating, and then disconnects the node.
public OnExit ( ) : void
Résultat void

Run() public méthode

This should be called by the Main after all the setup is done this passes control to the _node and won't return until the program is exiting. (It is synchronous.)
public Run ( ) : void
Résultat void

StopPem() protected méthode

All nodes are disconnected? Stop the PathEL.
protected StopPem ( System.DateTime now ) : void
now System.DateTime
Résultat void

Property Details

XmppService public_oe property

public XmppService XmppService
Résultat XmppService

_app_node protected_oe property

Contains the StructuredNode and other Brunet features.
protected ApplicationNode,Brunet.Applications _app_node
Résultat ApplicationNode

_fe_stop_pem protected_oe property

protected FuzzyEvent _fe_stop_pem
Résultat FuzzyEvent

_node_config protected_oe property

The NodeConfig that defines the Brunet.Node.
protected NodeConfig,Brunet.Applications _node_config
Résultat NodeConfig

_node_config_path protected_oe property

Path to the node config (for updating it).
protected string _node_config_path
Résultat string

_path protected_oe property

The path to the NodeConfig.
protected String _path
Résultat String

_rand protected_oe property

protected Random,System _rand
Résultat System.Random

_running protected_oe property

True if the node should reincarnate itself if Node.Connect exits or throws an exception
protected bool _running
Résultat bool

_shutdown protected_oe property

protected Shutdown,Brunet.Applications _shutdown
Résultat Brunet.Applications.Shutdown

_type_to_pem protected_oe property

protected Dictionary _type_to_pem
Résultat PathELManager>.Dictionary

_xrm protected_oe property

The XmlRpc service provider.
protected XmlRpcManagerServer,Brunet.Services.XmlRpc _xrm
Résultat Brunet.Services.XmlRpc.XmlRpcManagerServer