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.
파일 보기 프로젝트 열기: pstjuste/brunet 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
XmppService XmppService

보호된 프로퍼티들

프로퍼티 타입 설명
_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