Examples of MsgBrokerClientException


Examples of org.apache.airavata.wsmg.client.MsgBrokerClientException

        WseMsgBrokerClient wseClient = new WseMsgBrokerClient();
        EndpointReference endpointReference = null;
        try {
            endpointReference = EndpointReferenceHelper.fromString(epr);
        } catch (AxisFault f) {
            throw new MsgBrokerClientException("unable to convert end point reference", f);
        }
        subscriptionId = subscribeToBroker(endpointReference.getAddress(), topic, xpath, wseClient, subscribePermanatly);
        Subscription subscription = new Subscription(this, subscriptionId, topic, callback, this.brokerURL);
        subscription.setMessageBoxEpr(endpointReference);
        return subscription;
View Full Code Here

Examples of org.apache.airavata.wsmg.client.MsgBrokerClientException

        if (msgBoxEventSink.contains("clientid")) {
            formattedEventSink = msgBoxEventSink;
        } else {
            if (msgBoxAddr.getAllReferenceParameters() == null)
                throw new MsgBrokerClientException("Invalid Message Box EPR, no reference parameters found");
            String msgBoxId = msgBoxAddr.getAllReferenceParameters().get(MsgBoxQNameConstants.MSG_BOXID_QNAME)
                    .getText();
            if (msgBoxId == null)
                throw new MsgBrokerClientException("Invalid Message Box EPR, reference parameter MsgBoxAddr is missing");
            String format = msgBoxEventSink.endsWith("/") ? "%sclientid/%s" : "%s/clientid/%s";

            formattedEventSink = String.format(format, msgBoxEventSink, msgBoxId);

        }
View Full Code Here

Examples of org.apache.airavata.wsmg.client.MsgBrokerClientException

        EndpointReference msgBoxAddr = null;

        try {
            msgBoxAddr = msgBoxUser.createMessageBox(msgBoxLocation, timeout);
        } catch (RemoteException e) {
            throw new MsgBrokerClientException("unable to create msgbox", e);
        }

        return msgBoxAddr;
    }
View Full Code Here

Examples of org.apache.airavata.wsmg.client.MsgBrokerClientException

    }

    public MessagePuller startPullingEventsFromMsgBox(EndpointReference msgBoxEpr, NotificationHandler handler,
            long interval, long timeout) throws MsgBrokerClientException {
        if (msgBoxUser == null) {
            throw new MsgBrokerClientException("Unable start pulling, the messagebox client was not initialized");
        }

        MessagePuller messagePuller = new MessagePuller(msgBoxUser, msgBoxEpr, handler, interval, timeout);
        messagePuller.startPulling();
        return messagePuller;
View Full Code Here

Examples of org.apache.airavata.wsmg.client.MsgBrokerClientException

        String clientId = toAddress.substring(biginIndex + "clientid".length() + 1);

        if ((msgBoxAddr.getAllReferenceParameters() == null || msgBoxAddr.getAllReferenceParameters()
                .get(MsgBoxQNameConstants.MSG_BOXID_QNAME).getText() == null)
                && biginIndex == -1)
            throw new MsgBrokerClientException("Invalid Message Box Address");
        this.msgBoxUser = new MsgBoxClient();
        MessagePuller messagePuller = new MessagePuller(msgBoxUser, msgBoxAddr, handler, interval, timeout);
        messagePuller.startPulling();
        return messagePuller;
    }
View Full Code Here

Examples of org.apache.airavata.wsmg.client.MsgBrokerClientException

        if (msgBoxEpr.getAddress().contains("clientid")) {
            formattedEventSink = msgBoxEventSink;
        } else {
            if (msgBoxEpr.getAllReferenceParameters() == null)
                throw new MsgBrokerClientException("Invalid Message Box EPR, no reference parameters found");
            String msgBoxId = msgBoxEpr.getAllReferenceParameters().get(MsgBoxQNameConstants.MSG_BOXID_QNAME).getText();
            if (msgBoxId == null)
                throw new MsgBrokerClientException(
                        "Invalid Message Box EPR, reference parameter MsgBoxAddress is missing");
            String format = msgBoxEventSink.endsWith("/") ? "%sclientid/%s" : "%s/clientid/%s";

            formattedEventSink = String.format(format, msgBoxEventSink, msgBoxId);

        }

        if (this.msgBoxUser == null) {
            this.msgBoxUser = new MsgBoxClient();
        }

        String resp = null;
        try {
            resp = msgBoxUser.deleteMsgBox(msgBoxEpr, timeout);
        } catch (RemoteException e) {
            throw new MsgBrokerClientException("unable to delete the msg box", e);
        }

        return resp;
    }
View Full Code Here

Examples of org.apache.airavata.wsmg.client.MsgBrokerClientException

        WseMsgBrokerClient wseClient = new WseMsgBrokerClient();
        EndpointReference endpointReference = null;
        try {
            endpointReference = EndpointReferenceHelper.fromString(epr);
        } catch (AxisFault f) {
            throw new MsgBrokerClientException("unable to convert end point reference", f);
        }
        subscriptionId = subscribeToBroker(endpointReference.getAddress(), topic, xpath, wseClient, subscribePermanatly);
        Subscription subscription = new Subscription(this, subscriptionId, topic, callback, this.brokerURL);
        subscription.setMessageBoxEpr(endpointReference);
        return subscription;
View Full Code Here

Examples of org.apache.airavata.wsmg.client.MsgBrokerClientException

        if (msgBoxEventSink.contains("clientid")) {
            formattedEventSink = msgBoxEventSink;
        } else {
            if (msgBoxAddr.getAllReferenceParameters() == null)
                throw new MsgBrokerClientException("Invalid Message Box EPR, no reference parameters found");
            String msgBoxId = msgBoxAddr.getAllReferenceParameters().get(MsgBoxQNameConstants.MSG_BOXID_QNAME)
                    .getText();
            if (msgBoxId == null)
                throw new MsgBrokerClientException("Invalid Message Box EPR, reference parameter MsgBoxAddr is missing");
            String format = msgBoxEventSink.endsWith("/") ? "%sclientid/%s" : "%s/clientid/%s";

            formattedEventSink = String.format(format, msgBoxEventSink, msgBoxId);

        }
View Full Code Here

Examples of org.apache.airavata.wsmg.client.MsgBrokerClientException

        EndpointReference msgBoxAddr = null;

        try {
            msgBoxAddr = msgBoxUser.createMessageBox(msgBoxLocation, timeout);
        } catch (RemoteException e) {
            throw new MsgBrokerClientException("unable to create msgbox", e);
        }

        return msgBoxAddr;
    }
View Full Code Here

Examples of org.apache.airavata.wsmg.client.MsgBrokerClientException

    }

    public MessagePuller startPullingEventsFromMsgBox(EndpointReference msgBoxEpr, NotificationHandler handler,
            long interval, long timeout) throws MsgBrokerClientException {
        if (msgBoxUser == null) {
            throw new MsgBrokerClientException("Unable start pulling, the messagebox client was not initialized");
        }

        MessagePuller messagePuller = new MessagePuller(msgBoxUser, msgBoxEpr, handler, interval, timeout);
        messagePuller.startPulling();
        return messagePuller;
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.