org.apache.activemq.artemis.core.protocol.proton.converter.message.InboundTransformer

Here are the examples of the java api class org.apache.activemq.artemis.core.protocol.proton.converter.message.InboundTransformer taken from open source projects.

1. ProtonMessageConverter#inboundJMSType()

Project: activemq-artemis
File: ProtonMessageConverter.java
/**
    * Just create the JMS Part of the inbound (for testing)
    *
    * @param messageSource
    * @return
    * @throws Exception                    https://issues.jboss.org/browse/ENTMQ-1560
    */
public ServerJMSMessage inboundJMSType(EncodedMessage messageSource) throws Exception {
    EncodedMessage encodedMessageSource = messageSource;
    ServerJMSMessage transformedMessage = null;
    InboundTransformer transformer = inboundTransformer;
    while (transformer != null) {
        try {
            transformedMessage = (ServerJMSMessage) transformer.transform(encodedMessageSource);
            break;
        } catch (Exception e) {
            ActiveMQClientLogger.LOGGER.debug("Transform of message using [{}] transformer, failed" + inboundTransformer.getTransformerName());
            ActiveMQClientLogger.LOGGER.trace("Transformation error:", e);
            transformer = transformer.getFallbackTransformer();
        }
    }
    if (transformedMessage == null) {
        throw new IOException("Failed to transform incoming delivery, skipping.");
    }
    transformedMessage.encode();
    return transformedMessage;
}