com.pcbsys.nirvana.nJMS.MessageProducerImpl Class Reference

class implements MessageProducer interface. More...

Inheritance diagram for com.pcbsys.nirvana.nJMS.MessageProducerImpl:
com.pcbsys.nirvana.nJMS.QueueSenderImpl com.pcbsys.nirvana.nJMS.TopicPublisherImpl

Public Member Functions

void _send (javax.jms.Destination destination, javax.jms.Message msg, int deliveryMode, int priority, long timeToLive) throws javax.jms.JMSException
 Sends message, specifying delivery mode, priority and time to live. More...
 
synchronized void close () throws javax.jms.JMSException
 Closes the message producer. More...
 
int getDeliveryMode () throws javax.jms.JMSException
 Gets the producer's default delivery mode. More...
 
javax.jms.Destination getDestination () throws javax.jms.JMSException
 Gets the destination associated with this MessageProducer. More...
 
boolean getDisableMessageID () throws javax.jms.JMSException
 Gets an indication of whether message IDs are disabled. More...
 
boolean getDisableMessageTimestamp () throws javax.jms.JMSException
 Gets an indication of whether message timestamps are disabled. More...
 
int getPriority () throws javax.jms.JMSException
 Gets the producer's default priority for messages. More...
 
long getTimeToLive () throws javax.jms.JMSException
 Gets the default time to live. More...
 
void send (Message message, int deliveryMode, int priority, long ttl) throws javax.jms.JMSException
 Sends a message for message producer, specifying delivery mode, priority and time to live. More...
 
void send (Destination destination, Message message) throws javax.jms.JMSException
 Sends a message to destination using the MessageProducer's default delivery mode, priority and time to live. More...
 
void send (Message message) throws javax.jms.JMSException
 Sends a message using the MessageProducer's default delivery mode, priority, and time to live. More...
 
void send (Message[] messages) throws javax.jms.JMSException
 Sends batch of messages using the MessageProducer's default delivery mode, priority, and time to live. More...
 
void send (Message[] messages, int deliveryMode, int priority, long timeToLive) throws javax.jms.JMSException
 Sends a batch of messages by specifying delivery mode, priority and time to live. More...
 
void send (Destination destination, Message[] messages, int deliveryMode, int priority, long ttl) throws javax.jms.JMSException
 Sends a batch of messages to destination by specifying delivery mode, priority, and time to live. More...
 
void send (Destination destination, Message[] messages) throws javax.jms.JMSException
 Sends batch of messages to destination using the MessageProducer's default delivery mode, priority, and time to live. More...
 
void send (javax.jms.Destination destination, javax.jms.Message message, int deliveryMode, int priority, long timeToLive) throws javax.jms.JMSException
 Sends message to a destination, specifying delivery mode, priority and time to live. More...
 
void setDeliveryMode (int deliveryMode) throws javax.jms.JMSException
 Set the default delivery mode to be used by Producer. More...
 
void setDisableMessageID (boolean value) throws javax.jms.JMSException
 Set disable message ID. More...
 
void setDisableMessageTimestamp (boolean value) throws javax.jms.JMSException
 Set disable message time stamp. More...
 
void setPriority (int messagePriority) throws javax.jms.JMSException
 Sets the producer's default priority. More...
 
void setTimeToLive (long timeToLive) throws javax.jms.JMSException
 Sets the default time to live in milliseconds. More...
 

Protected Member Functions

void abort () throws nSessionNotConnectedException, nRequestTimedOutException, nSessionPausedException, nSecurityException, nUnexpectedResponseException
 Aborts all outstanding producer transactions. More...
 

Protected Attributes

ChannelHelper boundhelper = null
 A channel helper to manage producer transactions when message producer is identified (associated) with a particular destination. More...
 
boolean disableMessageID = false
 <Enter Field Description>
 
boolean disableMessageTimestamp = true
 <Enter Field Description>
 
boolean lastCommitFailed = false
 Indicates if the last commit execution for this message producer was not successful.
 
nChannel myCacheChannel = null
 <Enter Field Description> More...
 
int myDeliveryMode = javax.jms.Message.DEFAULT_DELIVERY_MODE
 <Enter Field Description>
 
DestinationImpl myDest = null
 Destination this message producer is associated with. More...
 
int myPriority = javax.jms.Message.DEFAULT_PRIORITY
 <Enter Field Description>
 
long ttl = javax.jms.Message.DEFAULT_TIME_TO_LIVE
 <Enter Field Description>
 

Detailed Description

class implements MessageProducer interface.

Member Function Documentation

void com.pcbsys.nirvana.nJMS.MessageProducerImpl._send ( javax.jms.Destination  destination,
javax.jms.Message  msg,
int  deliveryMode,
int  priority,
long  timeToLive 
) throws javax.jms.JMSException

Sends message, specifying delivery mode, priority and time to live.

Parameters
destinationJMS destination.
msgJMS message to send.
deliveryModeDelivery Mode for this message.
priorityMessage priority, valid values are in range of 1 to 9.
timeToLiveTime to live in milliseconds.
Exceptions
javax.jms.JMSExceptionin case of any failure.
void com.pcbsys.nirvana.nJMS.MessageProducerImpl.abort ( ) throws nSessionNotConnectedException, nRequestTimedOutException, nSessionPausedException, nSecurityException, nUnexpectedResponseException
protected

Aborts all outstanding producer transactions.

Method will ignore all failures which indicate that the respective transaction is not known to the server or is already aborted.

Upon successful completion of this method, callers must use clearTX() to clear current transactional state.
Exceptions
nSessionNotConnectedExceptionIf current session used to abort the transaction is not connected.
nRequestTimedOutExceptionIf server fails to respond to the abort request in the configured timeout.
nSessionPausedExceptionIf the underlying session is currently paused.
nSecurityExceptionIf current user does not have privileges to abort the transaction.
nUnexpectedResponseExceptionIf the server replies with an unexpected response.
synchronized void com.pcbsys.nirvana.nJMS.MessageProducerImpl.close ( ) throws javax.jms.JMSException

Closes the message producer.

Exceptions
javax.jms.JMSExceptionin case of error.
int com.pcbsys.nirvana.nJMS.MessageProducerImpl.getDeliveryMode ( ) throws javax.jms.JMSException

Gets the producer's default delivery mode.

Returns
message delivery mode.
Exceptions
javax.jms.JMSExceptionin case invalid delivery mode.
javax.jms.Destination com.pcbsys.nirvana.nJMS.MessageProducerImpl.getDestination ( ) throws javax.jms.JMSException

Gets the destination associated with this MessageProducer.

Returns
The destination associated with this message producer or null if not set.
boolean com.pcbsys.nirvana.nJMS.MessageProducerImpl.getDisableMessageID ( ) throws javax.jms.JMSException

Gets an indication of whether message IDs are disabled.

Returns
true if disable Message ID is set.
Exceptions
javax.jms.JMSExceptionin case of any error.
boolean com.pcbsys.nirvana.nJMS.MessageProducerImpl.getDisableMessageTimestamp ( ) throws javax.jms.JMSException

Gets an indication of whether message timestamps are disabled.

Returns
true of disable message timestamp is set.
Exceptions
javax.jms.JMSExceptionin case of any error.
int com.pcbsys.nirvana.nJMS.MessageProducerImpl.getPriority ( ) throws javax.jms.JMSException

Gets the producer's default priority for messages.

Returns
message priority.
Exceptions
javax.jms.JMSExceptionin case of invalid message priority set.
long com.pcbsys.nirvana.nJMS.MessageProducerImpl.getTimeToLive ( ) throws javax.jms.JMSException

Gets the default time to live.

Returns
Time to live.
Exceptions
javax.jms.JMSExceptionin case Time to live is not set.
void com.pcbsys.nirvana.nJMS.MessageProducerImpl.send ( Message  message,
int  deliveryMode,
int  priority,
long  ttl 
) throws javax.jms.JMSException

Sends a message for message producer, specifying delivery mode, priority and time to live.

Parameters
messageJMS message to send.
deliveryModeDelivery Mode for this message.
priorityMessage priority, valid values are in range of 1 to 9.
ttlTime to live in milliseconds.
Exceptions
javax.jms.JMSExceptionin case of failure.
void com.pcbsys.nirvana.nJMS.MessageProducerImpl.send ( Destination  destination,
Message  message 
) throws javax.jms.JMSException

Sends a message to destination using the MessageProducer's default delivery mode, priority and time to live.

Parameters
destinationJMS destination.
messageJMS message to send.
Exceptions
javax.jms.JMSExceptionIn case of any failure.
void com.pcbsys.nirvana.nJMS.MessageProducerImpl.send ( Message  message) throws javax.jms.JMSException

Sends a message using the MessageProducer's default delivery mode, priority, and time to live.

Parameters
messageJMS message to send.
Exceptions
javax.jms.JMSExceptionIn case of any failure.
void com.pcbsys.nirvana.nJMS.MessageProducerImpl.send ( Message[]  messages) throws javax.jms.JMSException

Sends batch of messages using the MessageProducer's default delivery mode, priority, and time to live.

Note: This method is non standard extension to JMS specification.

Parameters
messagesBatch of JMS messages to send.
Exceptions
javax.jms.JMSExceptionin case of any failure.
Since
10.0
void com.pcbsys.nirvana.nJMS.MessageProducerImpl.send ( Message[]  messages,
int  deliveryMode,
int  priority,
long  timeToLive 
) throws javax.jms.JMSException

Sends a batch of messages by specifying delivery mode, priority and time to live.

Note: This method is non standard extension to JMS specification.

Parameters
messagesBatch of JMS messages to send.
deliveryModeDelivery Mode for messages.
priorityMessage priority, valid values are in range of 1 to 9.
timeToLiveTime to live in milliseconds.
Exceptions
javax.jms.JMSExceptionin case of any failure.
Since
10.0
void com.pcbsys.nirvana.nJMS.MessageProducerImpl.send ( Destination  destination,
Message[]  messages,
int  deliveryMode,
int  priority,
long  ttl 
) throws javax.jms.JMSException

Sends a batch of messages to destination by specifying delivery mode, priority, and time to live.

Note: This method is non standard extension to JMS specification.

Parameters
destinationJMS destination.
messagesBatch of JMS messages to send.
deliveryModeDelivery Mode for messages.
priorityMessage priority, valid values are in range of 1 to 9.
ttlTime to live in milliseconds.
Exceptions
javax.jms.JMSExceptionin case of any failure.
Since
10.0
void com.pcbsys.nirvana.nJMS.MessageProducerImpl.send ( Destination  destination,
Message[]  messages 
) throws javax.jms.JMSException

Sends batch of messages to destination using the MessageProducer's default delivery mode, priority, and time to live.

Note: This method is non standard extension to JMS specification.

Parameters
destinationJMS destination.
messagesBatch of JMS messages to send.
Exceptions
javax.jms.JMSExceptionin case of any failure.
Since
10.0
void com.pcbsys.nirvana.nJMS.MessageProducerImpl.send ( javax.jms.Destination  destination,
javax.jms.Message  message,
int  deliveryMode,
int  priority,
long  timeToLive 
) throws javax.jms.JMSException

Sends message to a destination, specifying delivery mode, priority and time to live.

Parameters
destinationJMS destination.
messageJMS message to send.
deliveryModeDelivery Mode for this message.
priorityMessage priority, valid values are in range of 1 to 9.
timeToLiveTime to live in milliseconds.
Exceptions
javax.jms.JMSExceptionin case of any failure.
void com.pcbsys.nirvana.nJMS.MessageProducerImpl.setDeliveryMode ( int  deliveryMode) throws javax.jms.JMSException

Set the default delivery mode to be used by Producer.

Parameters
deliveryModevalid delivery mode DeliveryMode
Exceptions
javax.jms.JMSExceptionin case of any error.
void com.pcbsys.nirvana.nJMS.MessageProducerImpl.setDisableMessageID ( boolean  value) throws javax.jms.JMSException

Set disable message ID.

Parameters
valuetrue or false.
Exceptions
javax.jms.JMSExceptionin case of failure to set disable message ID.
void com.pcbsys.nirvana.nJMS.MessageProducerImpl.setDisableMessageTimestamp ( boolean  value) throws javax.jms.JMSException

Set disable message time stamp.

Parameters
valuetrue or false.
Exceptions
javax.jms.JMSExceptionin case of failure to set the disableTimeStamp.
void com.pcbsys.nirvana.nJMS.MessageProducerImpl.setPriority ( int  messagePriority) throws javax.jms.JMSException

Sets the producer's default priority.

Parameters
messagePrioritymessage priority.
Exceptions
javax.jms.JMSExceptionin case of failure to set.
void com.pcbsys.nirvana.nJMS.MessageProducerImpl.setTimeToLive ( long  timeToLive) throws javax.jms.JMSException

Sets the default time to live in milliseconds.

Parameters
timeToLivetime to live.
Exceptions
javax.jms.JMSExceptionin case of failure to set.

Field Documentation

ChannelHelper com.pcbsys.nirvana.nJMS.MessageProducerImpl.boundhelper = null
protected

A channel helper to manage producer transactions when message producer is identified (associated) with a particular destination.

Will be set only for an identified message producer, otherwise null.

nChannel com.pcbsys.nirvana.nJMS.MessageProducerImpl.myCacheChannel = null
protected

<Enter Field Description>

For an unidentified message producer, last destination sent to will be cached to avoid repeated destination look ups.

DestinationImpl com.pcbsys.nirvana.nJMS.MessageProducerImpl.myDest = null
protected

Destination this message producer is associated with.

Only set for an identified message producer, otherwise null.