Package com.aceevo.ursus.example.model

Examples of com.aceevo.ursus.example.model.Hello


    ExampleApplicationConfiguration exampleApplicationConfiguration;

    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public Response hello() {
        return Response.ok(new Hello(exampleApplicationConfiguration.getName())).build();
    }
View Full Code Here


        executorService.submit(new Runnable() {
            @Override
            public void run() {
                try {
                    Thread.currentThread().sleep(5000);
                    asyncResponse.resume(Response.ok(new Hello(exampleApplicationConfiguration.getName())).build());
                } catch (InterruptedException e) {
                    e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
                }
            }
        });
View Full Code Here

    ExecutorService executorService = Executors.newSingleThreadExecutor();

    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public Response hello() {
        return Response.ok(new Hello("Ray")).build();
    }
View Full Code Here

        Future<Hello> helloFuture = executorService.submit(new Callable<Hello>() {
            @Override
            public Hello call() throws Exception {
                Thread.currentThread().sleep(5000);
                return new Hello("Ray");
            }
        });

        Hello hello = helloFuture.get();
        asyncResponse.resume(Response.ok(hello).build());
    }
View Full Code Here

TOP

Related Classes of com.aceevo.ursus.example.model.Hello

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.