org.objectweb.easybeans.component.quartz
Class QuartzComponent

java.lang.Object
  extended by org.objectweb.easybeans.component.quartz.QuartzComponent
All Implemented Interfaces:
EZBComponent, TimerComponent

public class QuartzComponent
extends java.lang.Object
implements TimerComponent

This component starts the Quartz framework and configure it. It is also providing the Scheduler that EJB timer will use for their use.

Author:
Florent Benoit

Field Summary
private  java.util.List<Property> quartzProperties
          Properties for the scheduler.
private  org.quartz.Scheduler scheduler
          Quartz scheduler shared by all Timer services.
private  org.quartz.SchedulerFactory schedulerFactory
          Quartz scheduler Factory.
 
Constructor Summary
QuartzComponent()
           
 
Method Summary
 java.util.List<Property> getProperties()
          Gets the list of properties.
 org.quartz.Scheduler getScheduler()
          Gets the Quartz scheduler.
 TimerService getTimerService(Factory factory)
          Gets an EJB timer service through this component.
 void init()
          Init method.
This method is called before the start method.
 void setProperties(java.util.List<Property> quartzProperties)
          Set the list of properties.
 void start()
          Start method.
This method is called after the init method.
 void stop()
          Stop method.
This method is called when component needs to be stopped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scheduler

private org.quartz.Scheduler scheduler
Quartz scheduler shared by all Timer services.


quartzProperties

private java.util.List<Property> quartzProperties
Properties for the scheduler. These properties should have been set before the init of the scheduler.


schedulerFactory

private org.quartz.SchedulerFactory schedulerFactory
Quartz scheduler Factory.

Constructor Detail

QuartzComponent

public QuartzComponent()
Method Detail

init

public void init()
          throws EZBComponentException
Init method.
This method is called before the start method.

Specified by:
init in interface EZBComponent
Throws:
EZBComponentException - if the initialization has failed.

start

public void start()
           throws EZBComponentException
Start method.
This method is called after the init method.

Specified by:
start in interface EZBComponent
Throws:
EZBComponentException - if the start has failed.

stop

public void stop()
          throws EZBComponentException
Stop method.
This method is called when component needs to be stopped.

Specified by:
stop in interface EZBComponent
Throws:
EZBComponentException - if the stop is failing.

getTimerService

public TimerService getTimerService(Factory factory)
Gets an EJB timer service through this component.

Specified by:
getTimerService in interface TimerComponent
Parameters:
factory - an EasyBeans factory providing timeout notification.
Returns:
an EJB timer service

getProperties

public java.util.List<Property> getProperties()
Gets the list of properties.

Returns:
the list of properties.

setProperties

public void setProperties(java.util.List<Property> quartzProperties)
Set the list of properties.

Parameters:
quartzProperties - the list of properties.

getScheduler

public org.quartz.Scheduler getScheduler()
Gets the Quartz scheduler.

Returns:
the Quartz scheduler.