C# 클래스 Westwind.MessageQueueing.Scheduler

A generic scheduling service that runs on a background thread and fires events in a given check frequency
상속: IDisposable
파일 보기 프로젝트 열기: RickStrahl/Westwind.QueueMessageManager

공개 메소드들

메소드 설명
AddItem ( SchedulerItem item ) : void
AddItem ( byte data, string type ) : void
AddItem ( object item ) : void

Adds an item to the queue.

AddItem ( string textData, string type ) : void
Dispose ( ) : void
GetNextItem ( ) : object

Returns the next queued item or null on failure.

PingServer ( ) : void

Optional routine that pings a Url on the server to keep the server alive. Use this to avoid IIS shutting down your AppPools

Start ( ) : void

Starts the background Thread processing

Start ( int checkFrequency ) : void

Starts the background thread processing

Stop ( ) : void

Causes the processing to stop. If the operation is still active it will stop after the current message processing completes

보호된 메소드들

메소드 설명
OnError ( Exception ex ) : void

This method is called if an error occurs during processing of the request. Override this method in your own implementation to provide for error logging or other handling of an error that occurred in processing. Ideally this shouldn't be necessary - your OnexecuteScheduledEvent code should handle any errors internally and provide for its own logging mechanism but this is here as an additional point of control.

OnExecuteScheduledEvent ( ) : void

Handles a scheduled operation. Checks to see if an event handler is set up and if so calls it. This method can also be overrriden in a subclass to implemnent custom functionality.

비공개 메소드들

메소드 설명
Run ( ) : void

Runs the actual processing loop by checking the mail box

메소드 상세

AddItem() 공개 메소드

public AddItem ( SchedulerItem item ) : void
item SchedulerItem
리턴 void

AddItem() 공개 메소드

public AddItem ( byte data, string type ) : void
data byte
type string
리턴 void

AddItem() 공개 메소드

Adds an item to the queue.
public AddItem ( object item ) : void
item object
리턴 void

AddItem() 공개 메소드

public AddItem ( string textData, string type ) : void
textData string
type string
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

GetNextItem() 공개 메소드

Returns the next queued item or null on failure.
public GetNextItem ( ) : object
리턴 object

OnError() 보호된 메소드

This method is called if an error occurs during processing of the request. Override this method in your own implementation to provide for error logging or other handling of an error that occurred in processing. Ideally this shouldn't be necessary - your OnexecuteScheduledEvent code should handle any errors internally and provide for its own logging mechanism but this is here as an additional point of control.
protected OnError ( Exception ex ) : void
ex System.Exception Exception occurred during item execution
리턴 void

OnExecuteScheduledEvent() 보호된 메소드

Handles a scheduled operation. Checks to see if an event handler is set up and if so calls it. This method can also be overrriden in a subclass to implemnent custom functionality.
protected OnExecuteScheduledEvent ( ) : void
리턴 void

PingServer() 공개 메소드

Optional routine that pings a Url on the server to keep the server alive. Use this to avoid IIS shutting down your AppPools
public PingServer ( ) : void
리턴 void

Start() 공개 메소드

Starts the background Thread processing
public Start ( ) : void
리턴 void

Start() 공개 메소드

Starts the background thread processing
public Start ( int checkFrequency ) : void
checkFrequency int Frequency that checks are performed in seconds
리턴 void

Stop() 공개 메소드

Causes the processing to stop. If the operation is still active it will stop after the current message processing completes
public Stop ( ) : void
리턴 void