org.yajul.jms
Class Endpoint

java.lang.Object
  extended by org.yajul.jms.Endpoint
Direct Known Subclasses:
MessageReceiver, MessageSender

public class Endpoint
extends java.lang.Object

Generic JMS producer or consumer.
User: Joshua Davis Date: Sep 18, 2007 Time: 7:07:35 AM


Constructor Summary
Endpoint(javax.naming.InitialContext ic, java.lang.String factoryJndiName, javax.jms.Destination destination, java.lang.String messageSelector)
           
Endpoint(javax.naming.InitialContext ic, java.lang.String factoryJndiName, java.lang.String destinationName, java.lang.String messageSelector)
           
 
Method Summary
 void close()
           
protected  void finalize()
           
 javax.jms.Connection getConnection()
           
protected  javax.jms.MessageConsumer getConsumer()
           
protected  javax.jms.Destination getDestination()
           
 javax.jms.MessageProducer getProducer()
           
 javax.jms.Session getSession()
           
protected  boolean hasConsumer()
           
 boolean isQueueEndpoint()
           
protected  void onConnectionCreated(javax.jms.Connection connection)
           
 javax.jms.Message receive(long timeout)
           
 javax.jms.Message receiveNowait()
           
 void setQueueEndpoint(boolean queueEndpoint)
           
 void startConsumer()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Endpoint

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

Endpoint

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

isQueueEndpoint

public boolean isQueueEndpoint()

setQueueEndpoint

public void setQueueEndpoint(boolean queueEndpoint)

close

public void close()

startConsumer

public void startConsumer()
                   throws javax.jms.JMSException
Throws:
javax.jms.JMSException

receive

public javax.jms.Message receive(long timeout)
                          throws javax.jms.JMSException
Throws:
javax.jms.JMSException

receiveNowait

public javax.jms.Message receiveNowait()
                                throws javax.jms.JMSException
Throws:
javax.jms.JMSException

hasConsumer

protected boolean hasConsumer()

getConsumer

protected javax.jms.MessageConsumer getConsumer()
                                         throws javax.jms.JMSException
Throws:
javax.jms.JMSException

getProducer

public javax.jms.MessageProducer getProducer()
                                      throws javax.jms.JMSException
Throws:
javax.jms.JMSException

getSession

public javax.jms.Session getSession()
                             throws javax.jms.JMSException
Throws:
javax.jms.JMSException

getConnection

public javax.jms.Connection getConnection()
                                   throws javax.jms.JMSException
Throws:
javax.jms.JMSException

onConnectionCreated

protected void onConnectionCreated(javax.jms.Connection connection)
                            throws javax.jms.JMSException
Throws:
javax.jms.JMSException

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

getDestination

protected javax.jms.Destination getDestination()


Copyright © 2008. All Rights Reserved.