Implementing an Event Notification Plug-in
Previous | Next |
Implementing an Event Notification Plug-in
To respond to a client connection, the server and the event notification plug-in perform the following actions:
- The server queries the registry and initializes the plug-ins.
- The server calls GetHandledEvents on the IWMSEventNotificationPlugin interface to retrieve an array of events that the event notification plug-in can handle.
- The server calls OnEvent on the IWMSEventNotificationPlugin interface to indicate to the event notification plug-in that the client has been connected.
- The event notification plug-in handles the WMS_EVENT_CONNECT event.
If authorization plug-ins have been enabled, the interaction between the server, the event notification, and the authorization plug-ins is more complex. This is illustrated by the following diagram and discussion.
To authorize a client connection by using an authorization plug-in, and to respond to it by using an event notification plug-in, the server and plug-ins perform the following actions:
- The server queries the registry and initializes the plug-ins.
- The server calls GetAuthorizedEvents on the IWMSEventAuthorizationPlugin interface to retrieve an array of client requests that the authorization plug-in can authorize.
- The server calls GetHandledEvents on the IWMSEventNotificationPlugin interface to retrieve an array of events that the event notification plug-in can handle.
- The server begins iterating through the enabled authentication plug-ins to determine whether the client can be identified.
- If the client can be authenticated, the server calls AuthorizeEvent on the IWMSEventAuthorizationPlugin interface to tell the authorization plug-in that the client requested a connection.
- The authorization plug-in calls the server using the OnAuthorizeEvent method on the IWMSEventAuthorizationCallback interface to indicate whether the request is authorized.
- The server informs the client whether the client is connected.
- The server calls OnEvent to indicate to the event notification plug-in that the client has been connected.
- The event notification plug-in handles the WMS_EVENT_CONNECT event.
See Also (General)
See Also (Visual Basic .NET)
- IWMSEventAuthorizationCallback.OnAuthorizeEvent (Visual Basic .NET)
- IWMSEventAuthorizationPlugin.AuthorizeEvent (Visual Basic .NET)
- IWMSEventAuthorizationPlugin.GetAuthorizedEvents (Visual Basic .NET)
- IWMSEventNotificationPlugin.GetHandledEvents (Visual Basic .NET)
- IWMSEventNotificationPlugin.OnEvent (Visual Basic .NET)
See Also (C#)
- IWMSEventAuthorizationCallback.OnAuthorizeEvent (C#)
- IWMSEventAuthorizationPlugin.AuthorizeEvent (C#)
- IWMSEventAuthorizationPlugin.GetAuthorizedEvents (C#)
- IWMSEventNotificationPlugin.GetHandledEvents (C#)
- IWMSEventNotificationPlugin.OnEvent (C#)
See Also (C++)
- IWMSEventAuthorizationPlugin::AuthorizeEvent
- IWMSEventAuthorizationPlugin::GetAuthorizedEvents
- IWMSEventAuthorizationCallback::OnAuthorizeEvent
- IWMSEventNotificationPlugin::GetHandledEvents
- IWMSEventNotificationPlugin::OnEvent
Previous | Next |