Package javax.xml.ws

Examples of javax.xml.ws.AsyncHandler


            if (log.isDebugEnabled()) {
                log.debug("Async Callback");
            }

            //Get AsyncHandler from Objects and sent that to InvokeAsync
            AsyncHandler asyncHandler = null;
            for (Object obj : args) {
                if (obj != null && AsyncHandler.class.isAssignableFrom(obj.getClass())) {
                    asyncHandler = (AsyncHandler)obj;
                    break;
                }
View Full Code Here


        });
      
        // Allow the AsyncHandlerProxyFactory to create the proxy for the AsyncHandler
        // passed in (which was provided by the client on the async invocation).
        // This allows any server-specific work to be done, such as thread context management, etc.
        AsyncHandler originalHandler = handler;
        try {
            if (debug) {
                log.debug("Calling factory to create proxy for AsyncHandler instance: " + displayHandle(handler));
            }
            AsyncHandlerProxyFactory proxyFactory = (AsyncHandlerProxyFactory) FactoryRegistry
View Full Code Here

        throws Exception {
        Future<Response> future = theExecutor.submit(new Callable<Response>() {

            @Override
            public Response call() {
                AsyncHandler handler = (AsyncHandler)args[args.length - 1];
                Response response = doInvokeAsyncPoll(proxy, asyncMethod, Arrays.copyOf(args, args.length - 1));
                // Invoke the callback handler, if present
                if (handler != null) {
                    handler.handleResponse(response);
                } // end if
                return response;
            }
        });
        return future.get();
View Full Code Here

        throws Exception {
        Future<Response> future = theExecutor.submit(new Callable<Response>() {

            @Override
            public Response call() {
                AsyncHandler handler = (AsyncHandler)args[args.length - 1];
                Response response = doInvokeAsyncPoll(proxy, asyncMethod, Arrays.copyOf(args, args.length - 1));
                // Invoke the callback handler, if present
                if (handler != null) {
                    handler.handleResponse(response);
                } // end if
                return response;
            }
        });
        return future.get();
View Full Code Here

            BindingProvider p = (BindingProvider)proxy;
                p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,axisEndpoint);
               
            DocLitWrappedProxy dwp = (DocLitWrappedProxy)proxy;
            TestLogger.logger.debug(">> Invoking Proxy Asynchronous Callback");
            AsyncHandler handler = new AsyncCallback();
            Future<?> response = dwp.invokeAsync(request, handler);
            TestLogger.logger.debug("---------------------------------------");
        }catch(Exception e){
            e.printStackTrace();
            fail("Exception received" + e);
View Full Code Here

            Object proxy =service.getPort(portName, DocLitWrappedProxy.class);
            BindingProvider p = (BindingProvider)proxy;
                p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, axisEndpoint);
               
            DocLitWrappedProxy dwp = (DocLitWrappedProxy)proxy;
            AsyncHandler handler = new AsyncCallback();
            Future<?> response = dwp.twoWayAsync(request, handler);
           
        }catch(Exception e){
            e.printStackTrace();
            fail("Exception received" + e);
View Full Code Here

            if (log.isDebugEnabled()) {
                log.debug("Async Callback");
            }

            //Get AsyncHandler from Objects and sent that to InvokeAsync
            AsyncHandler asyncHandler = null;
            for (Object obj : args) {
                if (obj != null && AsyncHandler.class.isAssignableFrom(obj.getClass())) {
                    asyncHandler = (AsyncHandler)obj;
                    break;
                }
View Full Code Here

     */
    @SuppressWarnings("unchecked")
    private Object doInvokeAsyncCallback(final Object proxy, final Method asyncMethod, final Object[] args)
        throws Exception {

        AsyncHandler callback = (AsyncHandler)args[args.length - 1];
        Response response = doInvokeAsyncPoll(proxy, asyncMethod, Arrays.copyOf(args, args.length - 1), callback);
        return response;

    } // end method doInvokeAsyncCallback
View Full Code Here

            if (log.isDebugEnabled()) {
                log.debug("Async Callback");
            }

            //Get AsyncHandler from Objects and sent that to InvokeAsync
            AsyncHandler asyncHandler = null;
            for (Object obj : args) {
                if (obj != null && AsyncHandler.class.isAssignableFrom(obj.getClass())) {
                    asyncHandler = (AsyncHandler)obj;
                    break;
                }
View Full Code Here

            BindingProvider p = (BindingProvider)proxy;
                p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,axisEndpoint);
               
            DocLitWrappedProxy dwp = (DocLitWrappedProxy)proxy;
            TestLogger.logger.debug(">> Invoking Proxy Asynchronous Callback");
            AsyncHandler handler = new AsyncCallback();
            Future<?> response = dwp.invokeAsync(request, handler);
            TestLogger.logger.debug("---------------------------------------");
        }catch(Exception e){
            e.printStackTrace();
            fail("Exception received" + e);
View Full Code Here

TOP

Related Classes of javax.xml.ws.AsyncHandler

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.