Package org.glassfish.jersey.server

Examples of org.glassfish.jersey.server.ResourceConfig


    public static void main(String[] args) {
        try {
            System.out.println("\"Exception Mapping\" Jersey Example App");

            final ResourceConfig resourceConfig = new ResourceConfig(ExceptionResource.class);
            final HttpServer server = GrizzlyHttpServerFactory.createHttpServer(BASE_URI, resourceConfig);

            System.out.println(String.format(
                    "Application started.%n"
                    + "Try out %s%s%n"
View Full Code Here


    public ResourceConfig getResourceConfig(Set<Class<?>> classes,
                                            final ServerContext sc,
                                            final ServiceLocator serviceLocator,
                                            final Set<? extends Binder> additionalBinders)
            throws EndpointRegistrationException {
        ResourceConfig rc = super.getResourceConfig(classes, sc, serviceLocator, additionalBinders);
        registerExtendedWadlConfig(classes, rc, serviceLocator);
        rc.register(ExceptionFilter.class);
        rc.property(ServerProperties.RESOURCE_LOCATOR_VALIDATION_DISABLE, Boolean.TRUE);
        return rc;
    }
View Full Code Here

    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

TOP

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

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.