C# Class Brunet.Connections.ManagedConnectionOverlord

This CO is administered by "user-level" applications to specify end-points that the user would like to be connected with.
When AddAddress is called, the address is added to _connection_state and ConnectTo is called on the address. If the node connects, all is fine, if not, this will attempt twice more to connect. If that fails, every hour thereafter, this CO will try 3 more times to get connected until it does or it is removed. If a Managed connection disconnects, this will automatically attempt to repair the connection by acting as if the address had just been added. All this is handled by using _connection_state as the state holder per address.
Inheritance: PolicyBasedConnectionOverlord
ファイルを表示 Open project: pstjuste/brunet Class Usage Examples

Protected Properties

Property Type Description
_check_state FuzzyEvent
_connection_state MCState>.Dictionary
_main_type ConnectionType
_sync Object
_ta_auth Brunet.Transport.TAAuthorizer

Public Methods

Method Description
Activate ( ) : void

Once every hour, the CO will attempt to connect to remote end points in _connection_state that aren't connected

ConnectionDesired ( Address addr ) : bool
ManagedConnectionOverlord ( Node node ) : System
Set ( Address addr ) : void
Start ( ) : void
Stop ( ) : void
Unset ( Address addr ) : void

Protected Methods

Method Description
Activate ( System.DateTime now ) : void

Once every hour, the CO will attempt to connect to remote end points in _connection_state that aren't connected

FailedConnectionAttempt ( Address addr ) : void
LostConnection ( Connection con ) : void
ObtainedConnection ( Connection con ) : void

Method Details

Activate() public method

Once every hour, the CO will attempt to connect to remote end points in _connection_state that aren't connected
public Activate ( ) : void
return void

Activate() protected method

Once every hour, the CO will attempt to connect to remote end points in _connection_state that aren't connected
protected Activate ( System.DateTime now ) : void
now System.DateTime
return void

ConnectionDesired() public method

public ConnectionDesired ( Address addr ) : bool
addr Address
return bool

FailedConnectionAttempt() protected method

protected FailedConnectionAttempt ( Address addr ) : void
addr Address
return void

LostConnection() protected method

protected LostConnection ( Connection con ) : void
con Connection
return void

ManagedConnectionOverlord() public method

public ManagedConnectionOverlord ( Node node ) : System
node Node
return System

ObtainedConnection() protected method

protected ObtainedConnection ( Connection con ) : void
con Connection
return void

Set() public method

public Set ( Address addr ) : void
addr Address
return void

Start() public method

public Start ( ) : void
return void

Stop() public method

public Stop ( ) : void
return void

Unset() public method

public Unset ( Address addr ) : void
addr Address
return void

Property Details

_check_state protected_oe property

protected FuzzyEvent _check_state
return FuzzyEvent

_connection_state protected_oe property

Keeps the state for all registered addresses
protected Dictionary _connection_state
return MCState>.Dictionary

_main_type protected_oe static_oe property

protected static ConnectionType _main_type
return ConnectionType

_sync protected_oe property

protected Object _sync
return Object

_ta_auth protected_oe static_oe property

protected static TAAuthorizer,Brunet.Transport _ta_auth
return Brunet.Transport.TAAuthorizer