All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ameba.container.grizzly.server.http.GrizzlyRequestPropertiesDelegate Maven / Gradle / Ivy

There is a newer version: 0.1.12
Show newest version
package ameba.container.grizzly.server.http;

import org.glassfish.grizzly.http.server.Request;
import org.glassfish.jersey.internal.PropertiesDelegate;

import java.util.Collection;

/**
 * @author icode
 * @since 14-12-11
 */
class GrizzlyRequestPropertiesDelegate implements PropertiesDelegate {
    private final Request request;

    /**
     * Create new Grizzly container properties delegate instance.
     *
     * @param request grizzly HTTP request.
     */
    GrizzlyRequestPropertiesDelegate(Request request) {
        this.request = request;
    }

    @Override
    public Object getProperty(String name) {
        return request.getAttribute(name);
    }

    @Override
    public Collection getPropertyNames() {
        return request.getAttributeNames();
    }

    @Override
    public void setProperty(String name, Object value) {
        request.setAttribute(name, value);
    }

    @Override
    public void removeProperty(String name) {
        request.removeAttribute(name);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy