com.sap.netweaver.rtmf.messagingimpl.services

Class RTMFService

java.lang.Object
  extended by com.sap.netweaver.rtmf.messagingimpl.services.RTMFService
Direct Known Subclasses:
RTMFQueueService, RTMFSyncService, RTMFTopicService

Deprecated.

public abstract class RTMFService
extends Object

The base class for all RTMF services. The class defines the methods for handling messages. Messages can be sent from server applications, from clients, or from instances of the same service on different cluster nodes. RTMF calls different methods depending on the source of the message.

The message handling methods are:

Each RTMF service has one instance on each cluster node, and is registered in the RTMF services list during creation.


Nested Class Summary
protected  class RTMFService.RTMFClusterMessage
          Deprecated.  
 
Constructor Summary
RTMFService(String serviceName)
          Deprecated. Constructs a service with the specified name (the name should be unique).
 
Method Summary
 void destroy()
          Deprecated. Removes the service from the services list and terminates it.
 String getMonitoringInformationAsHTMLString()
          Deprecated. Returns monitoring information about the service.
 String getServiceName()
          Deprecated. Returns the name of the service as specified in the constructor.
protected abstract  void onClusterMessageArrived(RTMFMessage message)
          Deprecated. Handles messages sent from instances of the service on other cluster nodes.
protected abstract  List<RTMFMessage> onMessageArrived(RTMFMessage message)
          Deprecated. Handles messages sent from server applications.
protected abstract  List<RTMFMessage> onUserMessageArrived(RTMFMessage message, String user)
          Deprecated. Handles messages sent from a client.
 void registerToMessages(String topicName)
          Deprecated. Registers the service to also receive the messages sent to a specific topic service.
 void registerToMessages(String topicName, String selector)
          Deprecated. Registers the service to also receive selected messages sent to a specific topic service.
 void unregisterToMessages(String topicName)
          Deprecated. Unregisters the service from all messages to the specified topic service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RTMFService

public RTMFService(String serviceName)
Deprecated. 
Constructs a service with the specified name (the name should be unique). In the constructor of any new RTMF service, make sure to call this constructor in the superclass, sending the service name.

Parameters:
serviceName - a unique service name
Method Detail

destroy

public void destroy()
Deprecated. 
Removes the service from the services list and terminates it. When overriden, make sure to call this method on the superclass.


onMessageArrived

protected abstract List<RTMFMessage> onMessageArrived(RTMFMessage message)
Deprecated. 
Handles messages sent from server applications. In this method, you should implement the service's business logic for handling server application messages.

Parameters:
message - the message delivered to the service
Returns:
a list of RTMF messages (relevant only if this is a sync service)

onClusterMessageArrived

protected abstract void onClusterMessageArrived(RTMFMessage message)
Deprecated. 
Handles messages sent from instances of the service on other cluster nodes. In this method, you should implement the service's business logic for handling messages between instances of the same service.

In a cluster environment, you may want to synchronize among all the instances of the service on the different nodes. For this purpose, you can send and receive an RTMFClusterMessage to all the instances of this service. When sending such a message, the sending instance also receives the message.

Parameters:
message - the cluster message

onUserMessageArrived

protected abstract List<RTMFMessage> onUserMessageArrived(RTMFMessage message,
                                                          String user)
Deprecated. 
Handles messages sent from a client. In this method, you should implement the service's business logic for handling client messages.

SECURITY WARNING: The message might be from an unknown or malicious source and even from an altogether un-authenticated source (in which case the user parameter would be null). The received message might contain malicious data or script in its properties and parameters. Any call to this function should be treated as a potential security risk.

Parameters:
message - the message
user - the user's Unique Id (UME)
Returns:
a list of RTMF messages (relevant only for sync services)

registerToMessages

public void registerToMessages(String topicName)
Deprecated. 
Registers the service to also receive the messages sent to a specific topic service. When messages are sent to the specified topic service, a copy is also sent to this service.

Parameters:
topicName - the name of the topic

registerToMessages

public void registerToMessages(String topicName,
                               String selector)
Deprecated. 
Registers the service to also receive selected messages sent to a specific topic service. Only messages that meet the criteria of the specified selector are sent to this service. The selector string is an SQL query representing the messages you want to receive. For example: "from IN ('Joey','Ross')" registers the service to receive all messages whose From property equals 'Joey' or 'Ross'. In the selector, you can specify predefined properties, as follows: RTMFMessage.FROM_PROPERTY, RTMFMessage.ACTION_ID_PROPERTY, RTMFMessage.DESTINATION_PROPERTY, RTMFMessage.EVENT_PROPERTY.

If this service is already registered to receive messages from the specified topic service, the older registration is overidden.

Parameters:
topicName - the name of the topic
selector - the SQL filtering query

unregisterToMessages

public void unregisterToMessages(String topicName)
Deprecated. 
Unregisters the service from all messages to the specified topic service.

Parameters:
topicName - the name of the topic

getServiceName

public String getServiceName()
Deprecated. 
Returns the name of the service as specified in the constructor.

Returns:
the name of the service

getMonitoringInformationAsHTMLString

public String getMonitoringInformationAsHTMLString()
Deprecated. 
Returns monitoring information about the service. HTML format can be used. When overridden, make sure to include the service name in the returned string.

Returns:
a string that contains monitoring information about the service
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS-API [sap.com] tc/rtmf/messaging/apideprecated api EP-PIN


Copyright 2012 SAP AG Complete Copyright Notice