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

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

Свойство Тип Описание
_check_state FuzzyEvent
_connection_state MCState>.Dictionary
_main_type ConnectionType
_sync Object
_ta_auth Brunet.Transport.TAAuthorizer

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

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

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

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

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

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

Once every hour, the CO will attempt to connect to remote end points in _connection_state that aren't connected
public Activate ( ) : void
Результат void

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

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

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

public ConnectionDesired ( Address addr ) : bool
addr Address
Результат bool

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

protected FailedConnectionAttempt ( Address addr ) : void
addr Address
Результат void

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

protected LostConnection ( Connection con ) : void
con Connection
Результат void

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

public ManagedConnectionOverlord ( Node node ) : System
node Node
Результат System

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

protected ObtainedConnection ( Connection con ) : void
con Connection
Результат void

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

public Set ( Address addr ) : void
addr Address
Результат void

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

public Start ( ) : void
Результат void

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

public Stop ( ) : void
Результат void

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

public Unset ( Address addr ) : void
addr Address
Результат void

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

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

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

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

Keeps the state for all registered addresses
protected Dictionary _connection_state
Результат MCState>.Dictionary

_main_type защищенное статическое свойство

protected static ConnectionType _main_type
Результат ConnectionType

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

protected Object _sync
Результат Object

_ta_auth защищенное статическое свойство

protected static TAAuthorizer,Brunet.Transport _ta_auth
Результат Brunet.Transport.TAAuthorizer