Examples of ExchangePacket


Examples of org.apache.servicemix.jbi.messaging.ExchangePacket

        MessageExchange exchange = event.getExchange();
        if (!(exchange instanceof MessageExchangeImpl)) {
            throw new IllegalArgumentException("exchange should be a MessageExchangeImpl");
        }
        try {
            ExchangePacket packet = ((MessageExchangeImpl) exchange).getPacket();
            String id = packet.getExchangeId();
            byte[] data = packet.getData();
            Connection connection = null;
            boolean restoreAutoCommit = false;
            try {
                connection = dataSource.getConnection();
                if (connection.getAutoCommit()) {
View Full Code Here

Examples of org.apache.servicemix.jbi.messaging.ExchangePacket

        }
    }
   
    // TODO: this should be somewhere in org.apache.servicemix.jbi.messaging
    protected MessageExchange getExchange(byte[] data) throws AuditorException {
        ExchangePacket packet = null;
        try {
            packet = ExchangePacket.readPacket(data);
        } catch (Exception e) {
            throw new AuditorException("Unable to reconstruct exchange", e);
        }
        URI mep = packet.getPattern();
        if (MessageExchangeSupport.IN_ONLY.equals(mep)) {
            return new InOnlyImpl(packet);
        } else if (MessageExchangeSupport.IN_OPTIONAL_OUT.equals(mep)) {
            return new InOptionalOutImpl(packet);
        } else if (MessageExchangeSupport.IN_OUT.equals(mep)) {
View Full Code Here

Examples of org.apache.servicemix.jbi.messaging.ExchangePacket

     * Check if the given packet should be persisted or not.
     * @param packet
     * @return
     */
    protected boolean isPersistent(MessageExchange me) {
        ExchangePacket packet = ((MessageExchangeImpl) me).getPacket();
      if (packet.getPersistent() != null) {
        return packet.getPersistent().booleanValue();
      } else {
        return broker.getContainer().isPersistent();
      }
    }
View Full Code Here

Examples of org.apache.servicemix.jbi.messaging.ExchangePacket

     * @return true if this subscription matches the exchange
     */
    public boolean matches(Registry registry, MessageExchangeImpl exchange) {
        boolean result = false;

        ExchangePacket packet = exchange.getPacket();
        ComponentNameSpace sourceId = packet.getSourceId();
        if (sourceId != null) {
            // get the list of services
            if (service != null) {
                ServiceEndpoint[] ses = registry.getEndpointsForService(service);
                if (ses != null) {
View Full Code Here

Examples of org.apache.servicemix.jbi.messaging.ExchangePacket

public class MessageExchangeTest extends TestCase {

    public static class TestMessageExchange extends MessageExchangeImpl {
        private static final long serialVersionUID = 5572313276570983400L;
        public TestMessageExchange() {
            super(new ExchangePacket(), STATES);
        }
View Full Code Here

Examples of org.apache.servicemix.jbi.messaging.ExchangePacket

        MessageExchange exchange = event.getExchange();
        if (exchange instanceof MessageExchangeImpl == false) {
            throw new IllegalArgumentException("exchange should be a MessageExchangeImpl");
        }
        try {
            ExchangePacket packet = ((MessageExchangeImpl) exchange).getPacket();
            String id = packet.getExchangeId();
            byte[] data = packet.getData();
            Connection connection = null;
            boolean restoreAutoCommit = false;
            try {
                connection = dataSource.getConnection();
                if (connection.getAutoCommit()) {
View Full Code Here

Examples of org.apache.servicemix.jbi.messaging.ExchangePacket

        }
    }
   
    // TODO: this should be somewhere in org.apache.servicemix.jbi.messaging
    protected MessageExchange getExchange(byte[] data) throws AuditorException {
        ExchangePacket packet = null;
        try {
            packet = ExchangePacket.readPacket(data);
        } catch (Exception e) {
            throw new AuditorException("Unable to reconstruct exchange", e);
        }
        URI mep = packet.getPattern();
        if (MessageExchangeSupport.IN_ONLY.equals(mep)) {
            return new InOnlyImpl(packet);
        } else if (MessageExchangeSupport.IN_OPTIONAL_OUT.equals(mep)) {
            return new InOptionalOutImpl(packet);
        } else if (MessageExchangeSupport.IN_OUT.equals(mep)) {
View Full Code Here

Examples of org.apache.servicemix.jbi.messaging.ExchangePacket

     * Check if the given packet should be persisted or not.
     * @param packet
     * @return
     */
    protected boolean isPersistent(MessageExchange me) {
        ExchangePacket packet = ((MessageExchangeImpl) me).getPacket();
        if (packet.getPersistent() != null) {
            return packet.getPersistent().booleanValue();
        } else {
            return broker.getContainer().isPersistent();
        }
    }
View Full Code Here

Examples of org.servicemix.jbi.messaging.ExchangePacket

        if (filter != null) {
            result = filter.matches(exchange);
        }
        else {
            ExchangePacket packet = exchange.getPacket();
            ComponentNameSpace sourceId = packet.getSourceId();
            if (sourceId != null) {
                // get the list of services
                if (service != null) {
                    ServiceEndpoint[] ses = registry.getEndpointsForService(service);
                    if (ses != null) {
View Full Code Here

Examples of org.servicemix.jbi.messaging.ExchangePacket

     * Check if the given packet should be persisted or not.
     * @param packet
     * @return
     */
    protected boolean isPersistent(MessageExchange me) {
        ExchangePacket packet = ((MessageExchangeImpl) me).getPacket();
      if (packet.getPersistent() != null) {
        return packet.getPersistent().booleanValue();
      } else {
        return broker.getContainer().isPersistent();
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.