C# Class Brunet.Messaging.SimpleSource

Holds a single subscriber per a source.
Inheritance: ISource
Exibir arquivo Open project: pstjuste/brunet Class Usage Examples

Protected Properties

Property Type Description
_sub Subscriber
_sync Object

Public Methods

Method Description
Handle ( MemBlock b, ISender retpath ) : void
SimpleSource ( ) : System

Initializes the SimpleSource

Subscribe ( IDataHandler hand, object state ) : void

Subscribes the out going data from this source to the specified handler.

Unsubscribe ( IDataHandler hand ) : void

Unsubscribes the the IDataHandler if it is the current IDatahandler.

Method Details

Handle() public method

public Handle ( MemBlock b, ISender retpath ) : void
b Brunet.Util.MemBlock
retpath ISender
return void

SimpleSource() public method

Initializes the SimpleSource
public SimpleSource ( ) : System
return System

Subscribe() public method

Subscribes the out going data from this source to the specified handler.
public Subscribe ( IDataHandler hand, object state ) : void
hand IDataHandler Data that the subscriber wants passed to the handler on each call.
state object Data that the subscriber wants passed to the handler on each call.
return void

Unsubscribe() public method

Unsubscribes the the IDataHandler if it is the current IDatahandler.
public Unsubscribe ( IDataHandler hand ) : void
hand IDataHandler An IDataHandler that wishes to remove itself as a destination for data coming from this source.
return void

Property Details

_sub protected_oe property

protected Subscriber,Brunet.Messaging _sub
return Subscriber

_sync protected_oe property

Lock to support multithreaded operations.
protected Object _sync
return Object