public abstract class AbstractMessageProcessor extends java.lang.Object implements MessageProcessor
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 implementationsModifier and Type | Field and Description |
---|---|
protected java.lang.String |
artifactContainerName
Name of the artifact container from which the message processor deployed
|
protected SynapseConfiguration |
configuration |
protected java.lang.String |
description |
protected java.lang.String |
fileName |
protected boolean |
isEdited
Whether the message processor edited via the management console
|
protected java.util.List<MessageConsumer> |
messageConsumers |
protected java.lang.String |
messageStore
Message Store associated with Message processor
|
protected java.lang.String |
name |
protected java.util.Map<java.lang.String,java.lang.Object> |
parameters
message store parameters
|
protected java.lang.String |
targetEndpoint
This attribute is only need for forwarding message processor.
|
Constructor and Description |
---|
AbstractMessageProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
destroy(boolean preserveState)
Undeploy the artifact but keeps the current state based on the preserveState argument.
|
void |
destroy(boolean preserveState,
boolean isUpdate)
Destroy the artifacts.
|
java.lang.String |
getArtifactContainerName()
Get the name of the artifact container from which the message processor deployed
|
java.lang.String |
getDescription()
Retrieves the description of the artifact
|
java.lang.String |
getFileName()
This method is used to retrieve the configuration file name of the message processor.
|
java.util.List<MessageConsumer> |
getMessageConsumer()
This method retrieves the message consumer of message processor.
|
java.lang.String |
getMessageStoreName()
This method returns the associated message store name of the message processor.
|
java.lang.String |
getName()
Get the name of an abstraction
|
java.util.Map<java.lang.String,java.lang.Object> |
getParameters()
This method is used to retrieve the configuration parameters of message processor.
|
java.lang.String |
getTargetEndpoint()
This method is used to retrieve the associated target endpoint name of the message processor.
|
void |
init(SynapseEnvironment se)
This method should implement the initialization of the
implemented parts of the configuration.
|
boolean |
isEdited()
Whether the message processor edited through the management console
|
void |
setArtifactContainerName(java.lang.String artifactContainerName)
Set the name of the artifact container from which the message processor deployed
|
void |
setDescription(java.lang.String description)
Set the description of the artifact
|
void |
setFileName(java.lang.String filename)
This method is used to set the actual configuration file.
|
void |
setIsEdited(boolean isEdited)
Set whether the message processor edited through the management console
|
boolean |
setMessageConsumer(MessageConsumer consumer)
This method is used to set the message consumer of message processor.
|
void |
setMessageStoreName(java.lang.String messageStore)
This method is used to set the associated message store of the message processor.
|
void |
setName(java.lang.String name)
Set the name of an abstraction
|
void |
setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
This method is used to set configuration parameters of the message processor.
|
void |
setTargetEndpoint(java.lang.String targetEndpoint)
This method set the target endpoint associated with the message processor.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activate, cleanUpDeactivatedProcessors, cleanupLocalResources, deactivate, isDeactivated, isPaused, pauseService, resumeRemotely, resumeService, start, stop
destroy
protected java.lang.String messageStore
protected java.lang.String description
protected java.lang.String name
protected java.lang.String fileName
protected SynapseConfiguration configuration
protected java.util.List<MessageConsumer> messageConsumers
protected java.lang.String artifactContainerName
protected boolean isEdited
protected java.lang.String targetEndpoint
protected java.util.Map<java.lang.String,java.lang.Object> parameters
public void init(SynapseEnvironment se)
ManagedLifecycle
init
in interface ManagedLifecycle
se
- SynapseEnvironment to be used for initializationpublic void setMessageStoreName(java.lang.String messageStore)
MessageProcessor
setMessageStoreName
in interface MessageProcessor
messageStore
- Name of this message store.public java.lang.String getMessageStoreName()
MessageProcessor
getMessageStoreName
in interface MessageProcessor
public void setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
MessageProcessor
setParameters
in interface MessageProcessor
parameters
- Message processor parameters.public java.util.Map<java.lang.String,java.lang.Object> getParameters()
MessageProcessor
getParameters
in interface MessageProcessor
public java.lang.String getName()
Nameable
public void setName(java.lang.String name)
Nameable
public void setDescription(java.lang.String description)
SynapseArtifact
setDescription
in interface SynapseArtifact
description
- tobe set to the artifactpublic java.lang.String getDescription()
SynapseArtifact
getDescription
in interface SynapseArtifact
public void setFileName(java.lang.String filename)
MessageProcessor
setFileName
in interface MessageProcessor
filename
- is the name of the filepublic java.lang.String getFileName()
MessageProcessor
getFileName
in interface MessageProcessor
public java.util.List<MessageConsumer> getMessageConsumer()
MessageProcessor
getMessageConsumer
in interface MessageProcessor
public boolean setMessageConsumer(MessageConsumer consumer)
MessageProcessor
setMessageConsumer
in interface MessageProcessor
consumer
- is the name of the associated message consumerpublic void setTargetEndpoint(java.lang.String targetEndpoint)
MessageProcessor
setTargetEndpoint
in interface MessageProcessor
targetEndpoint
- is the name of the associated endpointpublic java.lang.String getTargetEndpoint()
MessageProcessor
getTargetEndpoint
in interface MessageProcessor
public boolean isEdited()
isEdited
in interface MessageProcessor
public void setIsEdited(boolean isEdited)
setIsEdited
in interface MessageProcessor
isEdited
- public java.lang.String getArtifactContainerName()
getArtifactContainerName
in interface MessageProcessor
public void setArtifactContainerName(java.lang.String artifactContainerName)
setArtifactContainerName
in interface MessageProcessor
artifactContainerName
- public void destroy(boolean preserveState)
preserveState
- determine whether to preserve the artifacts state or notpublic void destroy(boolean preserveState, boolean isUpdate)
preserveState
- whether to preserve state in registry.isUpdate
- whether this is triggered in artifact update flow.Copyright © 2005-2021 Apache Software Foundation. All Rights Reserved.