Examples of resolveTemplate()


Examples of javax.ws.rs.client.WebTarget.resolveTemplate()

    public void listenToMethodStatistics(Consumer<MethodsStatistics> consumer, Consumer<Throwable> error, String application, String ejbName) {
        final String uri = getUri();
        System.out.println("Uri: " + uri);
        WebTarget target = this.client.target(uri);

        target.
                resolveTemplate("application", application).
                resolveTemplate("ejb", ejbName).
                request(MediaType.APPLICATION_JSON).async().get(new InvocationCallback<JsonObject>() {
            @Override
            public void completed(JsonObject jsonObject) {
View Full Code Here

Examples of javax.ws.rs.client.WebTarget.resolveTemplate()

    public PoolStatistics getPoolStats(String application, String ejbName) {
        final String uri = getUri();
        System.out.println("Uri: " + uri);
        WebTarget target = this.client.target(uri);

        Response response = target.
                resolveTemplate("application", application).
                resolveTemplate("ejb", ejbName).
                request(MediaType.APPLICATION_JSON).get(Response.class);

        if (response.getStatus() == 404) {
View Full Code Here

Examples of javax.ws.rs.client.WebTarget.resolveTemplate()

        return preprocessChildResource(applications);
    }

    public JsonObject fetchMethods(String applicationName, String ejbName) {
        WebTarget target = client.target(getUri() + "{application}/{bean}/bean-methods/");
        Response response = target.resolveTemplate("application", applicationName).
                resolveTemplate("bean", ejbName).
                request(MediaType.APPLICATION_JSON).get(Response.class);
        if (response.getStatus() == 404) {
            return null;
        }
View Full Code Here

Examples of javax.ws.rs.client.WebTarget.resolveTemplate()

        return preprocessChildResource(rawStatistics);
    }

    public JsonObject fetchApplicationStatistics(String applicationName) {
        WebTarget target = client.target(getUri() + "{application}/server/");
        Response response = target.resolveTemplate("application", applicationName).
                request(MediaType.APPLICATION_JSON).get(Response.class);
        if (response.getStatus() == 404) {
            return null;
        }
        JsonObject rawStatistics = response.readEntity(JsonObject.class);
View Full Code Here

Examples of javax.ws.rs.client.WebTarget.resolveTemplate()

        return preprocessEntity(rawStatistics);
    }

    public JsonObject fetchMethodStatistics(String applicationName, String ejbName, String methodName) {
        WebTarget target = client.target(getUri() + "{application}/{bean}/bean-methods/{method}");
        Response response = target.resolveTemplate("application", applicationName).
                resolveTemplate("bean", ejbName).
                resolveTemplate("method", methodName).
                request(MediaType.APPLICATION_JSON).get(Response.class);
        if (response.getStatus() == 404) {
            return null;
View Full Code Here

Examples of javax.ws.rs.client.WebTarget.resolveTemplate()

        return preprocessEntity(rawStatistics);
    }

    public JsonObject fetchBeanPoolStatistics(String applicationName, String ejbName) {
        WebTarget target = client.target(getUri() + "{application}/{bean}/bean-pool");
        Response response = target.resolveTemplate("application", applicationName).
                resolveTemplate("bean", ejbName).
                request(MediaType.APPLICATION_JSON).get(Response.class);
        if (response.getStatus() == 404) {
            return null;
        }
View Full Code Here

Examples of javax.ws.rs.client.WebTarget.resolveTemplate()

    @Test
    public void testManagedClient() throws Exception {
        final WebTarget resource = target().path("public").path("{name}");
        Response response;

        response = resource.resolveTemplate("name", "a").request(MediaType.TEXT_PLAIN).get();
        assertEquals(200, response.getStatus());
        assertEquals("a", response.readEntity(String.class));

        response = resource.resolveTemplate("name", "b").request(MediaType.TEXT_PLAIN).get();
        assertEquals(200, response.getStatus());
View Full Code Here

Examples of javax.ws.rs.client.WebTarget.resolveTemplate()

        response = resource.resolveTemplate("name", "a").request(MediaType.TEXT_PLAIN).get();
        assertEquals(200, response.getStatus());
        assertEquals("a", response.readEntity(String.class));

        response = resource.resolveTemplate("name", "b").request(MediaType.TEXT_PLAIN).get();
        assertEquals(200, response.getStatus());
        assertEquals("b", response.readEntity(String.class));
    }

View Full Code Here

Examples of javax.ws.rs.client.WebTarget.resolveTemplate()

    @Test
    public void testManagedClient() throws Exception {
        final WebTarget resource = target().path("public").path("{name}");
        Response response;

        response = resource.resolveTemplate("name", "a").request(MediaType.TEXT_PLAIN).get();
        assertEquals(200, response.getStatus());
        assertEquals("a", response.readEntity(String.class));

        response = resource.resolveTemplate("name", "b").request(MediaType.TEXT_PLAIN).get();
        assertEquals(200, response.getStatus());
View Full Code Here

Examples of javax.ws.rs.client.WebTarget.resolveTemplate()

        response = resource.resolveTemplate("name", "a").request(MediaType.TEXT_PLAIN).get();
        assertEquals(200, response.getStatus());
        assertEquals("a", response.readEntity(String.class));

        response = resource.resolveTemplate("name", "b").request(MediaType.TEXT_PLAIN).get();
        assertEquals(200, response.getStatus());
        assertEquals("b", response.readEntity(String.class));
    }

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.