Package org.apache.axis2.client.async

Examples of org.apache.axis2.client.async.AsyncResult


                        } else {
                            callback.onError(new Exception(body.getFault()
                                    .getReason().getText()));
                        }
                    } else {
                        AsyncResult asyncResult = new AsyncResult(response);

                        callback.onComplete(asyncResult);
                    }
                }
View Full Code Here


    public void receive(MessageContext messageCtx) throws AxisFault {
        RelatesTo relatesTO = messageCtx.getOptions().getRelatesTo();
        String messageID = relatesTO.getValue();
        Callback callback = (Callback) callbackStore.get(messageID);
    AsyncResult result = new AsyncResult(messageCtx);

    if (callback != null) {
      try {
        // check weather the result is a fault.
        SOAPEnvelope envelope = result.getResponseEnvelope();
        SOAPFault fault = envelope.getBody().getFault();

        if (fault == null) {
          // if there is not fault call the onComplete method
          callback.onComplete(result);
View Full Code Here

                    } else {
                        callback.onError(new Exception(body.getFault()
                                .getReason().getText()));
                    }
                } else {
                    AsyncResult asyncResult = new AsyncResult(response);

                    callback.onComplete(asyncResult);
                }

                callback.setComplete(true);
View Full Code Here

    public void receive(MessageContext messageCtx) throws AxisFault {
        RelatesTo relatesTO = messageCtx.getOptions().getRelatesTo();
        String messageID = relatesTO.getValue();
        Callback callback = (Callback) callbackStore.get(messageID);
        AsyncResult result = new AsyncResult(messageCtx);

        if (callback != null) {
            callback.onComplete(result);
            callback.setComplete(true);
        } else {
View Full Code Here

                        // If a fault was found, create an AxisFault with a MessageContext so that
                        // other programming models can deserialize the fault to an alternative form.
                        AxisFault fault = new AxisFault(body.getFault(), response);
                        callback.onError(fault);
                    } else {
                        AsyncResult asyncResult = new AsyncResult(response);
                        callback.onComplete(asyncResult);
                    }
                }

            } catch (Exception e) {
View Full Code Here

        if (relatesTO == null) {
            throw new AxisFault("Cannot identify correct Callback object. RelatesTo is null");
        }
        String messageID = relatesTO.getValue();
        Callback callback = (Callback) callbackStore.remove(messageID);
        AsyncResult result = new AsyncResult(messageCtx);

        if (callback == null) {
            throw new AxisFault("The Callback realtes to MessageID " + messageID + " is not found");
        }
       
        try {
            // check weather the result is a fault.
            SOAPEnvelope envelope = result.getResponseEnvelope();
            SOAPFault fault = envelope.getBody().getFault();

            if (fault == null) {
                // if there is not fault call the onComplete method
                callback.onComplete(result);
View Full Code Here

    public void init(SynapseEnvironment synapseEnvironment) {
        ConfigurationContext cc =
                ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext();
        if (!initialized) {
            // The check for clustering environment
            ClusteringAgent clusteringAgent = cc.getAxisConfiguration().getClusteringAgent();
            if (clusteringAgent != null && clusteringAgent.getStateManager() != null) {
                isClusteringEnabled = Boolean.TRUE;
            } else {
                isClusteringEnabled = Boolean.FALSE;
            }
View Full Code Here

        return lbMembershipHandler;
    }

    public void send(MessageContext synCtx) {
        SessionInformation sessionInformation = null;
        Member currentMember = null;
        ConfigurationContext configCtx =
                ((Axis2MessageContext) synCtx).getAxis2MessageContext().getConfigurationContext();
        if (lbMembershipHandler.getConfigurationContext() == null) {
            lbMembershipHandler.setConfigurationContext(configCtx);
        }
View Full Code Here

    }

    //----------------------- default method implementations and common code -----------------------

    public void init(SynapseEnvironment synapseEnvironment) {
        ConfigurationContext cc =
                ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext();
        if (!initialized) {
            // The check for clustering environment
            ClusteringAgent clusteringAgent = cc.getAxisConfiguration().getClusteringAgent();
            if (clusteringAgent != null && clusteringAgent.getStateManager() != null) {
                isClusteringEnabled = Boolean.TRUE;
            } else {
                isClusteringEnabled = Boolean.FALSE;
            }
View Full Code Here

     */
    private AlgorithmContext algorithmContext;

    @Override
    public void init(SynapseEnvironment synapseEnvironment) {
        ConfigurationContext cc =
                ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext();
        if (!initialized) {
            super.init(synapseEnvironment);
            if (algorithmContext == null) {
                algorithmContext = new AlgorithmContext(isClusteringEnabled, cc, getName());
View Full Code Here

TOP

Related Classes of org.apache.axis2.client.async.AsyncResult

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.