Base interface for all JMS controls.
Syntax
package weblogic.jws.control;
public class JMSControl extends Control
Remarks
The methods of this interface may be invoked by any web service with
a JMS control instance.
Only one of the three callbacks may have a handler implemented in any
given JWS file. Implementing more than one callback handler is an error.
Members
Constructors
none.
Methods
Map getHeaders()
Gets the JMS headers of the last message received. If
no message has been received then null is returned. May contain one or
more HEADER_xxx fields described
below as keys.
Map getProperties()
Gets the JMS properties of the last message received.
If no message has been received then null is returned. The return value
maps property names (Strings) to property values.
javax.jms.Session getSession()
Returns the JMS session used by this control.
void setHeaders(Map
headers)
Sets the JMS headers to be assigned to the next JMS message
sent. Typical usage is to create a java.util.HashMap to hold the headers,
then populate it using the HEADER_xxx
fields described below as keys.
Note that these headers are set only on the next message,
subsequent messages will not get these
headers. Also note that if the next message is sent through publishMessage(),
then any headers set through this map will override headers set in the
message itself.
void setProperties(Map
properties)
Sets the JMS properties to be assigned to the next JMS
message sent. Note that these properties are set only on the next message,
subsequent messages will not get these properties. Also note that if the
next message is sent through publishMessage(), then any properties set
through this map will override properties set in the message itself.
void subscribe()
Indicates that this control is now interested in receiving
incoming messages published to the topic.
void unsubscribe()
Indicates that this control is no longer interested in
receiving incoming messages published to the topic.
Fields
public static final String HEADER_CORRELATIONID
Used with getHeaders()/setHeaders() methods.
public static final String HEADER_DELIVERYMODE
Used with getHeaders()/setHeaders() methods.
public static final String HEADER_EXPIRATION
Used with getHeaders()/setHeaders() methods.
public static final String HEADER_MESSAGEID
Used with getHeaders()/setHeaders() methods.
public static final String HEADER_PRIORITY
Used with getHeaders()/setHeaders() methods.
public static final String HEADER_REDELIVERED
Used with getHeaders()/setHeaders() methods.
public static final String HEADER_TIMESTAMP
Used with getHeaders()/setHeaders() methods.
public static final String HEADER_TYPE
Used with getHeaders()/setHeaders() methods.
Related Topics
JMS Control:
Using Java Message Service Queues and Topics from Your Web Service
Overview:
Messaging Systems and JMS
SimpleJMS.jws Sample
CustomJMSClient.jws
Sample