Package org.glassfish.jersey.server

Examples of org.glassfish.jersey.server.ResourceConfig$State


    public static void main(String[] args) {
        try {
            System.out.println("\"Server-Sent Events\" Jersey Example App");

            final ResourceConfig resourceConfig = new ResourceConfig(ServerSentEventsResource.class, SseFeature.class);

            final HttpServer server = GrizzlyHttpServerFactory.createHttpServer(BASE_URI, resourceConfig);

            System.out.println(String.format("Application started.\nTry out %s%s\nHit enter to stop it...",
                    BASE_URI, ROOT_PATH));
View Full Code Here


    private org.vertx.java.platform.Container vertxContainer;
    private ApplicationHandler applicationHandler;
    private ContainerLifecycleListener containerListener;

    public Jersey() {
        resourceConfig = new ResourceConfig();
    }
View Full Code Here

    @Override
    protected Application configure() {
        enable(TestProperties.LOG_TRAFFIC);
        enable(TestProperties.DUMP_ENTITY);

        return new ResourceConfig().
                registerClasses(getResourceClasses()).
                registerClasses(MultiPartBeanProvider.class).
                registerInstances(new LoggingFilter(LOGGER, true)).
                register(new MultiPartFeature());
    }
View Full Code Here

*/
public class MultipartMixedWithApacheClientTest extends JerseyTest {

    @Override
    protected Application configure() {
        return new ResourceConfig(ProducesFormDataUsingMultiPart.class);
    }
View Full Code Here

*/
public class AuthTest extends JerseyTest {

    @Override
    protected Application configure() {
        return new ResourceConfig(PreemptiveAuthResource.class, AuthResource.class);
    }
View Full Code Here

        }
    }

    @Override
    protected Application configure() {
        ResourceConfig config = new ResourceConfig(TimeoutResource.class);
        config.register(new LoggingFilter(LOGGER, true));
        return config;
    }
View Full Code Here

        }
    }

    @Override
    protected Application configure() {
        ResourceConfig config = new ResourceConfig(PublicResource.class, InternalResource.class, CustomHeaderFeature.class)
                .property(ClientA.class.getName() + ".baseUri", this.getBaseUri().toString() + "internal");
        config.register(new LoggingFilter(LOGGER, true));
        return config;
    }
View Full Code Here

        super(new InMemoryTestContainerFactory());
    }

    @Override
    protected ResourceConfig configure() {
        ResourceConfig rc = new ResourceConfig();
        rc.packages(this.getClass().getPackage().getName());
        return rc;
    }
View Full Code Here

        }
    }

    @Override
    protected Application configure() {
        ResourceConfig config = new ResourceConfig(TracingResource.class);
        config.register(new LoggingFilter(LOGGER, true));
        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());

    }
View Full Code Here

        }
    }

    @Override
    protected Application configure() {
        ResourceConfig config = new ResourceConfig(HttpMethodResource.class);
        config.register(new LoggingFilter(LOGGER, true));
        return config;
    }
View Full Code Here

TOP

Related Classes of org.glassfish.jersey.server.ResourceConfig$State

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.