C# Class Enyim.Membase.MessageStreamListener

Listens on a streamingUri and processes the messages
Inheritance: IDisposable
Show file Open project: xianrendzw/LightFramework.Net Class Usage Examples

Public Methods

Method Description
MessageStreamListener ( Uri urls, Func converter ) : System

Start ( ) : void

Starts processing the streaming URI

Stop ( ) : void

Stops processing

Subscribe ( Action callback ) : void
Unsubscribe ( Action callback ) : void

Protected Methods

Method Description
CreateClient ( ) : WebClientWithTimeout
Dispose ( ) : void

Private Methods

Method Description
CleanupRequests ( ) : void
CurrentDomain_DomainUnload ( object sender, EventArgs e ) : void
GetNextPoolUri ( ) : Uri>.KeyValuePair
IDisposable ( ) : void
ProcessPool ( ) : void
ReadMessages ( Uri uri ) : void
SleepUntil ( int milliseconds ) : bool

Sleeps until the time elapses. Returns false if the sleep was aborted.

Trigger ( string message ) : void
Worker ( object state ) : void

Method Details

CreateClient() protected method

protected CreateClient ( ) : WebClientWithTimeout
return WebClientWithTimeout

Dispose() protected method

protected Dispose ( ) : void
return void

MessageStreamListener() public method

public MessageStreamListener ( Uri urls, Func converter ) : System
urls System.Uri
converter Func you use this to redirect the original url into somewhere else. called only once by urls before the MessageStreamListener starts processing it
return System

Start() public method

Starts processing the streaming URI
public Start ( ) : void
return void

Stop() public method

Stops processing
public Stop ( ) : void
return void

Subscribe() public method

public Subscribe ( Action callback ) : void
callback Action
return void

Unsubscribe() public method

public Unsubscribe ( Action callback ) : void
callback Action
return void