public interface MessageStore extends ManagedLifecycle, Nameable, SynapseArtifact
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 |
clear()
Delete all the Messages in the Message Store
|
MessageContext |
get(int index)
Return the Message in given index position
(this may depend on the implementation)
|
MessageContext |
get(String messageId)
Get the Message with the given ID from the Message store without removing it
|
List<MessageContext> |
getAll()
Get the All messages in the Message store without removing them from the queue
|
String |
getArtifactContainerName()
Get the name of the artifact container from which the message store deployed
|
MessageConsumer |
getConsumer()
Returns a Message Consumer for this message store.
|
String |
getFileName()
get the file name that the message store is configured
|
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
|
MessageProducer |
getProducer()
Returns a Message Producer for this message store.
|
int |
getType()
Returns the type of this message store.
|
boolean |
isEdited()
Whether the message store edited through the management console
|
MessageContext |
remove()
Retrieves and removes the first Message in this store.
|
MessageContext |
remove(String messageID)
Delete and return the MessageContext with given Message id
|
void |
setArtifactContainerName(String artifactContainerName)
Set the name of the artifact container from which the message store deployed
|
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 |
setParameters(Map<String,Object> parameters)
set the implementation specific parameters
|
int |
size()
Returns the number of Messages in this store.
|
destroy, init
getDescription, setDescription
MessageProducer getProducer() throws SynapseException
SynapseException
MessageConsumer getConsumer() throws SynapseException
SynapseException
void setParameters(Map<String,Object> parameters)
parameters
- A map of parameters or nullMap<String,Object> getParameters()
void addParameter(String name, String key)
name
- parameter namekey
- parameter key valuevoid addParameterKey(String name, String key)
name
- parameter namekey
- parameter registry key valueString getParameterKey(String name)
name
- parameter nameMap<String,String> getParameterKeyMap()
void setFileName(String filename)
filename
- Name of the file where this artifact is definedString getFileName()
int getType()
Constants.JMS_MS
, Constants.INMEMORY_MS
,
or Constants.JDBC_MS
MessageContext remove() throws NoSuchElementException
NoSuchElementException
- if store is emptyvoid clear()
MessageContext remove(String messageID)
messageID
- message id of the Messageint size()
MessageContext get(int index)
index
- position of the messageList<MessageContext> getAll()
MessageContext get(String messageId)
messageId
- A message ID stringboolean isEdited()
void setIsEdited(boolean isEdited)
isEdited
- true if Message Store config is locally editedString getArtifactContainerName()
void setArtifactContainerName(String artifactContainerName)
artifactContainerName
- name of artifact containerCopyright © 2005–2023 Apache Software Foundation. All rights reserved.