org.yajul.jms
Class MessageSender

java.lang.Object
  extended by org.yajul.jms.Endpoint
      extended by org.yajul.jms.MessageSender

public class MessageSender
extends Endpoint

Generic message sender.
User: Joshua Davis Date: Sep 18, 2007 Time: 7:06:18 AM


Nested Class Summary
static interface MessageSender.SenderFactory
           
 
Constructor Summary
MessageSender(javax.naming.InitialContext ic, java.lang.String factoryJndiName, javax.jms.Destination destination, java.lang.String messageSelector)
           
MessageSender(javax.naming.InitialContext ic, java.lang.String factoryJndiName, java.lang.String destinationName, java.lang.String messageSelector)
           
 
Method Summary
static void closeSender(MessageSender sender)
           
 javax.jms.ObjectMessage createObjectMessage()
           
 javax.jms.Topic createTemporaryTopic()
           
 long getReplyTimeout()
           
protected  void onConnectionCreated(javax.jms.Connection connection)
           
 void send(javax.jms.Message message)
           
 javax.jms.Message sendAndWaitForReply(javax.jms.Message msg, javax.transaction.UserTransaction ut)
           
static void sendObject(javax.naming.InitialContext ic, java.lang.String factoryJndiName, java.lang.String destinationName, java.io.Serializable messageObject)
           
static void sendObject(javax.naming.InitialContext ic, java.lang.String factoryJndiName, java.lang.String destinationName, java.io.Serializable messageObject, java.util.Map<java.lang.String,java.lang.Object> properties)
           
 void sendObjectMessage(java.io.Serializable object)
           
 void sendObjectMessage(java.io.Serializable object, java.util.Map<java.lang.String,java.lang.Object> properties)
           
static void sendReply(javax.naming.InitialContext ic, java.lang.String factoryJndiName, javax.jms.Message message, java.io.Serializable replyObject)
           
static void sendReply(javax.naming.InitialContext ic, java.lang.String factoryJndiName, javax.jms.Message message, java.io.Serializable replyObject, java.util.Map<java.lang.String,java.lang.Object> properties)
           
 void setReplyTimeout(long replyTimeout)
           
 
Methods inherited from class org.yajul.jms.Endpoint
close, finalize, getConnection, getConsumer, getDestination, getProducer, getSession, hasConsumer, isQueueEndpoint, receive, receiveNowait, setQueueEndpoint, startConsumer
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageSender

public MessageSender(javax.naming.InitialContext ic,
                     java.lang.String factoryJndiName,
                     java.lang.String destinationName,
                     java.lang.String messageSelector)

MessageSender

public MessageSender(javax.naming.InitialContext ic,
                     java.lang.String factoryJndiName,
                     javax.jms.Destination destination,
                     java.lang.String messageSelector)
Method Detail

onConnectionCreated

protected void onConnectionCreated(javax.jms.Connection connection)
                            throws javax.jms.JMSException
Overrides:
onConnectionCreated in class Endpoint
Throws:
javax.jms.JMSException

getReplyTimeout

public long getReplyTimeout()

setReplyTimeout

public void setReplyTimeout(long replyTimeout)

createObjectMessage

public javax.jms.ObjectMessage createObjectMessage()

send

public void send(javax.jms.Message message)

createTemporaryTopic

public javax.jms.Topic createTemporaryTopic()

sendAndWaitForReply

public javax.jms.Message sendAndWaitForReply(javax.jms.Message msg,
                                             javax.transaction.UserTransaction ut)

sendObjectMessage

public void sendObjectMessage(java.io.Serializable object)

sendObjectMessage

public void sendObjectMessage(java.io.Serializable object,
                              java.util.Map<java.lang.String,java.lang.Object> properties)

sendReply

public static void sendReply(javax.naming.InitialContext ic,
                             java.lang.String factoryJndiName,
                             javax.jms.Message message,
                             java.io.Serializable replyObject)

sendReply

public static void sendReply(javax.naming.InitialContext ic,
                             java.lang.String factoryJndiName,
                             javax.jms.Message message,
                             java.io.Serializable replyObject,
                             java.util.Map<java.lang.String,java.lang.Object> properties)

closeSender

public static void closeSender(MessageSender sender)

sendObject

public static void sendObject(javax.naming.InitialContext ic,
                              java.lang.String factoryJndiName,
                              java.lang.String destinationName,
                              java.io.Serializable messageObject)

sendObject

public static void sendObject(javax.naming.InitialContext ic,
                              java.lang.String factoryJndiName,
                              java.lang.String destinationName,
                              java.io.Serializable messageObject,
                              java.util.Map<java.lang.String,java.lang.Object> properties)


Copyright © 2008. All Rights Reserved.