Examples of ContainerRequest


Examples of org.glassfish.jersey.server.ContainerRequest

            this.parameter = parameter;
        }

        @Override
        public Object provide() {
            final ContainerRequest requestContext = getContainerRequest();

            final Class<?> rawType = parameter.getRawType();

            Object value;
            if ((Request.class.isAssignableFrom(rawType) || ContainerRequestContext.class.isAssignableFrom(rawType))
                    && rawType.isInstance(requestContext)) {
                value = requestContext;
            } else {
                value = requestContext.readEntity(rawType, parameter.getType(), parameter.getAnnotations());
                if (rawType.isPrimitive() && value == null) {
                    throw new BadRequestException(Response.status(Response.Status.BAD_REQUEST)
                            .entity(LocalizationMessages.ERROR_PRIMITIVE_TYPE_NULL()).build());
                }
            }
View Full Code Here

Examples of org.glassfish.jersey.server.ContainerRequest

    }

    @Override
    @SuppressWarnings("unchecked")
    public ContainerResponse apply(final RequestProcessingContext processingContext) {
        final ContainerRequest request = processingContext.request();
        final Object resource = processingContext.routingContext().peekMatchedResource();

        if (method.isSuspendDeclared() || method.isManagedAsyncDeclared()) {
            if (!processingContext.asyncContext().suspend()) {
                throw new ProcessingException(LocalizationMessages.ERROR_SUSPENDING_ASYNC_REQUEST());
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.