Compartir a través de


Implementing an Event Notification Plug-in

To respond to a client connection, the server and the event notification plug-in perform the following actions:

  1. The server queries the registry and initializes the plug-ins.

  2. The server calls GetHandledEvents on the IWMSEventNotificationPlugin interface to retrieve an array of events that the event notification plug-in can handle.

  3. The server calls OnEvent on the IWMSEventNotificationPlugin interface to indicate to the event notification plug-in that the client has been connected.

  4. 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.

Diagram illustrating interaction between the server, an event plug-in, and a collection of authorization plug-ins.

Dd892184.wms8_eventnotificationauthorization_guide_final(en-us,VS.85).gif

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:

  1. The server queries the registry and initializes the plug-ins.

  2. The server calls GetAuthorizedEvents on the IWMSEventAuthorizationPlugin interface to retrieve an array of client requests that the authorization plug-in can authorize.

  3. The server calls GetHandledEvents on the IWMSEventNotificationPlugin interface to retrieve an array of events that the event notification plug-in can handle.

  4. The server begins iterating through the enabled authentication plug-ins to determine whether the client can be identified.

  5. 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.

  6. The authorization plug-in calls the server using the OnAuthorizeEvent method on the IWMSEventAuthorizationCallback interface to indicate whether the request is authorized.

  7. The server informs the client whether the client is connected.

  8. The server calls OnEvent to indicate to the event notification plug-in that the client has been connected.

  9. The event notification plug-in handles the WMS_EVENT_CONNECT event.

See Also (General)

See Also (Visual Basic .NET)

See Also (C#)

See Also (C++)

  • IWMSEventAuthorizationPlugin::AuthorizeEvent

  • IWMSEventAuthorizationPlugin::GetAuthorizedEvents

  • IWMSEventAuthorizationCallback::OnAuthorizeEvent

  • IWMSEventNotificationPlugin::GetHandledEvents

  • IWMSEventNotificationPlugin::OnEvent