[This is preliminary documentation and is subject to change.]
ContentStudio.Document.Subscription.EventHandlerSubscriptionEventHandlerBase
ContentStudio.Document.Subscription.EventHandlerMailSubscriptionHandler
Namespace: ContentStudio.Document.Subscription.EventHandler
Assembly: CSSubscriptionEventHandler (in CSSubscriptionEventHandler.dll) Version: 1.0.0.0 (1.0.0.0)
The SubscriptionEventHandlerBase type exposes the following members.
Name | Description | |
---|---|---|
SubscriptionEventHandlerBase |
Initializes a new instance of the SubscriptionEventHandlerBase class.
|
Name | Description | |
---|---|---|
ConnectionId |
Gets or sets the connection id passed in to the
EventHandler(Int32, Int32, String, String, ICSCredentialsContainer, Int32, String) method.
| |
Content | Obsolete.
Gets the content passed in the content argument of the
EventHandler(Int32, Int32, String, String, ICSCredentialsContainer, Int32, String) method.
| |
Credentials |
Gets the credentials to use when communicating with the message server.
The data was passed in the content argument of the
EventHandler(Int32, Int32, String, String, ICSCredentialsContainer, Int32, String) method inc combination
with the xml passed in.
| |
EventId |
Gets the event identifier passed in to the
EventHandler(Int32, Int32, String, String, ICSCredentialsContainer, Int32, String) method.
| |
ExtendedProperties |
Gets or a collections of extended properties that was sent to the event handler.
| |
FailedCount |
Gets or sets the number of subscribers to whom a message was not sent for some reason.
| |
Logger |
Gets or sets the logger object that is used when logging to a syslog.
| |
Properties |
Gets the regular properties that was passed in to the event handler.
| |
SendCount |
Gets or gets the number of sent messages.
| |
SessionId |
Gets the numeric value of the session used by the Service Manager when it communicates with Content Studio.
| |
StatusText |
Gets the status text that is sent back to the Service Manager after that the event handler has finished.
For success this value can be "OK" or "Success". The status can also be an informative message that
should be logged in the Content Studio event log.
| |
Subscribers |
Gets or gets the number of found subscribers.
| |
SubscriptionTypeHandled |
Gets or sets the subscription type handled.
| |
TimeOut |
Gets or sets the time out passed in to the
EventHandler(Int32, Int32, String, String, ICSCredentialsContainer, Int32, String) method.
|
Name | Description | |
---|---|---|
CreateLogger |
Creates the logger object that logs events to its implementation of the
ISysLogWriter interface.
| |
CreateMessage |
When implemented in derived class creates a message to be sent out to subscribers.
This method gets called once from the event handler.
| |
Dispose |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
| |
Dispose(Boolean) |
Releases unmanaged and - optionally - managed resources
| |
Equals | (Inherited from Object.) | |
EventHandler |
Defines an asyncronous Content Studio event handler.
This method gets called by Content Studio Service Manager when it needs to handle
a subscription related event.
| |
Finalize |
Releases unmanaged resources and performs other cleanup operations before the
SubscriptionEventHandlerBase is reclaimed by garbage collection.
(Overrides ObjectFinalize.) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
ReadData |
Gets a list of subscribers that should receive messages.
| |
SendMessage |
When implemented in derived classes sends the message to the specified subscriber.
| |
SetStatus |
Sets the status text that is sent back to the Service Manager after that the event handler has finished.
| |
ToString | (Inherited from Object.) | |
ValidateEvent |
When implemented in derived classes, checks if the the event passed in is valid for this
implementation.
| |
ValidateMessage |
Validates a message before it is sent to a single subscriber.
| |
ValidateSubscriber |
Validates the subscriber to see if he/she should receive the message.
| |
WriteToLog |
Writes a message to the logger provided that a logger exists.
|
Name | Description | |
---|---|---|
Finished |
Occurs when the event handler has done its job.
| |
Initialized |
Occurs when the event handler has parsed and read all of the passed in even handler arguments
but before the actual job has started.
A developer can subscribe to this event to do private initialization specific to the current implementation.
|
A Content Studio Subscription event handler must implement the ICSAsyncEventHandler interface. When a subscription event occurs Content Studio Service Manager calls the EventHandler(Int32, Int32, String, String, ICSCredentialsContainer, Int32, String) method that starts the actual subscription handling process. During this process the SubscriptionEventHandlerBase calls a number of methods and raises events that enables derived classes to implement different scenarios.
The methods are called and events are fired in the following order:
- ValidateEvent(Int32)
- Derived classes override this method to specify which type of event can be handled by the handler.
- CreateLogger
- Creates the log specified by the ContentStudio.ServiceManager.Logging.ISysLogWriter member if the extended properties passed in. Normally there is no reason to override this method.
- Initialized
- Subscribe to this event if you like to do your own initialization.
- CreateMessage
- In this abstract (MustInherit in Visual Basic) method the message to send is created. Deriving classes creates a message to send in this method. Typically this message should be a Content Studio document but developers can create any message to by overriding this method.
- ReadData(Int32)
- This method reads a list of subscribers that should receive a message. The data is read in pages and is called until no more data is returned.
- ValidateSubscriber(SubscriptionInformation)
- This method gets called for each subscriber returned by ReadData(Int32). Developers override this method whenever there is a need to apply custom validating for each found subscriber.
- ValidateMessage(SubscriptionInformation)
- This method is called for each subscriber returned by ReadData(Int32). In this method implementations can process the message individually for each subscriber returned by ReadData(Int32).
- SendMessage(SubscriptionInformation)
- When the subscriber and her message is validated the message is sent out. Derived class implements their own send operation be it a regular mail message or some other message system, such as SMS or fax.
- Finished
- This event is fired at the end when the send operation has finished successfully.