net.lariverosc.jesquespring
Class SpringWorker

java.lang.Object
  extended by net.greghaines.jesque.worker.WorkerImpl
      extended by net.lariverosc.jesquespring.SpringWorker
All Implemented Interfaces:
Runnable, net.greghaines.jesque.worker.Worker, net.greghaines.jesque.worker.WorkerEventEmitter, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class SpringWorker
extends net.greghaines.jesque.worker.WorkerImpl
implements org.springframework.context.ApplicationContextAware

Author:
Alejandro Riveros Cruz

Nested Class Summary
 
Nested classes/interfaces inherited from class net.greghaines.jesque.worker.WorkerImpl
net.greghaines.jesque.worker.WorkerImpl.WorkerState
 
Field Summary
 
Fields inherited from class net.greghaines.jesque.worker.WorkerImpl
emptyQueueSleepTime, jedis, listenerDelegate, namespace, queueNames, state
 
Fields inherited from interface net.greghaines.jesque.worker.Worker
ALL_QUEUES
 
Constructor Summary
SpringWorker(net.greghaines.jesque.Config config, Collection<String> queues)
           
 
Method Summary
 void destroy()
          Convenient destroy method for the Spring container
 void init()
          Convenient initialization method for the Spring container
protected  void process(net.greghaines.jesque.Job job, String curQueue)
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 
Methods inherited from class net.greghaines.jesque.worker.WorkerImpl
addJobType, addListener, addListener, addQueue, checkJobTypes, checkPaused, checkQueues, createName, end, execute, failMsg, failure, getExceptionHandler, getJobTypes, getName, getQueues, getReconnectAttempts, getWorkerId, isPaused, isShutdown, isThreadNameChangingEnabled, join, key, poll, recoverFromException, removeAllListeners, removeAllListeners, removeAllQueues, removeJobName, removeJobType, removeListener, removeListener, removeQueue, renameThread, run, setExceptionHandler, setJobTypes, setQueues, setThreadNameChangingEnabled, statusMsg, success, togglePause, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SpringWorker

public SpringWorker(net.greghaines.jesque.Config config,
                    Collection<String> queues)
Parameters:
config - used to create a connection to Redis
queues - the list of queues to poll
Method Detail

process

protected void process(net.greghaines.jesque.Job job,
                       String curQueue)
Overrides:
process in class net.greghaines.jesque.worker.WorkerImpl

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

init

public void init()
Convenient initialization method for the Spring container


destroy

public void destroy()
Convenient destroy method for the Spring container



Copyright © 2012. All Rights Reserved.