/** * Creates a <CODE>QueueSender</CODE> object to send messages to the * specified queue. * * @param queue the <CODE>Queue</CODE> to access, or null if this is an * unidentified producer * @return QueueSender * @throws JMSException if the session fails to create a sender due to some * internal error. * @throws InvalidDestinationException if an invalid queue is specified. */ @Override public QueueSender createSender(Queue queue) throws JMSException { checkClosed(); if (queue instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)queue; return customDestination.createSender(this); } int timeSendOut = connection.getSendTimeout(); return new ActiveMQQueueSender(this, ActiveMQMessageTransformation.transformDestination(queue),timeSendOut); }
/** * Creates a publisher for the specified topic. <p/> * <P> * A client uses a <CODE>TopicPublisher</CODE> object to publish messages * on a topic. Each time a client creates a <CODE>TopicPublisher</CODE> on * a topic, it defines a new sequence of messages that have no ordering * relationship with the messages it has previously sent. * * @param topic the <CODE>Topic</CODE> to publish to, or null if this is * an unidentified producer * @return TopicPublisher * @throws JMSException if the session fails to create a publisher due to * some internal error. * @throws InvalidDestinationException if an invalid topic is specified. */ @Override public TopicPublisher createPublisher(Topic topic) throws JMSException { checkClosed(); if (topic instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)topic; return customDestination.createPublisher(this); } int timeSendOut = connection.getSendTimeout(); return new ActiveMQTopicPublisher(this, ActiveMQMessageTransformation.transformDestination(topic),timeSendOut); }
/** * Creates a <CODE>MessageProducer</CODE> to send messages to the * specified destination. * <P> * A client uses a <CODE>MessageProducer</CODE> object to send messages to * a destination. Since <CODE>Queue </CODE> and <CODE>Topic</CODE> both * inherit from <CODE>Destination</CODE>, they can be used in the * destination parameter to create a <CODE>MessageProducer</CODE> object. * * @param destination the <CODE>Destination</CODE> to send to, or null if * this is a producer which does not have a specified * destination. * @return the MessageProducer * @throws JMSException if the session fails to create a MessageProducer due * to some internal error. * @throws InvalidDestinationException if an invalid destination is * specified. * @since 1.1 */ @Override public MessageProducer createProducer(Destination destination) throws JMSException { checkClosed(); if (destination instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)destination; return customDestination.createProducer(this); } int timeSendOut = connection.getSendTimeout(); return new ActiveMQMessageProducer(this, getNextProducerId(), ActiveMQMessageTransformation.transformDestination(destination),timeSendOut); }
@Override public MessageProducer createProducer(final Destination destination) throws JMSException { checkClosed(); if (CustomDestination.class.isInstance(destination)) { return CustomDestination.class.cast(destination).createProducer(this); } return new TomEEProducer(this, getNextProducerId(), ActiveMQMessageTransformation.transformDestination(destination), connection.getSendTimeout()); }
/** * Creates a <CODE>QueueSender</CODE> object to send messages to the * specified queue. * * @param queue the <CODE>Queue</CODE> to access, or null if this is an * unidentified producer * @return QueueSender * @throws JMSException if the session fails to create a sender due to some * internal error. * @throws InvalidDestinationException if an invalid queue is specified. */ @Override public QueueSender createSender(Queue queue) throws JMSException { checkClosed(); if (queue instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)queue; return customDestination.createSender(this); } int timeSendOut = connection.getSendTimeout(); return new ActiveMQQueueSender(this, ActiveMQMessageTransformation.transformDestination(queue),timeSendOut); }
/** * Creates a <CODE>QueueSender</CODE> object to send messages to the * specified queue. * * @param queue the <CODE>Queue</CODE> to access, or null if this is an * unidentified producer * @return QueueSender * @throws JMSException if the session fails to create a sender due to some * internal error. * @throws InvalidDestinationException if an invalid queue is specified. */ @Override public QueueSender createSender(Queue queue) throws JMSException { checkClosed(); if (queue instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)queue; return customDestination.createSender(this); } int timeSendOut = connection.getSendTimeout(); return new ActiveMQQueueSender(this, ActiveMQMessageTransformation.transformDestination(queue),timeSendOut); }
/** * Creates a <CODE>QueueSender</CODE> object to send messages to the * specified queue. * * @param queue the <CODE>Queue</CODE> to access, or null if this is an * unidentified producer * @return QueueSender * @throws JMSException if the session fails to create a sender due to some * internal error. * @throws InvalidDestinationException if an invalid queue is specified. */ public QueueSender createSender(Queue queue) throws JMSException { checkClosed(); if (queue instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)queue; return customDestination.createSender(this); } int timeSendOut = connection.getSendTimeout(); return new ActiveMQQueueSender(this, ActiveMQMessageTransformation.transformDestination(queue),timeSendOut); }
/** * Creates a <CODE>QueueSender</CODE> object to send messages to the * specified queue. * * @param queue the <CODE>Queue</CODE> to access, or null if this is an * unidentified producer * @return QueueSender * @throws JMSException if the session fails to create a sender due to some * internal error. * @throws InvalidDestinationException if an invalid queue is specified. */ @Override public QueueSender createSender(Queue queue) throws JMSException { checkClosed(); if (queue instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)queue; return customDestination.createSender(this); } int timeSendOut = connection.getSendTimeout(); return new ActiveMQQueueSender(this, ActiveMQMessageTransformation.transformDestination(queue),timeSendOut); }
/** * Creates a publisher for the specified topic. <p/> * <P> * A client uses a <CODE>TopicPublisher</CODE> object to publish messages * on a topic. Each time a client creates a <CODE>TopicPublisher</CODE> on * a topic, it defines a new sequence of messages that have no ordering * relationship with the messages it has previously sent. * * @param topic the <CODE>Topic</CODE> to publish to, or null if this is * an unidentified producer * @return TopicPublisher * @throws JMSException if the session fails to create a publisher due to * some internal error. * @throws InvalidDestinationException if an invalid topic is specified. */ @Override public TopicPublisher createPublisher(Topic topic) throws JMSException { checkClosed(); if (topic instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)topic; return customDestination.createPublisher(this); } int timeSendOut = connection.getSendTimeout(); return new ActiveMQTopicPublisher(this, ActiveMQMessageTransformation.transformDestination(topic),timeSendOut); }
/** * Creates a publisher for the specified topic. <p/> * <P> * A client uses a <CODE>TopicPublisher</CODE> object to publish messages * on a topic. Each time a client creates a <CODE>TopicPublisher</CODE> on * a topic, it defines a new sequence of messages that have no ordering * relationship with the messages it has previously sent. * * @param topic the <CODE>Topic</CODE> to publish to, or null if this is * an unidentified producer * @return TopicPublisher * @throws JMSException if the session fails to create a publisher due to * some internal error. * @throws InvalidDestinationException if an invalid topic is specified. */ @Override public TopicPublisher createPublisher(Topic topic) throws JMSException { checkClosed(); if (topic instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)topic; return customDestination.createPublisher(this); } int timeSendOut = connection.getSendTimeout(); return new ActiveMQTopicPublisher(this, ActiveMQMessageTransformation.transformDestination(topic),timeSendOut); }
/** * Creates a publisher for the specified topic. <p/> * <P> * A client uses a <CODE>TopicPublisher</CODE> object to publish messages * on a topic. Each time a client creates a <CODE>TopicPublisher</CODE> on * a topic, it defines a new sequence of messages that have no ordering * relationship with the messages it has previously sent. * * @param topic the <CODE>Topic</CODE> to publish to, or null if this is * an unidentified producer * @return TopicPublisher * @throws JMSException if the session fails to create a publisher due to * some internal error. * @throws InvalidDestinationException if an invalid topic is specified. */ @Override public TopicPublisher createPublisher(Topic topic) throws JMSException { checkClosed(); if (topic instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)topic; return customDestination.createPublisher(this); } int timeSendOut = connection.getSendTimeout(); return new ActiveMQTopicPublisher(this, ActiveMQMessageTransformation.transformDestination(topic),timeSendOut); }
/** * Creates a publisher for the specified topic. <p/> * <P> * A client uses a <CODE>TopicPublisher</CODE> object to publish messages * on a topic. Each time a client creates a <CODE>TopicPublisher</CODE> on * a topic, it defines a new sequence of messages that have no ordering * relationship with the messages it has previously sent. * * @param topic the <CODE>Topic</CODE> to publish to, or null if this is * an unidentified producer * @return TopicPublisher * @throws JMSException if the session fails to create a publisher due to * some internal error. * @throws InvalidDestinationException if an invalid topic is specified. */ public TopicPublisher createPublisher(Topic topic) throws JMSException { checkClosed(); if (topic instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)topic; return customDestination.createPublisher(this); } int timeSendOut = connection.getSendTimeout(); return new ActiveMQTopicPublisher(this, ActiveMQMessageTransformation.transformDestination(topic),timeSendOut); }
/** * Creates a <CODE>MessageProducer</CODE> to send messages to the * specified destination. * <P> * A client uses a <CODE>MessageProducer</CODE> object to send messages to * a destination. Since <CODE>Queue </CODE> and <CODE>Topic</CODE> both * inherit from <CODE>Destination</CODE>, they can be used in the * destination parameter to create a <CODE>MessageProducer</CODE> object. * * @param destination the <CODE>Destination</CODE> to send to, or null if * this is a producer which does not have a specified * destination. * @return the MessageProducer * @throws JMSException if the session fails to create a MessageProducer due * to some internal error. * @throws InvalidDestinationException if an invalid destination is * specified. * @since 1.1 */ @Override public MessageProducer createProducer(Destination destination) throws JMSException { checkClosed(); if (destination instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)destination; return customDestination.createProducer(this); } int timeSendOut = connection.getSendTimeout(); return new ActiveMQMessageProducer(this, getNextProducerId(), ActiveMQMessageTransformation.transformDestination(destination),timeSendOut); }
/** * Creates a <CODE>MessageProducer</CODE> to send messages to the * specified destination. * <P> * A client uses a <CODE>MessageProducer</CODE> object to send messages to * a destination. Since <CODE>Queue </CODE> and <CODE>Topic</CODE> both * inherit from <CODE>Destination</CODE>, they can be used in the * destination parameter to create a <CODE>MessageProducer</CODE> object. * * @param destination the <CODE>Destination</CODE> to send to, or null if * this is a producer which does not have a specified * destination. * @return the MessageProducer * @throws JMSException if the session fails to create a MessageProducer due * to some internal error. * @throws InvalidDestinationException if an invalid destination is * specified. * @since 1.1 */ @Override public MessageProducer createProducer(Destination destination) throws JMSException { checkClosed(); if (destination instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)destination; return customDestination.createProducer(this); } int timeSendOut = connection.getSendTimeout(); return new ActiveMQMessageProducer(this, getNextProducerId(), ActiveMQMessageTransformation.transformDestination(destination),timeSendOut); }
/** * Creates a <CODE>MessageProducer</CODE> to send messages to the * specified destination. * <P> * A client uses a <CODE>MessageProducer</CODE> object to send messages to * a destination. Since <CODE>Queue </CODE> and <CODE>Topic</CODE> both * inherit from <CODE>Destination</CODE>, they can be used in the * destination parameter to create a <CODE>MessageProducer</CODE> object. * * @param destination the <CODE>Destination</CODE> to send to, or null if * this is a producer which does not have a specified * destination. * @return the MessageProducer * @throws JMSException if the session fails to create a MessageProducer due * to some internal error. * @throws InvalidDestinationException if an invalid destination is * specified. * @since 1.1 */ @Override public MessageProducer createProducer(Destination destination) throws JMSException { checkClosed(); if (destination instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)destination; return customDestination.createProducer(this); } int timeSendOut = connection.getSendTimeout(); return new ActiveMQMessageProducer(this, getNextProducerId(), ActiveMQMessageTransformation.transformDestination(destination),timeSendOut); }
/** * Creates a <CODE>MessageProducer</CODE> to send messages to the * specified destination. * <P> * A client uses a <CODE>MessageProducer</CODE> object to send messages to * a destination. Since <CODE>Queue </CODE> and <CODE>Topic</CODE> both * inherit from <CODE>Destination</CODE>, they can be used in the * destination parameter to create a <CODE>MessageProducer</CODE> object. * * @param destination the <CODE>Destination</CODE> to send to, or null if * this is a producer which does not have a specified * destination. * @return the MessageProducer * @throws JMSException if the session fails to create a MessageProducer due * to some internal error. * @throws InvalidDestinationException if an invalid destination is * specified. * @since 1.1 */ public MessageProducer createProducer(Destination destination) throws JMSException { checkClosed(); if (destination instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)destination; return customDestination.createProducer(this); } int timeSendOut = connection.getSendTimeout(); return new ActiveMQMessageProducer(this, getNextProducerId(), ActiveMQMessageTransformation.transformDestination(destination),timeSendOut); }