C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
XmppService XmppService

Защищенные свойства (Protected)

Свойство Тип Описание
_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

Открытые методы

Метод Описание
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.)

Защищенные методы

Метод Описание
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.

Описание методов

BasicNode() публичный Метод

Prepares a BasicNode.
public BasicNode ( NodeConfig node_config ) : System
node_config NodeConfig A node config object.
Результат System

CreateBaseEdgeListener() защищенный Метод

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
Результат EdgeListener

CreateEdgeListener() защищенный Метод

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
Результат EdgeListener

CreateNode() публичный Метод

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
Результат ApplicationNode

CreatePrivateNode() защищенный Метод

Create a PrivateNode given a shared node and a node_config.
protected CreatePrivateNode ( ApplicationNode shared, NodeConfig node_config ) : void
shared ApplicationNode
node_config NodeConfig
Результат void

GetXmlRpcUri() защищенный Метод

protected GetXmlRpcUri ( ApplicationNode appnode ) : string
appnode ApplicationNode
Результат string

OnExit() публичный Метод

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
Результат void

Run() публичный Метод

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
Результат void

StopPem() защищенный Метод

All nodes are disconnected? Stop the PathEL.
protected StopPem ( System.DateTime now ) : void
now System.DateTime
Результат void

Описание свойств

XmppService публичное свойство

public XmppService XmppService
Результат XmppService

_app_node защищенное свойство

Contains the StructuredNode and other Brunet features.
protected ApplicationNode,Brunet.Applications _app_node
Результат ApplicationNode

_fe_stop_pem защищенное свойство

protected FuzzyEvent _fe_stop_pem
Результат FuzzyEvent

_node_config защищенное свойство

The NodeConfig that defines the Brunet.Node.
protected NodeConfig,Brunet.Applications _node_config
Результат NodeConfig

_node_config_path защищенное свойство

Path to the node config (for updating it).
protected string _node_config_path
Результат string

_path защищенное свойство

The path to the NodeConfig.
protected String _path
Результат String

_rand защищенное свойство

protected Random,System _rand
Результат System.Random

_running защищенное свойство

True if the node should reincarnate itself if Node.Connect exits or throws an exception
protected bool _running
Результат bool

_shutdown защищенное свойство

protected Shutdown,Brunet.Applications _shutdown
Результат Brunet.Applications.Shutdown

_type_to_pem защищенное свойство

protected Dictionary _type_to_pem
Результат PathELManager>.Dictionary

_xrm защищенное свойство

The XmlRpc service provider.
protected XmlRpcManagerServer,Brunet.Services.XmlRpc _xrm
Результат Brunet.Services.XmlRpc.XmlRpcManagerServer