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
Afficher le fichier Open project: pstjuste/brunet Class Usage Examples

Protected Properties

Свойство Type Description
_check_state FuzzyEvent
_connection_state MCState>.Dictionary
_main_type ConnectionType
_sync Object
_ta_auth Brunet.Transport.TAAuthorizer

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode 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 méthode

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

Activate() protected méthode

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
Résultat void

ConnectionDesired() public méthode

public ConnectionDesired ( Address addr ) : bool
addr Address
Résultat bool

FailedConnectionAttempt() protected méthode

protected FailedConnectionAttempt ( Address addr ) : void
addr Address
Résultat void

LostConnection() protected méthode

protected LostConnection ( Connection con ) : void
con Connection
Résultat void

ManagedConnectionOverlord() public méthode

public ManagedConnectionOverlord ( Node node ) : System
node Node
Résultat System

ObtainedConnection() protected méthode

protected ObtainedConnection ( Connection con ) : void
con Connection
Résultat void

Set() public méthode

public Set ( Address addr ) : void
addr Address
Résultat void

Start() public méthode

public Start ( ) : void
Résultat void

Stop() public méthode

public Stop ( ) : void
Résultat void

Unset() public méthode

public Unset ( Address addr ) : void
addr Address
Résultat void

Property Details

_check_state protected_oe property

protected FuzzyEvent _check_state
Résultat FuzzyEvent

_connection_state protected_oe property

Keeps the state for all registered addresses
protected Dictionary _connection_state
Résultat MCState>.Dictionary

_main_type protected_oe static_oe property

protected static ConnectionType _main_type
Résultat ConnectionType

_sync protected_oe property

protected Object _sync
Résultat Object

_ta_auth protected_oe static_oe property

protected static TAAuthorizer,Brunet.Transport _ta_auth
Résultat Brunet.Transport.TAAuthorizer