public abstract class AbstractMessageStore extends Object implements MessageStore
Modifier and Type | Field and Description |
---|---|
protected String |
description
Message Store description
|
protected String |
fileName
Name of the file where this message store is defined
|
protected Lock |
lock |
protected MessageStoreView |
messageStoreMBean
Message store JMX view
|
protected List<MessageStoreObserver> |
messageStoreObservers
List that holds the MessageStore observers registered with the Message Store
|
protected String |
name
message store name
|
protected Map<String,String> |
parameterKeyMap
Message store parameters with registry keys
|
protected Map<String,Object> |
parameters
Message store parameters
|
protected String |
sequence
name of the sequence to be executed before storing the message
|
protected SynapseConfiguration |
synapseConfiguration
synapse configuration reference
|
protected SynapseEnvironment |
synapseEnvironment
synapse environment reference
|
Constructor and Description |
---|
AbstractMessageStore() |
Modifier and Type | Method and Description |
---|---|
void |
addParameter(String name,
String key)
Adds message store specific parameters
|
void |
addParameterKey(String name,
String key)
Adds message store parameter registry keys
|
void |
dequeued() |
void |
destroy()
This method should implement the destroying of the
implemented parts of the configuration.
|
long |
difference() |
void |
enqueued() |
String |
getArtifactContainerName()
Get the name of the artifact container from which the message store deployed
|
String |
getDescription()
Retrieves the description of the artifact
|
String |
getFileName()
get the file name that the message store is configured
|
Lock |
getLock() |
String |
getName()
Get the name of an abstraction
|
String |
getParameterKey(String name)
Gets parameter registry key from the parameter name
|
Map<String,String> |
getParameterKeyMap()
Gets registry key mappings for the parameters
|
Map<String,Object> |
getParameters()
get the implementation specific parameters of the Message store
|
int |
getType()
Returns the type of this message store.
|
void |
init(SynapseEnvironment se)
This method should implement the initialization of the
implemented parts of the configuration.
|
boolean |
isEdited()
Whether the message store edited through the management console
|
int |
nextConsumerId() |
int |
nextProducerId() |
protected void |
notifyMessageAddition(String messageId)
Notify Message Addition to the observers
|
protected void |
notifyMessageRemoval(String messageId)
Notify Message removal to the observers
|
void |
registerObserver(MessageStoreObserver observer) |
void |
setArtifactContainerName(String artifactContainerName)
Set the name of the artifact container from which the message store deployed
|
void |
setDescription(String description)
Set the description of the artifact
|
void |
setFileName(String filename)
Set the name of the file that the Message store is configured
|
void |
setIsEdited(boolean isEdited)
Set whether the message store edited through the management console
|
void |
setName(String name)
Set the name of an abstraction
|
void |
setParameters(Map<String,Object> parameters)
set the implementation specific parameters
|
int |
size()
Returns the number of Messages in this store.
|
void |
unregisterObserver(MessageStoreObserver observer) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, get, get, getAll, getConsumer, getProducer, remove, remove
protected String name
protected String sequence
protected MessageStoreView messageStoreMBean
protected SynapseConfiguration synapseConfiguration
protected SynapseEnvironment synapseEnvironment
protected Map<String,String> parameterKeyMap
protected String description
protected String fileName
protected List<MessageStoreObserver> messageStoreObservers
protected Lock lock
public void init(SynapseEnvironment se)
ManagedLifecycle
init
in interface ManagedLifecycle
se
- SynapseEnvironment to be used for initializationpublic String getName()
Nameable
public void setName(String name)
Nameable
public void registerObserver(MessageStoreObserver observer)
public void unregisterObserver(MessageStoreObserver observer)
protected void notifyMessageAddition(String messageId)
messageId
- of the Message added.protected void notifyMessageRemoval(String messageId)
messageId
- of the Message addedpublic int size()
MessageStore
size
in interface MessageStore
public Map<String,Object> getParameters()
MessageStore
getParameters
in interface MessageStore
public void setParameters(Map<String,Object> parameters)
MessageStore
setParameters
in interface MessageStore
parameters
- A map of parameters or nullpublic void addParameter(String name, String key)
MessageStore
addParameter
in interface MessageStore
name
- parameter namekey
- parameter key valuepublic void addParameterKey(String name, String key)
MessageStore
addParameterKey
in interface MessageStore
name
- parameter namekey
- parameter registry key valuepublic String getParameterKey(String name)
MessageStore
getParameterKey
in interface MessageStore
name
- parameter namepublic Map<String,String> getParameterKeyMap()
MessageStore
getParameterKeyMap
in interface MessageStore
public void destroy()
ManagedLifecycle
destroy
in interface ManagedLifecycle
public void setDescription(String description)
SynapseArtifact
setDescription
in interface SynapseArtifact
description
- tobe set to the artifactpublic String getDescription()
SynapseArtifact
getDescription
in interface SynapseArtifact
public void setFileName(String filename)
MessageStore
setFileName
in interface MessageStore
filename
- Name of the file where this artifact is definedpublic String getFileName()
MessageStore
getFileName
in interface MessageStore
public int getType()
MessageStore
Constants.JMS_MS
, Constants.INMEMORY_MS
,
or Constants.JDBC_MS
getType
in interface MessageStore
public Lock getLock()
public int nextProducerId()
public int nextConsumerId()
public void enqueued()
public void dequeued()
public long difference()
public boolean isEdited()
isEdited
in interface MessageStore
public void setIsEdited(boolean isEdited)
setIsEdited
in interface MessageStore
isEdited
- public String getArtifactContainerName()
getArtifactContainerName
in interface MessageStore
public void setArtifactContainerName(String artifactContainerName)
setArtifactContainerName
in interface MessageStore
artifactContainerName
- Copyright © 2005–2018 Apache Software Foundation. All rights reserved.