C# Class Brunet.Messaging.Subscriber

显示文件 Open project: pstjuste/brunet Class Usage Examples

Public Properties

Property Type Description
Handler IDataHandler
State object

Public Methods

Method Description
Equals ( object o ) : bool

Can look up subscriptions based only on Handler equality.

GetHashCode ( ) : int

Returns the Handlers hashcode.

Handle ( MemBlock b, ISender retpath ) : void

This is called to pass data to the subscribed handler.

Subscriber ( IDataHandler dh, object state ) : System

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

Method Details

Equals() public method

Can look up subscriptions based only on Handler equality.
public Equals ( object o ) : bool
o object The object to compare for equality.
return bool

GetHashCode() public method

Returns the Handlers hashcode.
public GetHashCode ( ) : int
return int

Handle() public method

This is called to pass data to the subscribed handler.
public Handle ( MemBlock b, ISender retpath ) : void
b Brunet.Util.MemBlock The data being passed.
retpath ISender A sender which can send data back to the source of B.
return void

Subscriber() public method

Subscribes the out going data from this source to the specified handler.
public Subscriber ( IDataHandler dh, object state ) : System
dh 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 System

Property Details

Handler public_oe property

The handler of the subscriber who will receive data.
public IDataHandler Handler
return IDataHandler

State public_oe property

Data that the subscriber wants passed to the handler on each call.
public object State
return object