Search in sources :

Example 6 with JdkLoggingFilter

use of ee.jakarta.tck.ws.rs.common.client.JdkLoggingFilter in project jaxrs-api by eclipse-ee4j.

the class JAXRSClientIT method startBuilderForMethod.

// ///////////////////////////////////////////////////////////////////////
// utility methods
protected Invocation.Builder startBuilderForMethod(String methodName) {
    Client client = createClient();
    client.register(new JdkLoggingFilter(false));
    WebTarget target = client.target(getAbsoluteUrl(methodName));
    Invocation.Builder ib = target.request();
    return ib;
}
Also used : JdkLoggingFilter(ee.jakarta.tck.ws.rs.common.client.JdkLoggingFilter) Invocation(jakarta.ws.rs.client.Invocation) WebTarget(jakarta.ws.rs.client.WebTarget) Client(jakarta.ws.rs.client.Client)

Example 7 with JdkLoggingFilter

use of ee.jakarta.tck.ws.rs.common.client.JdkLoggingFilter in project jaxrs-api by eclipse-ee4j.

the class JAXRSClientIT method startAsyncInvokerForMethod.

// ///////////////////////////////////////////////////////////////////////
// utility methods
/**
 * Create AsyncInvoker for given resource method and start time
 */
protected AsyncInvoker startAsyncInvokerForMethod(String methodName) {
    Client client = createClient();
    client.register(new JdkLoggingFilter(false));
    WebTarget target = client.target(getAbsoluteUrl(methodName));
    AsyncInvoker async = target.request().async();
    setStartTime();
    return async;
}
Also used : JdkLoggingFilter(ee.jakarta.tck.ws.rs.common.client.JdkLoggingFilter) AsyncInvoker(jakarta.ws.rs.client.AsyncInvoker) WebTarget(jakarta.ws.rs.client.WebTarget) Client(jakarta.ws.rs.client.Client)

Example 8 with JdkLoggingFilter

use of ee.jakarta.tck.ws.rs.common.client.JdkLoggingFilter in project jaxrs-api by eclipse-ee4j.

the class JAXRSClientIT method createBuilderForMethod.

/**
 * Create Invocation.Builder for given resource method and start time
 */
protected Invocation.Builder createBuilderForMethod(String methodName) {
    Client client = ClientBuilder.newClient();
    client.register(new JdkLoggingFilter(false));
    WebTarget target = client.target(getUrl(methodName));
    Invocation.Builder builder = target.request();
    return builder;
}
Also used : JdkLoggingFilter(ee.jakarta.tck.ws.rs.common.client.JdkLoggingFilter) Invocation(jakarta.ws.rs.client.Invocation) WebTarget(jakarta.ws.rs.client.WebTarget) JaxrsCommonClient(ee.jakarta.tck.ws.rs.common.client.JaxrsCommonClient) Client(jakarta.ws.rs.client.Client)

Aggregations

JdkLoggingFilter (ee.jakarta.tck.ws.rs.common.client.JdkLoggingFilter)8 Client (jakarta.ws.rs.client.Client)7 WebTarget (jakarta.ws.rs.client.WebTarget)6 JaxrsCommonClient (ee.jakarta.tck.ws.rs.common.client.JaxrsCommonClient)4 Invocation (jakarta.ws.rs.client.Invocation)4 AsyncInvoker (jakarta.ws.rs.client.AsyncInvoker)2 Response (jakarta.ws.rs.core.Response)2 JAXRSCommonClient (ee.jakarta.tck.ws.rs.common.JAXRSCommonClient)1 SyncInvoker (jakarta.ws.rs.client.SyncInvoker)1 Link (jakarta.ws.rs.core.Link)1 IOException (java.io.IOException)1 URI (java.net.URI)1 Test (org.junit.jupiter.api.Test)1