Class MessageStoreAdminService
- java.lang.Object
-
- org.wso2.carbon.core.AbstractAdmin
-
- org.wso2.carbon.mediation.initializer.AbstractServiceBusAdmin
-
- org.wso2.carbon.message.store.service.MessageStoreAdminService
-
public class MessageStoreAdminService extends org.wso2.carbon.mediation.initializer.AbstractServiceBusAdmin
-
-
Field Summary
Fields Modifier and Type Field Description static String
EMPTY_STRING
protected static org.apache.axiom.om.OMFactory
fac
static QName
KEY_Q
static int
MSGS_PER_PAGE
static QName
NAME_Q
protected static org.apache.axiom.om.OMNamespace
nullNS
static QName
PARAMETER_Q
static String
REGISTRY_KEY_PREFIX
static QName
SEQUENCE_Q
-
Constructor Summary
Constructors Constructor Description MessageStoreAdminService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMessageStore(String xml)
Get an XML configuration element for a message store from the FE and creates and add the MessageStore to the synapse configuration.void
deleteAllMessages(String name)
void
deleteFirstMessages(String name)
void
deleteMessage(String name, String messageId)
void
deleteMessageStore(String name)
Delete the MessageStore instance with given name in the synapse configurationMessageInfo[]
getAllMessages(String name)
Message information of All Messages in MessageStoreString
getClassName(String name)
Get the implementation class name of the MessageStoreString
getEnvelope(String name, String messageId)
Get the Content of a given messageString
getMessageStore(String name)
MessageStoreMetaData[]
getMessageStoreData()
Get all the Current Message store details defined in the configurationString[]
getMessageStoreNames()
Get all the Current Message store names defined in the configurationMessageInfo[]
getPaginatedMessages(String name, int pageNumber)
Get Array of Messages that are needed for a given Page numberint
getSize(String name)
Get the number of messages in the Message store with given namevoid
modifyMessageStore(String xml)
Modify and Existing Message store based on the given XML that is passed from the FE This this case user may change the message store implementation/ change parameters So we add and init new message store and then remove and destroy old.-
Methods inherited from class org.wso2.carbon.mediation.initializer.AbstractServiceBusAdmin
getLock, getMediationPersistenceManager, getServerConfigurationInformation, getServerContextInformation, getSynapseConfiguration, getSynapseEnvironment, getSynapseEnvironment, lockSynapseConfiguration, unlockSynapseConfiguration
-
Methods inherited from class org.wso2.carbon.core.AbstractAdmin
getAxisConfig, getConfigContext, getConfigSystemRegistry, getConfigUserRegistry, getGovernanceRegistry, getGovernanceSystemRegistry, getGovernanceUserRegistry, getHttpSession, getLocalRepo, getRegistry, getTenantDomain, getUserId, getUsername, getUserRealm, setConfigurationContext, setPermissionUpdateTimestamp
-
-
-
-
Field Detail
-
MSGS_PER_PAGE
public static final int MSGS_PER_PAGE
- See Also:
- Constant Field Values
-
NAME_Q
public static final QName NAME_Q
-
SEQUENCE_Q
public static final QName SEQUENCE_Q
-
KEY_Q
public static final QName KEY_Q
-
PARAMETER_Q
public static final QName PARAMETER_Q
-
REGISTRY_KEY_PREFIX
public static final String REGISTRY_KEY_PREFIX
- See Also:
- Constant Field Values
-
EMPTY_STRING
public static final String EMPTY_STRING
- See Also:
- Constant Field Values
-
fac
protected static final org.apache.axiom.om.OMFactory fac
-
nullNS
protected static final org.apache.axiom.om.OMNamespace nullNS
-
-
Method Detail
-
addMessageStore
public void addMessageStore(String xml) throws org.apache.axis2.AxisFault
Get an XML configuration element for a message store from the FE and creates and add the MessageStore to the synapse configuration.- Parameters:
xml
- string that contain the message store configuration.- Throws:
org.apache.axis2.AxisFault
- if some thing goes wrong when creating a MessageStore with the given xml.
-
modifyMessageStore
public void modifyMessageStore(String xml) throws org.apache.axis2.AxisFault
Modify and Existing Message store based on the given XML that is passed from the FE This this case user may change the message store implementation/ change parameters So we add and init new message store and then remove and destroy old.- Parameters:
xml
- XML configuration for the changed Message store- Throws:
org.apache.axis2.AxisFault
- if Some thing goes wrong when modifying the Message store
-
getMessageStore
public String getMessageStore(String name) throws org.apache.axis2.AxisFault
- Throws:
org.apache.axis2.AxisFault
-
deleteMessageStore
public void deleteMessageStore(String name) throws org.apache.axis2.AxisFault
Delete the MessageStore instance with given name in the synapse configuration- Parameters:
name
- of the MessageStore to be deleted- Throws:
org.apache.axis2.AxisFault
- if Message store does not exist
-
getMessageStoreNames
public String[] getMessageStoreNames() throws org.apache.axis2.AxisFault
Get all the Current Message store names defined in the configuration- Returns:
- array of Strings that contains MessageStore names
- Throws:
org.apache.axis2.AxisFault
-
getMessageStoreData
public MessageStoreMetaData[] getMessageStoreData() throws org.apache.axis2.AxisFault
Get all the Current Message store details defined in the configuration- Returns:
- array of Message Store Meta Data that contains MessageStore names
- Throws:
org.apache.axis2.AxisFault
-
getSize
public int getSize(String name) throws org.apache.axis2.AxisFault
Get the number of messages in the Message store with given name- Parameters:
name
- of the MessageStore- Returns:
- number of message stores in the given store
- Throws:
org.apache.axis2.AxisFault
- if Message store does not exists
-
getClassName
public String getClassName(String name) throws org.apache.axis2.AxisFault
Get the implementation class name of the MessageStore- Parameters:
name
- of the MessageStore- Returns:
- implementation class name of the Message Store
- Throws:
org.apache.axis2.AxisFault
-
getAllMessages
public MessageInfo[] getAllMessages(String name) throws org.apache.axis2.AxisFault
Message information of All Messages in MessageStore- Parameters:
name
- of the MessageStore- Returns:
- Array of details of the All Messages in store
- Throws:
org.apache.axis2.AxisFault
-
getPaginatedMessages
public MessageInfo[] getPaginatedMessages(String name, int pageNumber) throws org.apache.axis2.AxisFault
Get Array of Messages that are needed for a given Page number- Parameters:
name
- of the message storepageNumber
- of to be displayed- Returns:
- Array of Message information for a given page
- Throws:
org.apache.axis2.AxisFault
-
getEnvelope
public String getEnvelope(String name, String messageId) throws org.apache.axis2.AxisFault
Get the Content of a given message- Parameters:
name
- of the message storemessageId
- Message id of the Message- Returns:
- String that contain the content of the message
- Throws:
org.apache.axis2.AxisFault
-
deleteAllMessages
public void deleteAllMessages(String name) throws org.apache.axis2.AxisFault
- Throws:
org.apache.axis2.AxisFault
-
deleteMessage
public void deleteMessage(String name, String messageId) throws org.apache.axis2.AxisFault
- Throws:
org.apache.axis2.AxisFault
-
deleteFirstMessages
public void deleteFirstMessages(String name) throws org.apache.axis2.AxisFault
- Throws:
org.apache.axis2.AxisFault
-
-