Class MessageProcessorAdminService
- java.lang.Object
-
- org.wso2.carbon.core.AbstractAdmin
-
- org.wso2.carbon.mediation.initializer.AbstractServiceBusAdmin
-
- org.wso2.carbon.message.processor.service.MessageProcessorAdminService
-
public class MessageProcessorAdminService extends org.wso2.carbon.mediation.initializer.AbstractServiceBusAdmin
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_AXIS2_XML
static int
MSGS_PER_PAGE
-
Constructor Summary
Constructors Constructor Description MessageProcessorAdminService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate(String processorName)
void
addMessageProcessor(String xml)
Get an XML configuration element for a message processor from the FE and creates and add the MessageStore to the synapse configuration.String
browseMessage(String processorName)
Gets the message from the associated queue.void
deactivate(String processorName)
void
deleteAllMessages(String processorName)
Delete all messages from the Message Store associated with the Processorvoid
deleteFirstMessages(String processorName)
Delete first messages from the Message Store associated with the Processorvoid
deleteMessage(String processorName, String messageId)
Delete a Message with given Message id for the associated storevoid
deleteMessageProcessor(String name)
Delete the MessageProcessor instance with given name in the synapse configurationString
getClassName(String name)
Get the implementation class name of the MessageProcessorString[]
getDefinedEndpoints()
String
getEnvelope(String processorName, String messageId)
Get the SOAP Envelope of the Requested message from the associated StoreString[]
getMessageIds(String processorName)
Get All the Messages Stored in the Message Store associated with the ProcessorString
getMessageProcessor(String name)
Get the Synapse configuration for a Message processorMessageProcessorMetaData[]
getMessageProcessorDataList()
Get all the Current Message processor data defined in the configurationString[]
getMessageProcessorNames()
Get all the Current Message processor names defined in the configurationint
getSize(String processorName)
Get the Number of Messages in the message store associated with the processorboolean
isActive(String processorName)
Get the Active Status of the message processorboolean
isTaskLocationKnown(String processorName)
void
modifyMessageProcessor(String xml)
Modify and Existing Message processor based on the given XML that is passed from the FEboolean
popAndRedirectMessage(String processorName, String storeName)
Pops the message and redirects it to a specified queue.boolean
popMessage(String processorName)
Pops the message from the associated queue.void
resend(String processorName, String messageId)
Resend a Give Messagevoid
resendAll(String processorName)
messageID Resend All messagesvoid
resendFirstMessage(String processorName, String messageId)
Resend first Messageboolean
validateAxis2ClientRepo(String input)
Checks whether given Axis2ClientRepo is valid one or not-
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
-
DEFAULT_AXIS2_XML
public static final String DEFAULT_AXIS2_XML
-
-
Method Detail
-
addMessageProcessor
public void addMessageProcessor(String xml) throws org.apache.axis2.AxisFault
Get an XML configuration element for a message processor from the FE and creates and add the MessageStore to the synapse configuration.- Parameters:
xml
- string that contain the message processor configuration.- Throws:
org.apache.axis2.AxisFault
- if some thing goes wrong when creating a MessageProcessor with the given xml.
-
modifyMessageProcessor
public void modifyMessageProcessor(String xml) throws org.apache.axis2.AxisFault
Modify and Existing Message processor based on the given XML that is passed from the FE- Parameters:
xml
- XML configuration for the changed Message processor- Throws:
org.apache.axis2.AxisFault
- if Some thing goes wrong when modifying the Message processor
-
getMessageProcessor
public String getMessageProcessor(String name) throws org.apache.axis2.AxisFault
Get the Synapse configuration for a Message processor- Parameters:
name
- name of the message processor- Returns:
- XML String that contain the configuration
- Throws:
org.apache.axis2.AxisFault
-
deleteMessageProcessor
public void deleteMessageProcessor(String name) throws org.apache.axis2.AxisFault
Delete the MessageProcessor instance with given name in the synapse configuration- Parameters:
name
- of the MessageProcessor to be deleted- Throws:
org.apache.axis2.AxisFault
- if Message processor does not exist
-
getMessageProcessorNames
public String[] getMessageProcessorNames() throws org.apache.axis2.AxisFault
Get all the Current Message processor names defined in the configuration- Returns:
- array of Strings that contains MessageStore names
- Throws:
org.apache.axis2.AxisFault
-
getMessageIds
public String[] getMessageIds(String processorName) throws org.apache.axis2.AxisFault
Get All the Messages Stored in the Message Store associated with the Processor- Parameters:
processorName
- ScheduledMessageForwarding Processor Name- Returns:
- Array of Message ids.
- Throws:
org.apache.axis2.AxisFault
-
getMessageProcessorDataList
public MessageProcessorMetaData[] getMessageProcessorDataList() throws org.apache.axis2.AxisFault
Get all the Current Message processor data defined in the configuration- Returns:
- Array of MessageProcessorMetaDatas.
- Throws:
org.apache.axis2.AxisFault
-
getEnvelope
public String getEnvelope(String processorName, String messageId) throws org.apache.axis2.AxisFault
Get the SOAP Envelope of the Requested message from the associated Store- Parameters:
processorName
- Message Processor NamemessageId
- Message id of the Message- Returns:
- Throws:
org.apache.axis2.AxisFault
-
deleteMessage
public void deleteMessage(String processorName, String messageId) throws org.apache.axis2.AxisFault
Delete a Message with given Message id for the associated store- Parameters:
processorName
- message processor namemessageId
- message id of the message to be deleted- Throws:
org.apache.axis2.AxisFault
-
deleteFirstMessages
public void deleteFirstMessages(String processorName) throws org.apache.axis2.AxisFault
Delete first messages from the Message Store associated with the Processor- Parameters:
processorName
- Message Processor Name- Throws:
org.apache.axis2.AxisFault
-
deleteAllMessages
public void deleteAllMessages(String processorName) throws org.apache.axis2.AxisFault
Delete all messages from the Message Store associated with the Processor- Parameters:
processorName
- Message Processor Name- Throws:
org.apache.axis2.AxisFault
-
resend
public void resend(String processorName, String messageId) throws org.apache.axis2.AxisFault
Resend a Give Message- Parameters:
processorName
-messageId
-- Throws:
org.apache.axis2.AxisFault
-
resendFirstMessage
public void resendFirstMessage(String processorName, String messageId) throws org.apache.axis2.AxisFault
Resend first Message- Parameters:
processorName
-messageId
-- Throws:
org.apache.axis2.AxisFault
-
resendAll
public void resendAll(String processorName) throws org.apache.axis2.AxisFault
messageID Resend All messages- Parameters:
processorName
-- Throws:
org.apache.axis2.AxisFault
-
getSize
public int getSize(String processorName) throws org.apache.axis2.AxisFault
Get the Number of Messages in the message store associated with the processor- Parameters:
processorName
-- Returns:
- Throws:
org.apache.axis2.AxisFault
-
isActive
public boolean isActive(String processorName) throws org.apache.axis2.AxisFault
Get the Active Status of the message processor- Parameters:
processorName
-- Returns:
- Throws:
org.apache.axis2.AxisFault
-
isTaskLocationKnown
public boolean isTaskLocationKnown(String processorName) throws org.apache.axis2.AxisFault
- Throws:
org.apache.axis2.AxisFault
-
activate
public void activate(String processorName) throws org.apache.axis2.AxisFault
- Throws:
org.apache.axis2.AxisFault
-
deactivate
public void deactivate(String processorName) throws org.apache.axis2.AxisFault
- Throws:
org.apache.axis2.AxisFault
-
getClassName
public String getClassName(String name) throws org.apache.axis2.AxisFault
Get the implementation class name of the MessageProcessor- Parameters:
name
- of the MessageProcessor- Returns:
- implementation class name of the Message Processor
- Throws:
org.apache.axis2.AxisFault
-
getDefinedEndpoints
public String[] getDefinedEndpoints() throws org.apache.axis2.AxisFault
- Throws:
org.apache.axis2.AxisFault
-
validateAxis2ClientRepo
public boolean validateAxis2ClientRepo(String input) throws org.apache.axis2.AxisFault
Checks whether given Axis2ClientRepo is valid one or not- Parameters:
input
- location of the Axis2 Client Repository- Returns:
true
if the given axis client repository valid,false
otherwise.- Throws:
org.apache.axis2.AxisFault
- If an ERROR is encountered or given repository location is invalid.
-
browseMessage
public String browseMessage(String processorName) throws org.apache.axis2.AxisFault
Gets the message from the associated queue.- Parameters:
processorName
- message processor name.- Returns:
message
returns message received from the queue as a string.- Throws:
org.apache.axis2.AxisFault
-
popMessage
public boolean popMessage(String processorName) throws org.apache.axis2.AxisFault
Pops the message from the associated queue.- Parameters:
processorName
- message processor name.- Returns:
true
if ++ is successful, elsefalse
- Throws:
org.apache.axis2.AxisFault
-
popAndRedirectMessage
public boolean popAndRedirectMessage(String processorName, String storeName) throws org.apache.axis2.AxisFault
Pops the message and redirects it to a specified queue.- Parameters:
processorName
- message processor name.storeName
- name of the store to redirect the message.- Returns:
true
if ++ is successful, elsefalse
- Throws:
org.apache.axis2.AxisFault
-
-