Examples of AsyncHandler


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

Examples of javax.xml.ws.AsyncHandler

        });
      
        // 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

Examples of javax.xml.ws.AsyncHandler

            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);
           
            // Try again
            handler = new AsyncCallback();
            response = dwp.invokeAsync(request, handler);
View Full Code Here

Examples of javax.xml.ws.AsyncHandler

            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);
           
            // Try again
            handler = new AsyncCallback();
            response = dwp.twoWayAsync(request, handler);
View Full Code Here

Examples of javax.xml.ws.AsyncHandler

        this.handlerPos = handlerPos;
    }

    Future<?> invoke(Object proxy, Object[] args) throws WebServiceException {
        // the spec requires the last argument
        final AsyncHandler handler = (AsyncHandler)args[handlerPos];

        return doInvoke(proxy, args, handler);
    }
View Full Code Here

Examples of javax.xml.ws.AsyncHandler

      verifyResponse((Source)response.get(3000, TimeUnit.MILLISECONDS));
   }

   public void testInvokeAsynchHandler() throws Exception
   {
      AsyncHandler handler = new AsyncHandler()
      {
         public void handleResponse(Response response)
         {
            try
            {
View Full Code Here

Examples of javax.xml.ws.AsyncHandler

      verifyResponse((Source)response.get(3000, TimeUnit.MILLISECONDS));
   }

   public void testInvokeAsynchHandler() throws Exception
   {
      AsyncHandler handler = new AsyncHandler()
      {
         public void handleResponse(Response response)
         {
            try
            {
View Full Code Here

Examples of org.asynchttpclient.AsyncHandler

            RequestBuilder builder = new RequestBuilder();
            builder.setMethod(Method.CONNECT.getMethodString());
            builder.setUrl("http://" + getAuthority(requestUri));
            Request request = builder.build();

            AsyncHandler handler = new AsyncCompletionHandler() {
                @Override
                public Object onCompleted(Response response) throws Exception {
                    if (response.getStatusCode() != 200) {
                        PROXY_AUTH_FAILURE.set(ctx.getConnection(), Boolean.TRUE);
                    }
View Full Code Here

Examples of org.jboss.logmanager.handlers.AsyncHandler

    private AbstractFormatterSpec formatterSpec;
    private String encoding;
    private boolean autoflush;

    public synchronized void start(final StartContext context) throws StartException {
        final AsyncHandler handler = new AsyncHandler(queueLength);
        value = handler;
        formatterSpec.apply(handler);
        handler.setOverflowAction(overflowAction);
        handler.setAutoFlush(autoflush);
        if (filter != null) handler.setFilter(filter);
        try {
            handler.setEncoding(encoding);
        } catch (UnsupportedEncodingException e) {
            throw new StartException(e);
        }
        Handler[] handlers = new Handler[subhandlers.size()];
        for (int i = 0, subhandlersSize = subhandlers.size(); i < subhandlersSize; i++) {
            handlers[i] = subhandlers.get(i).getValue();
        }
        handler.setHandlers(handlers);
        if (level != null) handler.setLevel(level);
    }
View Full Code Here

Examples of org.jboss.logmanager.handlers.AsyncHandler

        handler.setHandlers(handlers);
        if (level != null) handler.setLevel(level);
    }

    public synchronized void stop(final StopContext context) {
        final AsyncHandler handler = value;
        handler.close();
        handler.setLevel(Level.OFF);
        handler.clearHandlers();
        value = null;
    }
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.