Package org.apache.hedwig.client.api

Examples of org.apache.hedwig.client.api.Subscriber.unsubscribe()


    public void testSyncHubUnsubscribeWithInvalidSubscriberId() throws Exception {
        Client hubClient = new HedwigHubClient(new ClientConfiguration());
        Subscriber hubSubscriber = hubClient.getSubscriber();
        boolean unsubscribeSuccess = false;
        try {
            hubSubscriber.unsubscribe(getTopic(0), localSubscriberId);
        } catch (InvalidSubscriberIdException e) {
            unsubscribeSuccess = true;
        } catch (Exception ex) {
            unsubscribeSuccess = false;
        }
View Full Code Here


    public void testSyncHubUnsubscribeWithInvalidSubscriberId() throws Exception {
        Client hubClient = new HedwigHubClient(new ClientConfiguration());
        Subscriber hubSubscriber = hubClient.getSubscriber();
        boolean unsubscribeSuccess = false;
        try {
            hubSubscriber.unsubscribe(getTopic(0), localSubscriberId);
        } catch (InvalidSubscriberIdException e) {
            unsubscribeSuccess = true;
        } catch (Exception ex) {
            unsubscribeSuccess = false;
        }
View Full Code Here

    public void testSyncHubUnsubscribeWithInvalidSubscriberId() throws Exception {
        Client hubClient = new HedwigHubClient(new ClientConfiguration());
        Subscriber hubSubscriber = hubClient.getSubscriber();
        boolean unsubscribeSuccess = false;
        try {
            hubSubscriber.unsubscribe(getTopic(0), localSubscriberId);
        } catch (InvalidSubscriberIdException e) {
            unsubscribeSuccess = true;
        } catch (Exception ex) {
            unsubscribeSuccess = false;
        }
View Full Code Here

    public void testSyncHubUnsubscribeWithInvalidSubscriberId() throws Exception {
        Client hubClient = new HedwigHubClient(new ClientConfiguration());
        Subscriber hubSubscriber = hubClient.getSubscriber();
        boolean unsubscribeSuccess = false;
        try {
            hubSubscriber.unsubscribe(getTopic(0), localSubscriberId);
        } catch (InvalidSubscriberIdException e) {
            unsubscribeSuccess = true;
        } catch (Exception ex) {
            unsubscribeSuccess = false;
        }
View Full Code Here

        sub.subscribe(topic, subidUnbounded, optionsUnbounded);
        sub.closeSubscription(topic, subidUnbounded);

        sendXExpectLastY(pub, sub, topic, subidUnbounded, 10000, 10000);
        sub.unsubscribe(topic, subidUnbounded);

        sendXExpectLastY(pub, sub, topic, subid20, 1000, 20);
        sub.unsubscribe(topic, subid20);

        sendXExpectLastY(pub, sub, topic, subid5, 1000, 5);
View Full Code Here

        sendXExpectLastY(pub, sub, topic, subidUnbounded, 10000, 10000);
        sub.unsubscribe(topic, subidUnbounded);

        sendXExpectLastY(pub, sub, topic, subid20, 1000, 20);
        sub.unsubscribe(topic, subid20);

        sendXExpectLastY(pub, sub, topic, subid5, 1000, 5);
        sub.unsubscribe(topic, subid5);

        client.close();
View Full Code Here

        sendXExpectLastY(pub, sub, topic, subid20, 1000, 20);
        sub.unsubscribe(topic, subid20);

        sendXExpectLastY(pub, sub, topic, subid5, 1000, 5);
        sub.unsubscribe(topic, subid5);

        client.close();
    }

    @Test
View Full Code Here

    public void testSyncHubUnsubscribeWithInvalidSubscriberId() throws Exception {
        Client hubClient = new HedwigHubClient(new HubClientConfiguration());
        Subscriber hubSubscriber = hubClient.getSubscriber();
        boolean unsubscribeSuccess = false;
        try {
            hubSubscriber.unsubscribe(getTopic(0), localSubscriberId);
        } catch (InvalidSubscriberIdException e) {
            unsubscribeSuccess = true;
        } catch (Exception ex) {
            unsubscribeSuccess = false;
        }
View Full Code Here

    public void testSyncHubUnsubscribeWithInvalidSubscriberId() throws Exception {
        Client hubClient = new HedwigHubClient(new HubClientConfiguration());
        Subscriber hubSubscriber = hubClient.getSubscriber();
        boolean unsubscribeSuccess = false;
        try {
            hubSubscriber.unsubscribe(getTopic(0), localSubscriberId);
        } catch (InvalidSubscriberIdException e) {
            unsubscribeSuccess = true;
        } catch (Exception ex) {
            unsubscribeSuccess = false;
        }
View Full Code Here

        sub.subscribe(topic, subidUnbounded, optionsUnbounded);
        sub.closeSubscription(topic, subidUnbounded);

        sendXExpectLastY(pub, sub, topic, subidUnbounded, 10000, 10000);
        sub.unsubscribe(topic, subidUnbounded);

        sendXExpectLastY(pub, sub, topic, subid20, 1000, 20);
        sub.unsubscribe(topic, subid20);

        sendXExpectLastY(pub, sub, topic, subid5, 1000, 5);
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.