org.apache.synapse.message.processors
Class ScheduledMessageProcessor

java.lang.Object
  extended by org.apache.synapse.message.processors.AbstractMessageProcessor
      extended by org.apache.synapse.message.processors.ScheduledMessageProcessor
All Implemented Interfaces:
ManagedLifecycle, MessageProcessor, Nameable, SynapseArtifact
Direct Known Subclasses:
SamplingProcessor, ScheduledMessageForwardingProcessor

public abstract class ScheduledMessageProcessor
extends AbstractMessageProcessor


Nested Class Summary
protected static class ScheduledMessageProcessor.State
           
 
Field Summary
protected  String cronExpression
          A cron expression to run the sampler
protected  long interval
          The interval at which this processor runs , default value is 1000ms
static String PROCESSOR_INSTANCE
           
protected  String quartzConfig
          The quartz configuration file if specified as a parameter
static String SCHEDULED_MESSAGE_PROCESSOR_GROUP
           
protected  org.quartz.Scheduler scheduler
          The scheduler, run the the processor
protected  ScheduledMessageProcessor.State state
          Keep the state of the message processor
 
Fields inherited from class org.apache.synapse.message.processors.AbstractMessageProcessor
configuration, description, fileName, log, messageStore, name, parameters
 
Constructor Summary
ScheduledMessageProcessor()
           
 
Method Summary
 void destroy()
          This method should implement the destroying of the implemented parts of the configuration.
protected  org.quartz.JobDataMap getJobDataMap()
           
protected abstract  org.quartz.JobDetail getJobDetail()
           
 void init(SynapseEnvironment se)
          This method should implement the initialization of the implemented parts of the configuration.
 void setParameters(Map<String,Object> parameters)
          Set the Message processor parameters that will be used by the specific implementation
 void start()
          Start Message Processor
 void stop()
          Stop MessageProcessor
 
Methods inherited from class org.apache.synapse.message.processors.AbstractMessageProcessor
getDescription, getFileName, getMessageStoreName, getName, getParameters, isStarted, setDescription, setFileName, setMessageStoreName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCHEDULED_MESSAGE_PROCESSOR_GROUP

public static final String SCHEDULED_MESSAGE_PROCESSOR_GROUP
See Also:
Constant Field Values

PROCESSOR_INSTANCE

public static final String PROCESSOR_INSTANCE
See Also:
Constant Field Values

scheduler

protected org.quartz.Scheduler scheduler
The scheduler, run the the processor


interval

protected long interval
The interval at which this processor runs , default value is 1000ms


quartzConfig

protected String quartzConfig
The quartz configuration file if specified as a parameter


cronExpression

protected String cronExpression
A cron expression to run the sampler


state

protected ScheduledMessageProcessor.State state
Keep the state of the message processor

Constructor Detail

ScheduledMessageProcessor

public ScheduledMessageProcessor()
Method Detail

start

public void start()
Description copied from interface: MessageProcessor
Start Message Processor


stop

public void stop()
Description copied from interface: MessageProcessor
Stop MessageProcessor


setParameters

public void setParameters(Map<String,Object> parameters)
Description copied from interface: MessageProcessor
Set the Message processor parameters that will be used by the specific implementation

Specified by:
setParameters in interface MessageProcessor
Overrides:
setParameters in class AbstractMessageProcessor

init

public void init(SynapseEnvironment se)
Description copied from interface: ManagedLifecycle
This method should implement the initialization of the implemented parts of the configuration.

Specified by:
init in interface ManagedLifecycle
Overrides:
init in class AbstractMessageProcessor
Parameters:
se - SynapseEnvironment to be used for initialization

getJobDetail

protected abstract org.quartz.JobDetail getJobDetail()

getJobDataMap

protected org.quartz.JobDataMap getJobDataMap()

destroy

public void destroy()
Description copied from interface: ManagedLifecycle
This method should implement the destroying of the implemented parts of the configuration.



Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.