com.sap.netweaver.rtmf.messagingimpl.messages

Class RTMFMessage

java.lang.Object
  extended by com.sap.netweaver.rtmf.messagingimpl.messages.RTMFMessage
Direct Known Subclasses:
RTMFErrorMessage, RTMFService.RTMFClusterMessage, RTMFSuccessMessage

Deprecated.

public class RTMFMessage
extends Object

The class that represents all RTMF messages. Each message consists of a set of predefined properties, and enables you to add custom parameters.

RTMFMessage is created using RTMFMessageFactory.

There are four predefined RTMFMessage properties: Event, From, Action, Destination. They differ from custom RTMF parameters because they can be used as selectors for filtering messages when a service registers to receive another service's messages (see RTMFService).

When setting the event property or publishing an event, the event name can contain the following characters:
A..Z, a..z, 0..9, or \ | ~ ! @ # $ % ^ * ( ) { } [ ] _ + = - / , . ?


Nested Class Summary
static class RTMFMessage.MessageProperty
          Deprecated. For internal use only.
 
Field Summary
static String ACTION_ID_PROPERTY
          Deprecated. A constant representing the RTMFMessage Action property.
static String DESTINATION_PROPERTY
          Deprecated. A constant representing the RTMFMessage Destination property.
static String EVENT_PROPERTY
          Deprecated. A constant representing the RTMFMessage Event property.
static String FROM_PROPERTY
          Deprecated. A constant representing the RTMFMessage From property.
 
Constructor Summary
protected RTMFMessage(String msgType)
          Deprecated. For internal use only.
 
Method Summary
 String getAction()
          Deprecated. Returns the Action property of the message.
 List getAllParamsKeys()
          Deprecated. Returns the keys of all the custom parameters.
 String getDestination()
          Deprecated. Returns the Destination property of the message, which represents the entity to which the message is sent.
 String getEvent()
          Deprecated. Returns the Event property of the message.
 String getFrom()
          Deprecated. Returns the From property, which represents the entity that is sending the message.
 String getMessage()
          Deprecated. Returns an XML representation of the message.
 String getMessageType()
          Deprecated. Returns the message class name, indicating the message type.
 String getParamValue(String paramName)
          Deprecated. Returns the value of a specified parameter.
 List getParamValues(String paramName)
          Deprecated. Returns a list of all the values of a specified parameter.
 void publishEvent(String eventName)
          Deprecated. Publishes the message to all the subscribers of the specified event, and sets the message's Destination and Event properties to the event name.
 void publishEventToUser(String eventName, String userUniqueId)
          Deprecated. Publishes the specified event to a specified user.
 void publishToTopic(String topicName)
          Deprecated. Publishes the RTMF message to the specified topic service.
 void putParam(String paramName, List paramValuesList)
          Deprecated. Adds a custom parameter to the message.
 void putParam(String paramName, String newValue)
          Deprecated. Adds a custom parameter to the message.
 void removeParam(String paramName)
          Deprecated. Removes a specified parameter.
 void sendToQueue(String queueName)
          Deprecated. Sends the message to the specified queue service.
 List<RTMFMessage> sendToService(String destinationService)
          Deprecated. Sends a message to the specified service and sets the message's Destination property to the name of the service.
 void setAction(String action)
          Deprecated. Sets the Action property of the message.
 void setDestination(String destination)
          Deprecated. Sets the message's Destination property, which represents the entity to which the message is sent.
 void setEvent(String event)
          Deprecated. Sets the Event property of the message.
 void setFrom(String from)
          Deprecated. Sets the message's From property, which represents the entity that is sending the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EVENT_PROPERTY

public static final String EVENT_PROPERTY
Deprecated. 
A constant representing the RTMFMessage Event property.

See Also:
Constant Field Values

FROM_PROPERTY

public static final String FROM_PROPERTY
Deprecated. 
A constant representing the RTMFMessage From property.

See Also:
Constant Field Values

ACTION_ID_PROPERTY

public static final String ACTION_ID_PROPERTY
Deprecated. 
A constant representing the RTMFMessage Action property.

See Also:
Constant Field Values

DESTINATION_PROPERTY

public static final String DESTINATION_PROPERTY
Deprecated. 
A constant representing the RTMFMessage Destination property.

See Also:
Constant Field Values
Constructor Detail

RTMFMessage

protected RTMFMessage(String msgType)
Deprecated. 
For internal use only.

Method Detail

setFrom

public void setFrom(String from)
Deprecated. 
Sets the message's From property, which represents the entity that is sending the message.

It is usually the ID of the entity that created the message.

Parameters:
from - the entity that created the message

setAction

public void setAction(String action)
Deprecated. 
Sets the Action property of the message.

Parameters:
action - the specified action

setDestination

public void setDestination(String destination)
Deprecated. 
Sets the message's Destination property, which represents the entity to which the message is sent.

When publishing an event with publishEventToUser(String, String) or publishEvent(String eventName), this value is set automatically to the name of the event.

When sending a message to a service with sendToService(String), this value is set automatically to the name of the service.

Parameters:
destination - the Destination property

setEvent

public void setEvent(String event)
Deprecated. 
Sets the Event property of the message.

When publishing an event with publishEventToUser(String, String)) or publishEvent(String eventName), this value is set automatically to the name of the event.

Parameters:
event - the name of the event

getFrom

public String getFrom()
Deprecated. 
Returns the From property, which represents the entity that is sending the message.

Returns:
the From property

getAction

public String getAction()
Deprecated. 
Returns the Action property of the message.

Returns:
the Action property

getDestination

public String getDestination()
Deprecated. 
Returns the Destination property of the message, which represents the entity to which the message is sent.

Returns:
the Destination property

getEvent

public String getEvent()
Deprecated. 
Returns the Event property of the message.

Returns:
the Event property

putParam

public void putParam(String paramName,
                     String newValue)
Deprecated. 
Adds a custom parameter to the message. When using this method, the parameter should have a single key and a list of values. In case the parameter has a single value, use putParam(String, String).

Parameters:
paramName - a parameter key
newValue - a new value to be added to the parameter

putParam

public void putParam(String paramName,
                     List paramValuesList)
Deprecated. 
Adds a custom parameter to the message. When using this method, the parameter should have a single key and a single value.

When the parameter has more than one value, use putParam(String, List).

Parameters:
paramName - the key of the parameter
paramValuesList - list of values for the parameter

removeParam

public void removeParam(String paramName)
Deprecated. 
Removes a specified parameter.

Parameters:
paramName - the key of the parameter to remove

getParamValue

public String getParamValue(String paramName)
Deprecated. 
Returns the value of a specified parameter.

When there is more than one value, the method returns only the first value. To get the entire list of values, use getParamValues(String).

Parameters:
paramName - the key of a parameter
Returns:
the value of the parameter, or null if the specified parameter does not exist

getParamValues

public List getParamValues(String paramName)
Deprecated. 
Returns a list of all the values of a specified parameter.

When there is only one value, the method returns a list with one element.

Parameters:
paramName - the key of a parameter
Returns:
the values of the specified parameter, or null if the parameter does not exist

getAllParamsKeys

public List getAllParamsKeys()
Deprecated. 
Returns the keys of all the custom parameters.

Returns:
a list of Strings, which are the parameter keys

sendToService

public List<RTMFMessage> sendToService(String destinationService)
Deprecated. 
Sends a message to the specified service and sets the message's Destination property to the name of the service.

The returned list of messages can be one of the following:

Parameters:
destinationService - the name of the destination RTMF service
Returns:
a list of RTMF messages

getMessage

public String getMessage()
Deprecated. 
Returns an XML representation of the message. This internal representation is intended for monitoring purposes only.

Returns:
an XML representation of the message

publishEvent

public void publishEvent(String eventName)
                  throws RTMFException
Deprecated. 
Publishes the message to all the subscribers of the specified event, and sets the message's Destination and Event properties to the event name.

SECURITY WARNING: Using this method results in publishing the event to every end user that is registered to it. Therefore, the message might arrive to undesired end users, who have also registered to the same event. If you wish to publish an event to a specific user, with the assurance that no other user gets it, use publishEventToUser(String, String).

An RTMFException is thrown when a failure to publish the event occurs. If the cause is a failure of JMS, then the following occurs:

Parameters:
eventName - the name of the event
Throws:
RTMFException - if publishing fails (see RTMFException RTMFFreezeException)

publishEventToUser

public void publishEventToUser(String eventName,
                               String userUniqueId)
                        throws RTMFException
Deprecated. 
Publishes the specified event to a specified user.

The event is sent only to the specified user, even if there are other users registered to the same event. In order to publish the event to all users registered to the event, use publishEvent(String). For more information regarding behavior during a JMS failure, see publishEvent(String).

Parameters:
eventName - the name of the event
userUniqueId - the user's unique Id (UME).
Throws:
RTMFException - if publishing fails (see RTMFException and RTMFFreezeException)

publishToTopic

public void publishToTopic(String topicName)
                    throws RTMFException
Deprecated. 
Publishes the RTMF message to the specified topic service.

Parameters:
topicName - the name of the topic service
Throws:
RTMFException - if publishing fails (see RTMFException)

sendToQueue

public void sendToQueue(String queueName)
                 throws RTMFException
Deprecated. 
Sends the message to the specified queue service.

Parameters:
queueName - a string representing the queue name
Throws:
RTMFException - if publishing fails (see RTMFException)

getMessageType

public String getMessageType()
Deprecated. 
Returns the message class name, indicating the message type.

Can be either "RTMFMessage", "RTMFSuccessMessage" or "RTMFErrorMessage".

Returns:
the type of the message
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