Examples of AsyncService


Examples of org.apache.axis2.jaxws.sample.parallelasync.server.AsyncService

    public void testService_ExecutorShutdownNow() throws Exception {
        final String MESSAGE = "testExecutorShutdownNow";

        String title = myClassName + " : " + getName() + " : ";

        AsyncService service = getService(null);
        AsyncPort port = getPort(service);

    // get the default executor and check to make sure it is an executor service
        ExecutorService ex = null;
        Executor executor = service.getExecutor();
        if ((executor != null) && (executor instanceof ExecutorService))
        {
            ex = (ExecutorService) executor;
        }
        else
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.parallelasync.server.AsyncService

    public void testService_ExecutorShutdownNow_2() throws Exception {
        final String MESSAGE = "testExecutorShutdownNow_2";

        String title = myClassName + " : " + getName() + " : ";

        AsyncService service = getService(null);
        AsyncPort port = getPort(service);

    // get the default executor and check to make sure it is an executor service
    ExecutorService ex = Executors.newSingleThreadExecutor();
    service.setExecutor(ex);


        // submit a request to the server that will wait until we ask for it
    CallbackHandler<SleepResponse> sleepCallbackHandler1 = new CallbackHandler<SleepResponse>();
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.parallelasync.server.AsyncService

    public void testService_ExecutorShutdownNow_3() throws Exception {
        final String MESSAGE = "testExecutorShutdownNow_3";

        String title = myClassName + " : " + getName() + " : ";

        AsyncService service = getService(null);
        AsyncPort port = getPort(service);

    // get the default executor and check to make sure it is an executor service
        ExecutorService ex = null;
        Executor executor = service.getExecutor();
        if ((executor != null) && (executor instanceof ExecutorService))
        {
            ex = (ExecutorService) executor;

            // tell the executor to shutdown immediately, which
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.parallelasync.server.AsyncService

        return true;
    }
   

    private AsyncService getService(Executor ex) {
        AsyncService service = new AsyncService();

        if (ex!= null)
            service.setExecutor(ex);
       
        if (service.getExecutor() == null)
        {
            TestLogger.logger.debug(myClassName + " : getService() : executor is null");
        }
        else
        {
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.parallelasync.server.AsyncService

    /**
     * Auxiliary method used for obtaining a proxy pre-configured with a
     * specific Executor
     */
    private AsyncPort getPort(Executor ex) {
        AsyncService service = getService(ex);

        AsyncPort port = service.getAsyncPort();
        assertNotNull("Port is null", port);

        Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
        rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                DOCLITWR_ASYNC_ENDPOINT);
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.parallelasync.server.AsyncService

        }
        return monitor;
    }
   
    private AsyncService getService(Executor ex) {
        AsyncService service = new AsyncService();

        if (ex!= null)
            service.setExecutor(ex);
       
        if (service.getExecutor() == null) {
            TestLogger.logger.debug(myClassName + " : getService() : executor is null");
        }
        else {
            TestLogger.logger.debug(myClassName + " : getService() : executor is available ");
        }
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.parallelasync.server.AsyncService

    /**
     * Auxiliary method used for obtaining a proxy pre-configured with a
     * specific Executor
     */
    private AsyncPort getPort(Executor ex) {
        AsyncService service = getService(ex);

        AsyncPort port = service.getAsyncPort();
        assertNotNull("Port is null", port);

        Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
        rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                DOCLITWR_ASYNC_ENDPOINT);
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.parallelasync.server.AsyncService

        }
       
        public void sendClientRequest() throws Exception {
            String title = myClassName + " : SendClientRequest : ";

            AsyncService service = new AsyncService();
            AsyncPort port = getPort(service);

            // Setup an executor for response processing to run on a different thread
            ExecutorService ex = Executors.newSingleThreadExecutor();
            service.setExecutor(ex);

            // submit a request to the server that will wait until we ask for it
            // Note that this thread is not going to ask for it; another thread will do that.
            CallbackHandler<SleepResponse> sleepCallbackHandler1 = new CallbackHandler<SleepResponse>();
            monitor.callbackHandler = sleepCallbackHandler1;
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.parallelasync.server.AsyncService

        private void receiveResponse() throws Exception {
            String title = myClassName + " : ReceiveClientResponse : ";
            String request1 = monitor.request;
           
            AsyncService service = new AsyncService();
            AsyncPort port = getPort(service);

            // wait a bit to make sure that the server has the request;
            Thread.sleep(1000);
           
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.parallelasync.server.AsyncService

    public void testService_ExecutorShutdownNow() throws Exception {
        final String MESSAGE = "testExecutorShutdownNow";

        String title = myClassName + " : " + getName() + " : ";

        AsyncService service = getService(null);
        AsyncPort port = getPort(service);

    // get the default executor and check to make sure it is an executor service
        ExecutorService ex = null;
        Executor executor = service.getExecutor();
        if ((executor != null) && (executor instanceof ExecutorService))
        {
            ex = (ExecutorService) executor;
        }
        else
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.