WS-Notification:客户机应用程序在运行时的交互方式

应用程序通过 WS-Notification 标准中定义的 Web Service 消息交换来与通知代理进行交互。

下图中显示了 NotificationBroker、PublisherRegistrationManager、NotificationProducer、SubscriptionManager 和 NotificationConsumer 这五种 WS-Notification 角色之间的关系。

图 1. 角色之间的关系在此图中,NotificationBroker 角色使用 PublisherRegistrationManager 角色,NotificationProducer 角色使用 SubscriptionManager 角色。NotificationConsumer 角色不使用另一个角色。

这些角色与三种 Web Service 端口类型相对应(应用程序可以对那些端口类型调用操作):

应用程序的第一个访问点始终是通知代理端口类型。应用程序对此端点调用操作以创建预订、将通知事件插入系统或者将它们自己注册为发布者。SubscriptionManager 和 PublisherRegistrationManager 对象与 NotificationBroker 共同提供全面的功能。

对 SubscriptionManager 和 PublisherRegistrationManager 的引用作为 NotificationBroker 调用结果返回到应用程序。具体而言,对 SubscriptionManager 的引用是从 NotificationBroker 的预订操作返回的。这使应用程序能够在预订资源创建后影响该资源的生命周期。同样,对发布者注册管理器的引用是从通知代理的注册发布者操作返回的,这使应用程序能够影响发布者注册的生命周期。

由于应用程序完全通过 WS-Notification 消息交换来与代理进行交互,因此应用程序并不知道 NotificationBroker、SubscriptionManager 和 PublisherRegistrationManager 服务是由 WebSphere® Application Server 提供的。这意味着,通过修改应用程序用来进行 Web Service 调用的端点地址,可以将应用程序修改为使用任何 NotificationBroker 提供程序,例如由另一供应商提供的提供程序或另一服务器上的提供程序。

WS-Notification 定义了下列角色,应用程序可以使用这些角色来与通知代理进行交互。这些角色定义了应用程序的用例。

Publisher
Publisher 将通知消息发送到代理或通知使用者以便将事件通知插入到系统中。Publisher 应用程序不公开 Web Service 端点。
Subscriber
Subscriber 代替 NotificationConsumer 应用程序(这可能是另一个应用程序)进行预订。Subscriber 应用程序公开 Web Service 端点。
NotificationConsumer
NotificationConsumer 接收通知消息:
  • “Push Consumer”应用程序公开 Web Service 端点,Broker 和 NotificationProducer 可以异步方式将通知消息发送至该端点。
  • “Pull Consumer”应用程序对 Broker 和 NotificationProducer 调用操作,以接收通知消息。
NotificationProducer
NotificationProducer 将通知消息发送到已注册的 NotificationBroker 和 NotificationConsumer。NotificationProducer 应用程序公开 Web Service 端点以支持预订操作,并且提供了对 NotificationProducer 资源属性的访问权。
基于需求的发布程序
基于需求的发布程序是发布程序应用程序,它像 NotificationProducer 那样公开 Web Service 端点以接收暂停或恢复请求。

您可以使用任何适当的工具来生成 WS-Notification 应用程序以便与通知代理配合使用。您可以使用 WS-Notification 服务点公开的 WSDL 并使用 IBM® Rational® Application Developer 之类的开发工具生成可针对其编写应用程序的存根。要获取此类编码的示例,请参阅开发使用 WS-Notification 的应用程序


指示主题类型的图标 概念主题



时间戳记图标 最近一次更新时间: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=cjwsn_interact
文件名:cjwsn_interact.html