org.mule.transport.jms.reconnect
Class ReconnectWorkManager

java.lang.Object
  extended by org.mule.transport.jms.reconnect.ReconnectWorkManager
All Implemented Interfaces:
Executor, javax.resource.spi.work.WorkManager, Disposable, Startable

public class ReconnectWorkManager
extends Object
implements WorkManager

Fake work manager for executing jms endpoint level reconnection thread. It will create only one thread since it's bound to one endpoint and it only requires one thread.


Nested Class Summary
static class ReconnectWorkManager.WorkDelegate
           
 
Field Summary
 
Fields inherited from interface javax.resource.spi.work.WorkManager
IMMEDIATE, INDEFINITE, UNKNOWN
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
ReconnectWorkManager(MuleContext muleContext)
           
 
Method Summary
 void dispose()
          A lifecycle method where implementor should free up any resources.
 void doWork(javax.resource.spi.work.Work work)
           
 void doWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext execContext, javax.resource.spi.work.WorkListener workListener)
           
 void execute(Runnable runnable)
           
 boolean isStarted()
          Is the WorkManager ready to accept work?
 void scheduleWork(javax.resource.spi.work.Work work)
           
 void scheduleWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext execContext, javax.resource.spi.work.WorkListener workListener)
           
 void start()
           
 long startWork(javax.resource.spi.work.Work work)
           
 long startWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext execContext, javax.resource.spi.work.WorkListener workListener)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReconnectWorkManager

public ReconnectWorkManager(MuleContext muleContext)
Method Detail

isStarted

public boolean isStarted()
Description copied from interface: WorkManager
Is the WorkManager ready to accept work?


dispose

public void dispose()
Description copied from interface: Disposable
A lifecycle method where implementor should free up any resources. If an exception is thrown it should just be logged and processing should continue. This method should not throw Runtime exceptions.

Specified by:
dispose in interface Disposable

stop

public void stop()

execute

public void execute(Runnable runnable)
Specified by:
execute in interface Executor

start

public void start()
           throws MuleException
Specified by:
start in interface Startable
Throws:
MuleException

doWork

public void doWork(javax.resource.spi.work.Work work)
            throws javax.resource.spi.work.WorkException
Specified by:
doWork in interface javax.resource.spi.work.WorkManager
Throws:
javax.resource.spi.work.WorkException

doWork

public void doWork(javax.resource.spi.work.Work work,
                   long startTimeout,
                   javax.resource.spi.work.ExecutionContext execContext,
                   javax.resource.spi.work.WorkListener workListener)
            throws javax.resource.spi.work.WorkException
Specified by:
doWork in interface javax.resource.spi.work.WorkManager
Throws:
javax.resource.spi.work.WorkException

startWork

public long startWork(javax.resource.spi.work.Work work)
               throws javax.resource.spi.work.WorkException
Specified by:
startWork in interface javax.resource.spi.work.WorkManager
Throws:
javax.resource.spi.work.WorkException

startWork

public long startWork(javax.resource.spi.work.Work work,
                      long startTimeout,
                      javax.resource.spi.work.ExecutionContext execContext,
                      javax.resource.spi.work.WorkListener workListener)
               throws javax.resource.spi.work.WorkException
Specified by:
startWork in interface javax.resource.spi.work.WorkManager
Throws:
javax.resource.spi.work.WorkException

scheduleWork

public void scheduleWork(javax.resource.spi.work.Work work)
                  throws javax.resource.spi.work.WorkException
Specified by:
scheduleWork in interface javax.resource.spi.work.WorkManager
Throws:
javax.resource.spi.work.WorkException

scheduleWork

public void scheduleWork(javax.resource.spi.work.Work work,
                         long startTimeout,
                         javax.resource.spi.work.ExecutionContext execContext,
                         javax.resource.spi.work.WorkListener workListener)
                  throws javax.resource.spi.work.WorkException
Specified by:
scheduleWork in interface javax.resource.spi.work.WorkManager
Throws:
javax.resource.spi.work.WorkException


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.