Class SjmsProducer

  • All Implemented Interfaces:
    AutoCloseable, org.apache.camel.AsyncProcessor, org.apache.camel.AsyncProducer, org.apache.camel.EndpointAware, org.apache.camel.IsSingleton, org.apache.camel.Processor, org.apache.camel.Producer, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
    Direct Known Subclasses:
    InOnlyProducer, InOutProducer

    public abstract class SjmsProducer
    extends org.apache.camel.support.DefaultAsyncProducer
    Base SjmsProducer class.
    • Constructor Detail

      • SjmsProducer

        public SjmsProducer​(org.apache.camel.Endpoint endpoint)
    • Method Detail

      • doStart

        protected void doStart()
                        throws Exception
        Overrides:
        doStart in class org.apache.camel.support.DefaultProducer
        Throws:
        Exception
      • doStop

        protected void doStop()
                       throws Exception
        Overrides:
        doStop in class org.apache.camel.support.DefaultProducer
        Throws:
        Exception
      • getEndpoint

        public SjmsEndpoint getEndpoint()
        Specified by:
        getEndpoint in interface org.apache.camel.EndpointAware
        Overrides:
        getEndpoint in class org.apache.camel.support.DefaultProducer
      • createSession

        protected javax.jms.Session createSession()
                                           throws Exception
        Throws:
        Exception
      • process

        public boolean process​(org.apache.camel.Exchange exchange,
                               org.apache.camel.AsyncCallback callback)
      • getOrCreateConnectionResource

        protected ConnectionResource getOrCreateConnectionResource()
      • getAcknowledgeMode

        public int getAcknowledgeMode()
        Gets the acknowledgment mode for this instance of DestinationProducer.
        Returns:
        int
      • isSynchronous

        public boolean isSynchronous()
        Gets the synchronous value for this instance of DestinationProducer.
        Returns:
        true if synchronous, otherwise false
      • getReplyTo

        public String getReplyTo()
        Gets the replyTo for this instance of DestinationProducer.
        Returns:
        String
      • getDestinationName

        public String getDestinationName()
        Gets the destinationName for this instance of DestinationProducer.
        Returns:
        String
      • setProducers

        public void setProducers​(org.apache.commons.pool.impl.GenericObjectPool<MessageProducerResources> producers)
        Sets the producer pool for this instance of SjmsProducer.
        Parameters:
        producers - A MessageProducerPool
      • getProducers

        public org.apache.commons.pool.impl.GenericObjectPool<MessageProducerResources> getProducers()
        Gets the MessageProducerPool value of producers for this instance of SjmsProducer.
        Returns:
        the producers
      • isTopic

        public boolean isTopic()
        Test to verify if this endpoint is a JMS Topic or Queue.
        Returns:
        true if it is a Topic, otherwise it is a Queue
      • isEndpointTransacted

        public boolean isEndpointTransacted()
        Test to determine if this endpoint should use a JMS Transaction.
        Returns:
        true if transacted, otherwise false
      • isSharedJMSSession

        public boolean isSharedJMSSession()
        Test to determine if this endpoint should share a JMS Session with other SJMS endpoints.
        Returns:
        true if shared, otherwise false
      • getNamedReplyTo

        public String getNamedReplyTo()
        Returns the named reply to value for this producer
        Returns:
        true if it is a Topic, otherwise it is a Queue
      • getProducerCount

        public int getProducerCount()
        Gets the producerCount for this instance of SjmsProducer.
        Returns:
        int
      • getConsumerCount

        public int getConsumerCount()
        Gets consumerCount for this instance of SjmsProducer.
        Returns:
        int
      • getExecutor

        public ExecutorService getExecutor()
        Gets the executor for this instance of SjmsProducer.
        Returns:
        ExecutorService
      • getTtl

        public long getTtl()
        Gets the ttl for this instance of SjmsProducer.
        Returns:
        long
      • isPersistent

        public boolean isPersistent()
        Gets the boolean value of persistent for this instance of SjmsProducer.
        Returns:
        true if persistent, otherwise false
      • getResponseTimeOut

        public long getResponseTimeOut()
        Gets responseTimeOut for this instance of SjmsProducer.
        Returns:
        long
      • getCommitStrategy

        protected TransactionCommitStrategy getCommitStrategy()
        Gets commitStrategy for this instance of SjmsProducer.
        Returns:
        TransactionCommitStrategy