org.controlhaus.jms
Interface JMSControl


public interface JMSControl

The control interface for the jms control.


Nested Class Summary
static class JMSControl.AcknowledgeMode
          The acknowledge mode.
static interface JMSControl.CorrelationId
          The method/parameter representing the message JMS CorrelationID.
static interface JMSControl.Delivery
          The method parameter representing a message delivery mode.
static class JMSControl.DeliveryMode
          The delivery mode.
static interface JMSControl.Destination
          The JMS destination annotation for a extended class method.
static class JMSControl.DestinationType
          The destination type.
static interface JMSControl.Expiration
          The method parameter representing a message expiration in milliseconds.
static class JMSControl.HeaderType
          The header type.
static interface JMSControl.Message
          The message type used by the method.
static class JMSControl.MessageType
          The message type.
static interface JMSControl.Priority
          The method/parameter annotation representing a message priority.
static interface JMSControl.Properties
          The method parameter representing one or more properties.
static interface JMSControl.Property
          The method parameter representing a message property with the given name.
static interface JMSControl.PropertyValue
          The method parameter representing a message property with the given name and value.
static interface JMSControl.Type
          The method/parameter representing the message JMS type.
 
Field Summary
static String HEADER_CORRELATIONID
          Deprecated.  
static String HEADER_DELIVERYMODE
          Deprecated.  
static String HEADER_EXPIRATION
          Deprecated.  
static String HEADER_MESSAGEID
          Deprecated.  
static String HEADER_PRIORITY
          Deprecated.  
static String HEADER_REDELIVERED
          Deprecated.  
static String HEADER_TIMESTAMP
          Deprecated.  
static String HEADER_TYPE
          Deprecated.  
 
Method Summary
 Connection getConnection()
          Get the JMS Connection.
 Destination getDestination()
          Get the jms-destination.
 Session getSession()
          Get the JMS Session object.
 void setHeader(JMSControl.HeaderType type, Object value)
          Sets a JMS header to be assigned to the next JMS message sent.
 void setHeaders(Map headers)
          Sets the JMS headers to be assigned to the next JMS message sent.
 void setProperties(Map properties)
          Sets the JMS properties to be assigned to the next JMS message sent.
 void setProperty(String name, Object value)
          Set the given JMS property to be assigned to the next JMS message sent.
 

Field Detail

HEADER_CORRELATIONID

static final String HEADER_CORRELATIONID
Deprecated. 
Indicates the JMSCorrelationID message header.

See Also:
JMSControl.HeaderType

HEADER_DELIVERYMODE

static final String HEADER_DELIVERYMODE
Deprecated. 
Indicates the JMSDeliveryMode message header.

See Also:
JMSControl.HeaderType

HEADER_EXPIRATION

static final String HEADER_EXPIRATION
Deprecated. 
Indicates the JMSExpiration message header. Use with the getHeaders and setHeaders methods.

See Also:
JMSControl.HeaderType

HEADER_MESSAGEID

static final String HEADER_MESSAGEID
Deprecated. 
Indicates the JMSMessageID message header.

See Also:
JMSControl.HeaderType

HEADER_PRIORITY

static final String HEADER_PRIORITY
Deprecated. 
Indicates the JMSPriority message header.

See Also:
JMSControl.HeaderType

HEADER_REDELIVERED

static final String HEADER_REDELIVERED
Deprecated. 
Indicates the JMSRedelivered message header.

See Also:
JMSControl.HeaderType

HEADER_TIMESTAMP

static final String HEADER_TIMESTAMP
Deprecated. 
Indicates the JMSTimestamp message header.

See Also:
JMSControl.HeaderType

HEADER_TYPE

static final String HEADER_TYPE
Deprecated. 
Indicates the JMSType message header.

See Also:
JMSControl.HeaderType
Method Detail

getSession

Session getSession()
                   throws ControlException
Get the JMS Session object.

Returns:
the session.
Throws:
ControlException

getConnection

Connection getConnection()
                         throws ControlException
Get the JMS Connection.

Returns:
the connection.
Throws:
ControlException

getDestination

Destination getDestination()
                           throws ControlException
Get the jms-destination.

Returns:
an instance destination object.
Throws:
ControlException

setHeaders

void setHeaders(Map headers)
Sets the JMS headers to be assigned to the next JMS message sent. Note that these headers are set only on the next message, subsequent messages will not get these headers. Also note that if the body is a message itself, then any header set through this map will override headers set in the message.

Parameters:
headers - A map of header names (Strings or HeaderType) to header values.

setHeader

void setHeader(JMSControl.HeaderType type,
               Object value)
Sets a JMS header to be assigned to the next JMS message sent. Note that this headers is set only on the next message, subsequent messages will not get this header. Also note that if the body is a message itself, then the header set here will override the header set in the message.

Parameters:
type - the header type.
value - the value for the header.

setProperties

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 a publish method, then any property set through this map will override properties set in the message itself.

Parameters:
properties - A map of property names (Strings) to property values.

setProperty

void setProperty(String name,
                 Object value)
Set the given JMS property to be assigned to the next JMS message sent. Note that this property is set only on the next message, subsequent messages will not get this property. Also note that if the body is a message itself, then the property set here will override the property set in the message.

Parameters:
name - the property name.
value - the property value.