java.lang.Object |
↳ |
com.google.inject.AbstractModule |
|
↳ |
org.nnsoft.guice.guartz.QuartzModule |
Class Overview
Quartz (http://www.quartz-scheduler.org/) Module as Google-Guice extension.
Summary
Protected Methods |
final
void
|
addJobListener(Class<? extends JobListener> jobListenerType)
Add the JobListener binding.
|
final
void
|
addSchedulerListener(Class<? extends SchedulerListener> schedulerListenerType)
Add the SchedulerListener binding.
|
final
void
|
addTriggerListener(Class<? extends TriggerListener> triggerListenerType)
Add the TriggerListener binding.
|
final
void
|
configure()
|
final
SchedulerConfigurationBuilder
|
configureScheduler()
Allows to configure the scheduler.
|
final
<T>
void
|
doBind(Multibinder<T> binder, Class<? extends T> type)
Utility method to respect the DRY principle.
|
abstract
void
|
schedule()
Part of the EDSL builder language for configuring Job s.
|
final
JobSchedulerBuilder
|
scheduleJob(Class<? extends Job> jobClass)
Allows Job scheduling, delegating Guice create the Job instance
and inject members.
|
[Expand]
Inherited Methods |
From class
com.google.inject.AbstractModule
void
|
addError(Message arg0)
|
void
|
addError(String arg0, Object... arg1)
|
void
|
addError(Throwable arg0)
|
<T>
LinkedBindingBuilder<T>
|
bind(Key<T> arg0)
|
<T>
AnnotatedBindingBuilder<T>
|
bind(TypeLiteral<T> arg0)
|
<T>
AnnotatedBindingBuilder<T>
|
bind(Class<T> arg0)
|
AnnotatedConstantBindingBuilder
|
bindConstant()
|
void
|
bindInterceptor(Matcher<? super Class<?>> arg0, Matcher<? super Method> arg1, MethodInterceptor... arg2)
|
void
|
bindListener(Matcher<? super TypeLiteral<?>> arg0, TypeListener arg1)
|
void
|
bindScope(Class<? extends Annotation> arg0, Scope arg1)
|
Binder
|
binder()
|
abstract
void
|
configure()
|
synchronized
final
void
|
configure(Binder arg0)
|
void
|
convertToTypes(Matcher<? super TypeLiteral<?>> arg0, TypeConverter arg1)
|
Stage
|
currentStage()
|
<T>
MembersInjector<T>
|
getMembersInjector(TypeLiteral<T> arg0)
|
<T>
MembersInjector<T>
|
getMembersInjector(Class<T> arg0)
|
<T>
Provider<T>
|
getProvider(Key<T> arg0)
|
<T>
Provider<T>
|
getProvider(Class<T> arg0)
|
void
|
install(Module arg0)
|
void
|
requestInjection(Object arg0)
|
void
|
requestStaticInjection(Class...<?> arg0)
|
void
|
requireBinding(Key<?> arg0)
|
void
|
requireBinding(Class<?> arg0)
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0)
|
final
void
|
wait(long arg0, int arg1)
|
|
From interface
com.google.inject.Module
abstract
void
|
configure(Binder arg0)
|
|
Public Constructors
Protected Methods
protected
final
void
addJobListener
(Class<? extends JobListener> jobListenerType)
Add the JobListener
binding.
Parameters
jobListenerType
| The JobListener class has to be bound
|
protected
final
void
addSchedulerListener
(Class<? extends SchedulerListener> schedulerListenerType)
Add the SchedulerListener
binding.
Parameters
schedulerListenerType
| The SchedulerListener class has to be bound
|
protected
final
void
addTriggerListener
(Class<? extends TriggerListener> triggerListenerType)
Add the TriggerListener
binding.
Parameters
triggerListenerType
| The TriggerListener class has to be bound
|
protected
final
void
configure
()
Allows to configure the scheduler.
Guice.createInjector(..., new QuartzModule() {
@Override
protected void schedule() {
configureScheduler().withManualStart().withProperties(...);
}
});
protected
final
void
doBind
(Multibinder<T> binder, Class<? extends T> type)
Utility method to respect the DRY principle.
protected
abstract
void
schedule
()
Part of the EDSL builder language for configuring Job
s.
Here is a typical example of scheduling Job
s when creating your Guice injector:
Guice.createInjector(..., new QuartzModule() {
@Override
protected void schedule() {
scheduleJob(MyJobImpl.class).withCronExpression("0/2 * * * * ?");
}
});
protected
final
JobSchedulerBuilder
scheduleJob
(Class<? extends Job> jobClass)
Allows Job
scheduling, delegating Guice create the Job
instance
and inject members.
If given Job
class is annotated with Scheduled
, then Job
and related Trigger
values will be extracted from it.
Parameters
jobClass
| The Job has to be scheduled |