Java Code Examples for org.apache.synapse.config.SynapseConfiguration#getMessageStore()

The following examples show how to use org.apache.synapse.config.SynapseConfiguration#getMessageStore() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MessageStoreResource.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
/**
 * Sets the information of the specified message store to the response as json
 *
 * @param axis2MessageContext AXIS2 message context
 * @param synapseConfiguration Synapse configuration object
 * @param messageStoreName           messageStoreName of the message store
 */
private void populateMessageStoreData(org.apache.axis2.context.MessageContext axis2MessageContext,
                                      SynapseConfiguration synapseConfiguration,
                                      String messageStoreName) {
    MessageStore messageStore = synapseConfiguration.getMessageStore(messageStoreName);
    if (Objects.nonNull(messageStore)) {
        Utils.setJsonPayLoad(axis2MessageContext, getMessageStoreAsJson(messageStore));
    } else {
        LOG.warn("Message store " + messageStoreName + " does not exist");
        Utils.setJsonPayLoad(axis2MessageContext, Utils.createJsonErrorObject("Message store does not exist"));
    }
}
 
Example 2
Source File: MessageStoreStore.java    From micro-integrator with Apache License 2.0 4 votes vote down vote up
@Override
protected MessageStore getObjectToPersist(String name, SynapseConfiguration config) {
    return config.getMessageStore(name);
}