org.apache.synapse.message.processors
Class AbstractMessageProcessor

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

public abstract class AbstractMessageProcessor
extends Object
implements MessageProcessor

Class AbstractMessageProcessor is handles Message processing of the messages in Message Store. Abstract Message Store is assumes that Message processors can be implemented using the quartz scheduler jobs. If in case we user wants a different implementation They can directly use MessageProcessor interface for that implementations


Nested Class Summary
protected static class AbstractMessageProcessor.State
           
 
Field Summary
protected  SynapseConfiguration configuration
           
protected  String description
           
protected  String fileName
           
protected  org.apache.commons.logging.Log log
           
protected  String messageStore
          Message Store associated with Message processor
protected  String name
           
protected  Map<String,Object> parameters
          message store parameters
 
Constructor Summary
AbstractMessageProcessor()
           
 
Method Summary
 String getDescription()
          Retrieves the description of the artifact
 String getFileName()
          get the file name that the message processor is configured
 String getMessageStoreName()
          Get message store name associated with the Message processor
 String getName()
          Get the name of an abstraction
 Map<String,Object> getParameters()
          Get the Message processor Parameters
 void init(SynapseEnvironment se)
          This method should implement the initialization of the implemented parts of the configuration.
 boolean isStarted()
          Returns weather a Message processor is started or not
 void setDescription(String description)
          Set the description of the artifact
 void setFileName(String filename)
          Set the name of the file that the Message Processor is configured
 void setMessageStoreName(String messageStore)
          Set the Message Store name that backs the Message processor
 void setName(String name)
          Set the name of an abstraction
 void setParameters(Map<String,Object> parameters)
          Set the Message processor parameters that will be used by the specific implementation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.synapse.message.processors.MessageProcessor
start, stop
 
Methods inherited from interface org.apache.synapse.ManagedLifecycle
destroy
 

Field Detail

log

protected org.apache.commons.logging.Log log

messageStore

protected String messageStore
Message Store associated with Message processor


description

protected String description

name

protected String name

fileName

protected String fileName

configuration

protected SynapseConfiguration configuration

parameters

protected Map<String,Object> parameters
message store parameters

Constructor Detail

AbstractMessageProcessor

public AbstractMessageProcessor()
Method Detail

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
Parameters:
se - SynapseEnvironment to be used for initialization

setMessageStoreName

public void setMessageStoreName(String messageStore)
Description copied from interface: MessageProcessor
Set the Message Store name that backs the Message processor

Specified by:
setMessageStoreName in interface MessageProcessor
Parameters:
messageStore - name the underlying MessageStore instance

getMessageStoreName

public String getMessageStoreName()
Description copied from interface: MessageProcessor
Get message store name associated with the Message processor

Specified by:
getMessageStoreName in interface MessageProcessor
Returns:
message store name associated with message processor

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

getParameters

public Map<String,Object> getParameters()
Description copied from interface: MessageProcessor
Get the Message processor Parameters

Specified by:
getParameters in interface MessageProcessor
Returns:

isStarted

public boolean isStarted()
Description copied from interface: MessageProcessor
Returns weather a Message processor is started or not

Specified by:
isStarted in interface MessageProcessor
Returns:

getName

public String getName()
Description copied from interface: Nameable
Get the name of an abstraction

Specified by:
getName in interface Nameable
Returns:
String Representation of name

setName

public void setName(String name)
Description copied from interface: Nameable
Set the name of an abstraction

Specified by:
setName in interface Nameable
Parameters:
name - String Representation of name

setDescription

public void setDescription(String description)
Description copied from interface: SynapseArtifact
Set the description of the artifact

Specified by:
setDescription in interface SynapseArtifact
Parameters:
description - tobe set to the artifact

getDescription

public String getDescription()
Description copied from interface: SynapseArtifact
Retrieves the description of the artifact

Specified by:
getDescription in interface SynapseArtifact
Returns:
description of the artifact

setFileName

public void setFileName(String filename)
Description copied from interface: MessageProcessor
Set the name of the file that the Message Processor is configured

Specified by:
setFileName in interface MessageProcessor
Parameters:
filename - Name of the file where this artifact is defined

getFileName

public String getFileName()
Description copied from interface: MessageProcessor
get the file name that the message processor is configured

Specified by:
getFileName in interface MessageProcessor
Returns:
Name of the file where this artifact is defined


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