IBM WebSphere Application ServerTM
Release 8

com.ibm.websphere.sib.api.jms
Interface JmsDestination

All Superinterfaces:
javax.jms.Destination, javax.naming.Referenceable, java.io.Serializable
All Known Subinterfaces:
JmsQueue, JmsTopic

public interface JmsDestination
extends javax.jms.Destination, java.io.Serializable, javax.naming.Referenceable

Contains provider specific methods relating to the javax.jms.Destination interface.


Method Summary
 java.lang.String getBusName()
          Get the name of the bus on which this JMS Destination resides.
 java.lang.String getDeliveryMode()
          Get the deliveryMode.
 java.lang.String getDestDiscrim()
          Retrieves the discriminator associated with this Destination.
 java.lang.String getDestName()
          Retrieves the name of the underlying destination to which this javax.jms.Destination refers.
 java.lang.Integer getPriority()
          Get the priority.
 java.lang.String getReadAhead()
          Retrieve the current setting for the ReadAhead property for this JmsDestination.
 java.lang.Long getTimeToLive()
          Get the timeToLive that will be used for all messages sent using this destination.
 void setBusName(java.lang.String busName)
          Set the name of the bus on which this JMS Destination resides.
 void setDeliveryMode(java.lang.String deliveryMode)
          Set the deliveryMode.
 void setPriority(java.lang.Integer priority)
          Set the priority to be used for all messages sent using this Destination.
 void setReadAhead(java.lang.String value)
          Set the required value for ReadAhead on all consumers created using this JmsDestination.
 void setTimeToLive(java.lang.Long timeToLive)
          Set the timeToLive (in milliseconds) to be used for all messages sent using this destination.
 
Methods inherited from interface javax.naming.Referenceable
getReference
 

Method Detail

getDestName

java.lang.String getDestName()
Retrieves the name of the underlying destination to which this javax.jms.Destination refers.

Returns:
The name of the underlying destination.

getDestDiscrim

java.lang.String getDestDiscrim()
Retrieves the discriminator associated with this Destination.

Note that for Queue objects the returned value will always be null, while for Topics it represents the name of the topic within the topic space.

Returns:
The discriminator for this Destination.

setDeliveryMode

void setDeliveryMode(java.lang.String deliveryMode)
                     throws javax.jms.JMSException
Set the deliveryMode.

The deliveryMode for sending messages may be overridden with this property. Valid values are:

Value Constant name in ApiJmsConstantsMeaning
Application DELIVERY_MODE_APP The deliveryMode is determined by the application (default)
Persistent DELIVERY_MODE_PERSISTENT All messages will be sent persistent, irrespective of any settings in the application.
NonPersistentDELIVERY_MODE_NONPERSISTENT All messages will be sent non-persistent, irrespective of any settings in the application.

Parameters:
deliveryMode - the deliveryMode to be used by MessageProducers of this Destination.
Throws:
javax.jms.JMSException - if the String is not one of the predefined values.
See Also:
MessageProducer

getDeliveryMode

java.lang.String getDeliveryMode()
Get the deliveryMode.

Returns:
a String representing the deliveryMode.
See Also:
setDeliveryMode(java.lang.String)

setTimeToLive

void setTimeToLive(java.lang.Long timeToLive)
                   throws javax.jms.JMSException
Set the timeToLive (in milliseconds) to be used for all messages sent using this destination.

A value of 0 means that the message will never expire. The default for this property is null, which allows the application to determine the timeToLive.

For compatibility with MQJMS, the value of -2 is treated in the same way as null.

The maximum value that will be accepted for timeToLive is defined in ApiJmsConstants.MAX_TIME_TO_LIVE.

Parameters:
timeToLive - The time in milliseconds that the message should live before expiry.
Throws:
javax.jms.JMSException - if the value provided is not valid.
See Also:
ApiJmsConstants.MAX_TIME_TO_LIVE

getTimeToLive

java.lang.Long getTimeToLive()
Get the timeToLive that will be used for all messages sent using this destination.

Returns:
Long The timeToLive for message sent using this destination.
See Also:
setTimeToLive(java.lang.Long)

setPriority

void setPriority(java.lang.Integer priority)
                 throws javax.jms.JMSException
Set the priority to be used for all messages sent using this Destination.

The valid parameters to this method are integers 0 to 9 inclusive, which will be used as the priority for messages sent using this destination.

The default value for this property is null, which indicates that the priority of the message will be set by the application.

For compatibility with MQJMS, the value of -2 will be treated in the same way as null.

Parameters:
priority - The priority to be used for messages sent using this Destination.
Throws:
javax.jms.JMSException - If the value provided is not valid.

getPriority

java.lang.Integer getPriority()
Get the priority.

Returns:
the priority
See Also:
setPriority(java.lang.Integer)

setReadAhead

void setReadAhead(java.lang.String value)
                  throws javax.jms.JMSException
Set the required value for ReadAhead on all consumers created using this JmsDestination.

Please see JmsConnectionFactory.setReadAhead(String) for information on the effect of the ReadAhead property.

Permitted values for the ReadAhead property of a JmsDestination are as follows;



Note that the value specified will override the value specified on the JmsConnectionFactory if the AS_CONNECTION value is not specified.

Parameters:
value - The required value for ReadAhead on this JmsDestination
Throws:
javax.jms.JMSException - If the value specified is not one of the supported constants.
See Also:
ApiJmsConstants.READ_AHEAD_AS_CONNECTION, ApiJmsConstants.READ_AHEAD_ON, ApiJmsConstants.READ_AHEAD_OFF, JmsConnectionFactory.setReadAhead(String)

getReadAhead

java.lang.String getReadAhead()
Retrieve the current setting for the ReadAhead property for this JmsDestination.

Returns:
The current setting for ReadAhead.

getBusName

java.lang.String getBusName()
Get the name of the bus on which this JMS Destination resides.

Returns:
String The name of the Bus.

setBusName

void setBusName(java.lang.String busName)
                throws javax.jms.JMSException
Set the name of the bus on which this JMS Destination resides. Setting this property defines the name of the bus on which the Destination is hosted. This enables applications to send messages to Destinations outside the local bus - for example remote MQ networks. By default this property is set to null, indicating that the Destination resides on the local bus. The setting of this property is optional, and the value of empty String is taken to be equivalent to null.

Throws:
javax.jms.JMSException

IBM WebSphere Application ServerTM
Release 8