Examples of AsyncService


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.mule.module.cxf.testmodels.AsyncService

        MuleClient client = new MuleClient(muleContext);
        MuleMessage result = client.send("http://localhost:" + getPorts().get(0) + "/services/oneway",
            prepareOneWayTestMessage(), prepareOneWayTestProperties());
        assertEquals("", result.getPayloadAsString());

        AsyncService component = (AsyncService) getComponent("asyncService");
        assertTrue(component.getLatch().await(10000, TimeUnit.MILLISECONDS));
    }
View Full Code Here

Examples of org.mule.module.cxf.testmodels.AsyncService

    public void testOneWayDispatch() throws Exception
    {
        new MuleClient(muleContext).dispatch("http://localhost:" + getPorts().get(0) + "/services/oneway", prepareOneWayTestMessage(),
            prepareOneWayTestProperties());

        AsyncService component = (AsyncService) getComponent("asyncService");
        assertTrue(component.getLatch().await(10000, TimeUnit.MILLISECONDS));
    }
View Full Code Here

Examples of org.mule.module.cxf.testmodels.AsyncService

        MuleClient client = muleContext.getClient();
        MuleMessage result = client.send("http://localhost:" + dynamicPort.getNumber() + "/services/oneway",
            prepareOneWayTestMessage(), prepareOneWayWithSoapActionTestProperties());
        assertNotNull(result);

        AsyncService component = (AsyncService)getComponent("asyncService");
        assertFalse(component.getLatch().await(1000, TimeUnit.MILLISECONDS));
    }
View Full Code Here

Examples of org.mule.module.cxf.testmodels.AsyncService

    {
        MuleClient client = muleContext.getClient();
        client.dispatch("http://localhost:" + dynamicPort.getNumber() + "/services/oneway",
            prepareOneWayTestMessage(), prepareOneWayWithSoapActionTestProperties());

        AsyncService component = (AsyncService)getComponent("asyncService");
        assertFalse(component.getLatch().await(1000, TimeUnit.MILLISECONDS));
    }
View Full Code Here

Examples of org.mule.module.cxf.testmodels.AsyncService

        MuleClient client = muleContext.getClient();
        MuleMessage result = client.send("http://localhost:" + dynamicPort.getNumber() + "/services/oneway",
            prepareOneWayTestMessage(), prepareOneWayTestProperties());
        assertNotNull(result);

        AsyncService component = (AsyncService)getComponent("asyncService");
        assertTrue(component.getLatch().await(1000, TimeUnit.MILLISECONDS));
    }
View Full Code Here

Examples of org.mule.module.cxf.testmodels.AsyncService

    {
        MuleClient client = muleContext.getClient();
        client.dispatch("http://localhost:" + dynamicPort.getNumber() + "/services/oneway",
            prepareOneWayTestMessage(), prepareOneWayTestProperties());

        AsyncService component = (AsyncService)getComponent("asyncService");
        assertTrue(component.getLatch().await(1000, TimeUnit.MILLISECONDS));
    }
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.