Examples of ClientCallback


Examples of mage.interfaces.callback.ClientCallback

  public void ask(final String question, final GameView gameView) {
    if (!killed) {
      setupTimeout();
      Session session = SessionManager.getInstance().getSession(sessionId);
      if (session != null)
        session.fireCallback(new ClientCallback("gameAsk", new GameClientMessage(gameView, question)));
    }
  }
View Full Code Here

Examples of org.apache.cxf.endpoint.ClientCallback

                    // partial response
                    closeInputStream();
                    if (isOneway(exchange) && responseCode > 300) {
                        throw new HTTPException(responseCode, getResponseMessage(), url.toURL());
                    }
                    ClientCallback cc = exchange.get(ClientCallback.class);
                    if (null != cc) {
                        //REVISIT move the decoupled destination property name into api
                        Endpoint ep = exchange.getEndpoint();
                        if (null != ep && null != ep.getEndpointInfo() && null == ep.getEndpointInfo().
                            getProperty("org.apache.cxf.ws.addressing.MAPAggregator.decoupledDestination")) {
                            cc.handleResponse(null, null);
                        }
                    }
                    exchange.setInMessage(inMessage);
                    return;
                }
View Full Code Here

Examples of org.apache.cxf.endpoint.ClientCallback

        if (params.length > 0 && params[params.length - 1] instanceof AsyncHandler) {
            handler = (AsyncHandler)params[params.length - 1];
        } else {
            handler = null;
        }
        ClientCallback callback = new JaxwsClientCallback(handler, this);
            
        Response<Object> ret = new JaxwsResponseCallback(callback);
        client.invoke(callback, oi, params);
        return ret;
    }
View Full Code Here

Examples of org.apache.cxf.endpoint.ClientCallback

        if (m.get(Message.INBOUND_MESSAGE).equals(Boolean.TRUE)) {
            //it's outbound fault observer so only take care of outbound fault
            return;
        }
        Exception ex = m.getContent(Exception.class);
        ClientCallback callback = m.getExchange().get(ClientCallback.class);

        if (callback != null) {
            Map<String, Object> resCtx = CastUtils.cast((Map<?, ?>) m.getExchange().getOutMessage().get(
                    Message.INVOCATION_CONTEXT));
            resCtx = CastUtils.cast((Map<?, ?>) resCtx.get(ClientImpl.RESPONSE_CONTEXT));
            callback.handleException(resCtx, ex);
        }
    }
View Full Code Here

Examples of org.apache.cxf.endpoint.ClientCallback

            }
            params = newParams;
        } else {
            handler = null;
        }
        ClientCallback callback = new JaxwsClientCallback<Object>(handler, this);
            
        Response<Object> ret = new JaxwsResponseCallback<Object>(callback);
        client.invoke(callback, oi, params);
        return ret;
    }
View Full Code Here

Examples of org.apache.cxf.endpoint.ClientCallback

                    // partial response
                    closeInputStream(connection);
                    if (isOneway(exchange) && responseCode > 300) {
                        throw new HTTPException(responseCode, connection.getResponseMessage(), connection.getURL());
                    }
                    ClientCallback cc = exchange.get(ClientCallback.class);
                    if (null != cc) {
                        //REVISIT move the decoupled destination property name into api
                        Endpoint ep = exchange.getEndpoint();
                        if (null != ep && null != ep.getEndpointInfo() && null == ep.getEndpointInfo().
                            getProperty("org.apache.cxf.ws.addressing.MAPAggregator.decoupledDestination")) {
                            cc.handleResponse(null, null);
                        }
                    }
                    if (in != null) {
                        in.close();
                    }
View Full Code Here

Examples of org.apache.cxf.endpoint.ClientCallback

                in = getPartialResponse(connection, responseCode);
                if (in == null) {
                    // oneway operation or decoupled MEP without
                    // partial response
                    connection.getInputStream().close();
                    ClientCallback cc = exchange.get(ClientCallback.class);
                    if (null != cc) {
                        //REVISIT move the decoupled destination property name into api
                        Endpoint ep = exchange.getEndpoint();
                        if (null != ep && null != ep.getEndpointInfo() && null == ep.getEndpointInfo().
                            getProperty("org.apache.cxf.ws.addressing.MAPAggregator.decoupledDestination")) {
                            cc.handleResponse(null, null);
                        }
                    }
                    return;
                }
            } else {
View Full Code Here

Examples of org.apache.cxf.endpoint.ClientCallback

            }
            params = newParams;
        } else {
            handler = null;
        }
        ClientCallback callback = new JaxwsClientCallback<Object>(handler, this);
            
        Response<Object> ret = new JaxwsResponseCallback<Object>(callback);
        client.invoke(callback, oi, params);
        return ret;
    }
View Full Code Here

Examples of org.apache.cxf.endpoint.ClientCallback

 
    public Future<?> invokeAsync(T obj, AsyncHandler<T> asyncHandler) {
        checkError();
        client.setExecutor(getClient().getEndpoint().getExecutor());

        ClientCallback callback = new JaxwsClientCallback<T>(asyncHandler, this);
            
        Response<T> ret = new JaxwsResponseCallback<T>(callback);
        try {
            QName opName = (QName)getRequestContext().get(MessageContext.WSDL_OPERATION);
            if (opName == null) {
View Full Code Here

Examples of org.apache.cxf.endpoint.ClientCallback

            handler = (AsyncHandler)params[params.length - 1];
        } else {
            handler = null;
        }
       
        final ClientCallback callback = new ClientCallback() {
            public void handleResponse(Map<String, Object> ctx, Object[] res) {
                super.handleResponse(ctx, res);
                if (handler != null) {
                    handler.handleResponse(new ResponseCallback(this));
                }
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.