Search in sources :

Example 26 with LoggingFeature

use of org.glassfish.jersey.logging.LoggingFeature in project jersey by jersey.

the class AuthFilterTest method configure.

@Override
protected Application configure() {
    ResourceConfig config = new ResourceConfig(AuthTest.AuthResource.class);
    config.register(new LoggingFeature(LOGGER, LoggingFeature.Verbosity.PAYLOAD_ANY));
    return config;
}
Also used : LoggingFeature(org.glassfish.jersey.logging.LoggingFeature) ResourceConfig(org.glassfish.jersey.server.ResourceConfig)

Example 27 with LoggingFeature

use of org.glassfish.jersey.logging.LoggingFeature in project jersey by jersey.

the class NoEntityTest method configure.

@Override
protected Application configure() {
    ResourceConfig config = new ResourceConfig(HttpMethodResource.class);
    config.register(new LoggingFeature(LOGGER, LoggingFeature.Verbosity.PAYLOAD_ANY));
    return config;
}
Also used : LoggingFeature(org.glassfish.jersey.logging.LoggingFeature) ResourceConfig(org.glassfish.jersey.server.ResourceConfig)

Example 28 with LoggingFeature

use of org.glassfish.jersey.logging.LoggingFeature in project jersey by jersey.

the class TraceSupportTest method configure.

@Override
protected Application configure() {
    ResourceConfig config = new ResourceConfig(TracingResource.class);
    config.register(new LoggingFeature(LOGGER, LoggingFeature.Verbosity.PAYLOAD_ANY));
    final Resource.Builder resourceBuilder = Resource.builder(ROOT_PATH_PROGRAMMATIC);
    resourceBuilder.addMethod(TRACE.NAME).handledBy(new Inflector<ContainerRequestContext, Response>() {

        @Override
        public Response apply(ContainerRequestContext request) {
            if (request == null) {
                return Response.noContent().build();
            } else {
                return Response.ok(stringify((ContainerRequest) request), MediaType.TEXT_PLAIN).build();
            }
        }
    });
    return config.registerResources(resourceBuilder.build());
}
Also used : Response(javax.ws.rs.core.Response) ContainerRequestContext(javax.ws.rs.container.ContainerRequestContext) LoggingFeature(org.glassfish.jersey.logging.LoggingFeature) Resource(org.glassfish.jersey.server.model.Resource) ContainerRequest(org.glassfish.jersey.server.ContainerRequest) ResourceConfig(org.glassfish.jersey.server.ResourceConfig)

Example 29 with LoggingFeature

use of org.glassfish.jersey.logging.LoggingFeature in project jersey by jersey.

the class CookieTest method configure.

@Override
protected Application configure() {
    ResourceConfig config = new ResourceConfig(CookieResource.class);
    config.register(new LoggingFeature(LOGGER, LoggingFeature.Verbosity.PAYLOAD_ANY));
    return config;
}
Also used : LoggingFeature(org.glassfish.jersey.logging.LoggingFeature) ResourceConfig(org.glassfish.jersey.server.ResourceConfig)

Example 30 with LoggingFeature

use of org.glassfish.jersey.logging.LoggingFeature in project jersey by jersey.

the class EntityTest method configure.

@Override
protected Application configure() {
    ResourceConfig config = new ResourceConfig(EntityResource.class, JacksonFeature.class);
    config.register(new LoggingFeature(LOGGER, LoggingFeature.Verbosity.PAYLOAD_ANY));
    return config;
}
Also used : LoggingFeature(org.glassfish.jersey.logging.LoggingFeature) ResourceConfig(org.glassfish.jersey.server.ResourceConfig)

Aggregations

LoggingFeature (org.glassfish.jersey.logging.LoggingFeature)45 ResourceConfig (org.glassfish.jersey.server.ResourceConfig)33 Response (javax.ws.rs.core.Response)6 Client (javax.ws.rs.client.Client)4 WebTarget (javax.ws.rs.client.WebTarget)4 ContainerRequestContext (javax.ws.rs.container.ContainerRequestContext)4 ContainerRequest (org.glassfish.jersey.server.ContainerRequest)4 Resource (org.glassfish.jersey.server.model.Resource)4 ClientConfig (org.glassfish.jersey.client.ClientConfig)2 MultiPartFeature (org.glassfish.jersey.media.multipart.MultiPartFeature)2 Test (org.junit.Test)2 MetricRegistry (com.codahale.metrics.MetricRegistry)1 UserPrincipal (com.sun.security.auth.UserPrincipal)1 InputStream (java.io.InputStream)1 URI (java.net.URI)1 Principal (java.security.Principal)1 HashSet (java.util.HashSet)1 ExecutorService (java.util.concurrent.ExecutorService)1 Logger (java.util.logging.Logger)1 ClientBuilder (javax.ws.rs.client.ClientBuilder)1