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

com.vtence.molecule.util.RequestWrapper Maven / Gradle / Ivy

package com.vtence.molecule.util;

import com.vtence.molecule.HttpMethod;
import com.vtence.molecule.Request;
import com.vtence.molecule.Session;

import java.util.Map;

public class RequestWrapper implements Request {
    protected final Request request;

    public RequestWrapper(Request request) {
        this.request = request;
    }

    public String protocol() {
        return request.protocol();
    }

    public HttpMethod method() {
        return request.method();
    }

    public String uri() {
        return request.uri();
    }

    public String pathInfo() {
        return request.pathInfo();
    }

    public String parameter(String name) {
        return request.parameter(name);
    }

    public  T unwrap(Class type) {
        return request.unwrap(type);
    }

    public String ip() {
        return request.ip();
    }

    public Object attribute(Object key) {
        return request.attribute(key);
    }

    public void attribute(Object key, Object value) {
        request.attribute(key, value);
    }

    public void removeAttribute(Object key) {
        request.removeAttribute(key);
    }

    public Map attributes() {
        return request.attributes();
    }

    public Session session() {
        return request.session();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy