Class MessageStoreAdminService


  • public class MessageStoreAdminService
    extends org.wso2.carbon.mediation.initializer.AbstractServiceBusAdmin
    • Field Detail

      • 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
      • fac

        protected static final org.apache.axiom.om.OMFactory fac
      • nullNS

        protected static final org.apache.axiom.om.OMNamespace nullNS
    • Constructor Detail

      • MessageStoreAdminService

        public MessageStoreAdminService()
    • 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 store
        pageNumber - 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 store
        messageId - 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