Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.activemq.ra
Class ActiveMQPollingEndpointWorker  view ActiveMQPollingEndpointWorker download ActiveMQPollingEndpointWorker.java

java.lang.Object
  extended byorg.activemq.ra.ActiveMQBaseEndpointWorker
      extended byorg.activemq.ra.ActiveMQPollingEndpointWorker
All Implemented Interfaces:
java.lang.Runnable, javax.resource.spi.work.Work

public class ActiveMQPollingEndpointWorker
extends ActiveMQBaseEndpointWorker
implements javax.resource.spi.work.Work

Version:
$Revision: 1.1.1.1 $ $Date: 2005/03/11 21:15:10 $

Field Summary
private  javax.jms.Connection connection
           
private  org.activemq.ActiveMQConnectionConsumer consumer
           
(package private) static javax.resource.spi.work.WorkListener debugingWorkListener
           
private static org.apache.commons.logging.Log log
           
private static int MAX_WORKERS
           
private  SynchronizedBoolean started
           
private  Latch stopLatch
           
private  SynchronizedBoolean stopping
           
private  CircularQueue workers
           
 
Fields inherited from class org.activemq.ra.ActiveMQBaseEndpointWorker
adapter, endpointActivationKey, endpointFactory, ON_MESSAGE_METHOD, transacted, workManager
 
Constructor Summary
ActiveMQPollingEndpointWorker(ActiveMQResourceAdapter adapter, ActiveMQEndpointActivationKey key)
           
 
Method Summary
private  java.lang.String emptyToNull(java.lang.String value)
           
 void release()
           
 void run()
          The WorkManager has started up and we now need to pull message off the destination and push them to an endpoint.
 void start()
           
 void stop()
           
 
Methods inherited from class org.activemq.ra.ActiveMQBaseEndpointWorker
safeClose, safeClose, safeClose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log

MAX_WORKERS

private static final int MAX_WORKERS
See Also:
Constant Field Values

started

private SynchronizedBoolean started

stopping

private SynchronizedBoolean stopping

stopLatch

private Latch stopLatch

consumer

private org.activemq.ActiveMQConnectionConsumer consumer

workers

private CircularQueue workers

debugingWorkListener

static javax.resource.spi.work.WorkListener debugingWorkListener

connection

private javax.jms.Connection connection
Constructor Detail

ActiveMQPollingEndpointWorker

public ActiveMQPollingEndpointWorker(ActiveMQResourceAdapter adapter,
                                     ActiveMQEndpointActivationKey key)
                              throws javax.resource.ResourceException
Method Detail

start

public void start()
           throws javax.resource.spi.work.WorkException,
                  javax.resource.ResourceException
Specified by:
start in class ActiveMQBaseEndpointWorker

emptyToNull

private java.lang.String emptyToNull(java.lang.String value)

stop

public void stop()
          throws java.lang.InterruptedException
Specified by:
stop in class ActiveMQBaseEndpointWorker

release

public void release()
Specified by:
release in interface javax.resource.spi.work.Work

run

public void run()
The WorkManager has started up and we now need to pull message off the destination and push them to an endpoint.

Specified by:
run in interface java.lang.Runnable