com.sapportals.portal.prt.service.notification

Interface INotificationService

All Superinterfaces:
IService

public interface INotificationService
extends IService

This service allows to perform local notification and cluster notification.
The intention is not to replace any JMS system as the messages are not persistent and not garanteed to be delivered.
The underlying implementation is based on http and the messages are trusted between 2 PRTs.
The cluster notification bases its process on the cluster configuration.

@version $Revision:$.

@author Laurent Guiraud, Last modified by $Author:$, Change list $Change:$.


Field Summary
static String KEY
          service key
 
Method Summary
 TopicDataContainer[] broadcastAndWait(String topic, TopicDataContainer container)
          Publishes a message to all the listeners and wait for the response.
 void publish(String topic, TopicDataContainer container)
          Publishes a message to all the listeners: local listeners and cluster listeners that registered for the given topic.
 TopicDataContainer publishAndWait(int id, String topic, TopicDataContainer container)
          Publishes a message to the listener having for id "id" and wait for the response.
 void subscribe(String topic, ITopicActionListener listener)
          Enable an ITopicActionListener to register for all messages that correspond to the topic
 void subscribe(String topic, ITopicListener listener)
          Enable an ITopicListener to register for all messages that correspond to the topic
 void unsubscribe(String topic, ITopicActionListener listener)
          Enable to unsubsrcibe an ITopicActionListener that was previously registered.
 void unsubscribe(String topic, ITopicListener listener)
          Enable to unsubsrcibe an ITopicListener that was previously registered.
 
Methods inherited from interface com.sapportals.portal.prt.service.IService
afterInit, configure, destroy, getContext, getKey, init, release
 

Field Detail

KEY

static final String KEY
service key

See Also:
Constant Field Values
Method Detail

subscribe

void subscribe(String topic,
               ITopicListener listener)
Enable an ITopicListener to register for all messages that correspond to the topic

Parameters:
topic - the name of the topic to subscribe for
listener - the handler when this topic is delivered

subscribe

void subscribe(String topic,
               ITopicActionListener listener)
Enable an ITopicActionListener to register for all messages that correspond to the topic

Parameters:
topic - the name of the topic to subscribe for
listener - the handler when this topic is delivered

unsubscribe

void unsubscribe(String topic,
                 ITopicListener listener)
Enable to unsubsrcibe an ITopicListener that was previously registered.

This method is important since the object that registers can be released thus letting an instance of a listener in the Notification service could deal into some class loading discrepancies.

Parameters:
topic - the name of the topic to unsubscribe
listener - the listenr to remove

unsubscribe

void unsubscribe(String topic,
                 ITopicActionListener listener)
Enable to unsubsrcibe an ITopicActionListener that was previously registered.

This method is important since the object that registers can be released thus letting an instance of a listener in the Notification service could deal into some class loading discrepancies.

Parameters:
topic - the name of the topic to unsubscribe
listener - the listenr to remove

publish

void publish(String topic,
             TopicDataContainer container)
Publishes a message to all the listeners: local listeners and cluster listeners that registered for the given topic.
You can attach a data container to the message to pass on parameters.


publishAndWait

TopicDataContainer publishAndWait(int id,
                                  String topic,
                                  TopicDataContainer container)
Publishes a message to the listener having for id "id" and wait for the response.
You can attach a data container to the message to pass on parameters.


broadcastAndWait

TopicDataContainer[] broadcastAndWait(String topic,
                                      TopicDataContainer container)
Publishes a message to all the listeners and wait for the response.
You can attach a data container to the message to pass on parameters.

Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/api api EP-PIN
[sap.com] EP-BASIS-API [sap.com] epbc.prtapi._coreservicedeprecated default EP-PIN-PRT


Copyright 2011 SAP AG Complete Copyright Notice