Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jboss.weld.context.beanstore.http;
 
 
 import  javax.servlet.http.HttpServletRequest;
 

A BeanStore that uses a HTTP request as backing storage.

This class is not threadsafe

Author(s):
Nicklas Karlsson
David Allen
Pete Muir
public class RequestBeanStore extends AttributeBeanStore {
    private final HttpServletRequest request;
    public RequestBeanStore(HttpServletRequest requestNamingScheme namingScheme) {
        super(namingScheme);
        this. = request;
    }
    @Override
    protected Object getAttribute(String key) {
        return .getAttribute(key);
    }
    @Override
    protected void removeAttribute(String key) {
        .removeAttribute(key);
    }
    @Override
    protected Collection<StringgetAttributeNames() {
        return new EnumerationList<String>(Reflections.<Enumeration<String>>cast(.getAttributeNames()));
    }
    @Override
    protected void setAttribute(String keyObject instance) {
        .setAttribute(keyinstance);
    }
    public HttpServletRequest getRequest() {
        return ;
    }
    public LockStore getLockStore() {
        return null;
    }
New to GrepCode? Check out our FAQ X