net.lariverosc.jesquespring
Class SpringWorkerFactory

java.lang.Object
  extended by net.lariverosc.jesquespring.SpringWorkerFactory
All Implemented Interfaces:
Callable<net.greghaines.jesque.worker.WorkerImpl>, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class SpringWorkerFactory
extends Object
implements Callable<net.greghaines.jesque.worker.WorkerImpl>, org.springframework.context.ApplicationContextAware

Author:
Alejandro Riveros Cruz

Constructor Summary
SpringWorkerFactory(net.greghaines.jesque.Config config, Collection<String> queues)
          Creates a new factory for SpringWorker that use the provided arguments.
 
Method Summary
 net.greghaines.jesque.worker.WorkerImpl call()
          Create a new SpringWorker using the arguments provided in the factory constructor.
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringWorkerFactory

public SpringWorkerFactory(net.greghaines.jesque.Config config,
                           Collection<String> queues)
Creates a new factory for SpringWorker that use the provided arguments.

Parameters:
config - used to create a connection to Redis
queues - the list of queues to poll
Method Detail

call

public net.greghaines.jesque.worker.WorkerImpl call()
Create a new SpringWorker using the arguments provided in the factory constructor.

Specified by:
call in interface Callable<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


Copyright © 2012. All Rights Reserved.