Package org.apache.hedwig.client.exceptions

Examples of org.apache.hedwig.client.exceptions.AlreadyStartDeliveryException


     * @throws ClientNotSubscribedException when start delivery before subscribe.
     */
    public synchronized void startDelivery(MessageHandler messageHandler)
    throws AlreadyStartDeliveryException, ClientNotSubscribedException {
        if (null != this.msgHandler) {
            throw new AlreadyStartDeliveryException("A message handler " + msgHandler
                + " has been started for " + topicSubscriber);
        }
        if (null != messageHandler && messageHandler instanceof FilterableMessageHandler) {
            FilterableMessageHandler filterMsgHandler =
                (FilterableMessageHandler) messageHandler;
View Full Code Here


            // restart using existing msg handler
            messageHandler = existedMsgHandler;
        } else {
            // some has started delivery but not stop it
            if (null != existedMsgHandler) {
                throw new AlreadyStartDeliveryException("A message handler has been started for topic subscriber " + topicSubscriber);
            }
            if (messageHandler != null) {
                if (null != topicSubscriber2MessageHandler.putIfAbsent(topicSubscriber, messageHandler)) {
                    throw new AlreadyStartDeliveryException("Someone is also starting delivery for topic subscriber " + topicSubscriber);
                }
            }
        }
        HedwigClientImpl.getResponseHandlerFromChannel(topicSubscriberChannel).getSubscribeResponseHandler()
        .setMessageHandler(messageHandler);
View Full Code Here

            // restart using existing msg handler
            messageHandler = existedMsgHandler;
        } else {
            // some has started delivery but not stop it
            if (null != existedMsgHandler) {
                throw new AlreadyStartDeliveryException("A message handler has been started for topic subscriber " + topicSubscriber);
            }
            if (messageHandler != null) {
                if (null != topicSubscriber2MessageHandler.putIfAbsent(topicSubscriber, messageHandler)) {
                    throw new AlreadyStartDeliveryException("Someone is also starting delivery for topic subscriber " + topicSubscriber);
                }
            }
        }

        // tell subscribe response handler to start delivering messages for topicSubscriber
View Full Code Here

     * @throws ClientNotSubscribedException when start delivery before subscribe.
     */
    public synchronized void startDelivery(MessageHandler messageHandler)
    throws AlreadyStartDeliveryException, ClientNotSubscribedException {
        if (null != this.msgHandler) {
            throw new AlreadyStartDeliveryException("A message handler " + msgHandler
                + " has been started for " + topicSubscriber);
        }
        if (null != messageHandler && messageHandler instanceof FilterableMessageHandler) {
            FilterableMessageHandler filterMsgHandler =
                (FilterableMessageHandler) messageHandler;
View Full Code Here

            // restart using existing msg handler
            messageHandler = existedMsgHandler;
        } else {
            // some has started delivery but not stop it
            if (null != existedMsgHandler) {
                throw new AlreadyStartDeliveryException("A message handler has been started for topic subscriber " + topicSubscriber);
            }
            if (messageHandler != null) {
                if (null != topicSubscriber2MessageHandler.putIfAbsent(topicSubscriber, messageHandler)) {
                    throw new AlreadyStartDeliveryException("Someone is also starting delivery for topic subscriber " + topicSubscriber);
                }
            }
        }

        // tell subscribe response handler to start delivering messages for topicSubscriber
View Full Code Here

TOP

Related Classes of org.apache.hedwig.client.exceptions.AlreadyStartDeliveryException

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.