Package org.apache.activemq.command

Examples of org.apache.activemq.command.RemoveSubscriptionInfo


            createAdvisorySubscription();
            assertCount(100, 0);
        }

        for (int i = 0; i < 100; i++) {
            RemoveSubscriptionInfo info = new RemoveSubscriptionInfo();
            info.setClientId(getName());
            info.setSubscriptionName("SubsId" + i);
            ConnectionContext context = new ConnectionContext();
            context.setBroker(broker.getRegionBroker());
            context.setClientId(getName());
            broker.getBroker().removeSubscription(context, info);
View Full Code Here


     *                 specified.
     * @since 1.1
     */
    public void unsubscribe(String name) throws InvalidDestinationException, JMSException {
        checkClosedOrFailed();
        RemoveSubscriptionInfo rsi = new RemoveSubscriptionInfo();
        rsi.setConnectionId(getConnectionInfo().getConnectionId());
        rsi.setSubscriptionName(name);
        rsi.setClientId(getConnectionInfo().getClientId());
        syncSendPacket(rsi);
    }
View Full Code Here

        }
        return null;
    }

    public void destroyDurableSubscriber(String clientId, String subscriberName) throws Exception {
        RemoveSubscriptionInfo info = new RemoveSubscriptionInfo();
        info.setClientId(clientId);
        info.setSubscriptionName(subscriberName);
        ConnectionContext context = new ConnectionContext();
        context.setBroker(broker);
        context.setClientId(clientId);
        broker.removeSubscription(context, info);
    }
View Full Code Here

        }
      
        // check if it is a durable subscription
        String durable = command.getHeaders().get("activemq.subscriptionName");
        if (durable != null) {
            RemoveSubscriptionInfo info = new RemoveSubscriptionInfo();
            info.setClientId(durable);
            info.setSubscriptionName(durable);
            info.setConnectionId(connectionId);
            sendToActiveMQ(info, createResponseHandler(command));
            return;
        }

        // TODO: Unsubscribing using a destination is a bit wierd if multiple
View Full Code Here

        if (this.version.equals(Stomp.V1_1)) {
            clientId = connectionInfo.getClientId();
        }

        if (durable != null) {
            RemoveSubscriptionInfo info = new RemoveSubscriptionInfo();
            info.setClientId(clientId);
            info.setSubscriptionName(durable);
            info.setConnectionId(connectionId);
            sendToActiveMQ(info, createResponseHandler(command));
            return;
        }

        if (subscriptionId != null) {
View Full Code Here

public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport {

    public static final RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest();

    public Object createObject() throws Exception {
        RemoveSubscriptionInfo info = new RemoveSubscriptionInfo();
        populateObject(info);
        return info;
    }
View Full Code Here

        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)object;
        info.setConnectionId(createConnectionId("ConnectionId:1"));
        info.setSubscriptionName("SubcriptionName:2");
        info.setClientId("ClientId:3");

    }
View Full Code Here


    public static final RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest();

    public Object createObject() throws Exception {
        RemoveSubscriptionInfo info = new RemoveSubscriptionInfo();
        populateObject(info);
        return info;
    }
View Full Code Here

        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) object;

        info.setConnectionId(createConnectionId("ConnectionId:1"));
        info.setSubscriptionName("SubcriptionName:2");
        info.setClientId("ClientId:3");
    }
View Full Code Here


    public static final RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest();

    public Object createObject() throws Exception {
        RemoveSubscriptionInfo info = new RemoveSubscriptionInfo();
        populateObject(info);
        return info;
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.command.RemoveSubscriptionInfo

Copyright © 2018 www.massapicom. 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.