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,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 |
destroy()
This method should implement the destroying of the
implemented parts of the configuration.
|
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
|
Map<String,Object> |
getParameters()
get the implementation specific parameters of the Message store
|
void |
init(SynapseEnvironment se)
This method should implement the initialization of the
implemented parts of the configuration.
|
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)
Register a MessageStore observer instance with the MessageStore
to receive events.
|
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 |
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)
Un register an Message store instance from the message store
to stop receiving events
|
protected String name
protected String sequence
protected MessageStoreView messageStoreMBean
protected SynapseConfiguration synapseConfiguration
protected SynapseEnvironment synapseEnvironment
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)
MessageStore
registerObserver
in interface MessageStore
observer
- instance to be registeredpublic void unregisterObserver(MessageStoreObserver observer)
MessageStore
unregisterObserver
in interface MessageStore
observer
- instance to be unregisteredprotected 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 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 Lock getLock()
Copyright © 2005-2017 Apache Software Foundation. All Rights Reserved.