org.apache.struts2.impl
Class RequestContextImpl

java.lang.Object
  extended by org.apache.struts2.impl.RequestContextImpl
All Implemented Interfaces:
org.apache.struts2.spi.RequestContext

public class RequestContextImpl
extends Object
implements org.apache.struts2.spi.RequestContext


Field Summary
(package private)  org.apache.struts2.spi.ActionContext actionContext
           
(package private)  Map<String,Object> attributeMap
           
static Callable<String> ILLEGAL_PROCEED
           
(package private)  org.apache.struts2.Messages messages
           
(package private)  Callable<String> proceed
           
(package private) static ThreadLocal<Object[]> threadLocalRequestContext
           
(package private)  org.apache.struts2.spi.ValueStack valueStack
           
(package private)  ActionContext xworkContext
           
 
Constructor Summary
RequestContextImpl(ActionContext xworkContext)
           
 
Method Summary
static String callInContext(ActionInvocation invocation, Callable<String> callable)
          Creates RequestContext if necessary.
 List<Cookie> findCookiesForName(String name)
           
static RequestContextImpl get()
           
 Object getAction()
           
 org.apache.struts2.spi.ActionContext getActionContext()
           
 Map<String,Object> getApplicationMap()
           
 Map<String,Object> getAttributeMap()
           
 Locale getLocale()
           
 org.apache.struts2.Messages getMessages()
           
 Map<String,String[]> getParameterMap()
           
 Callable<String> getProceed()
           
 ServletContext getServletContext()
           
 HttpServletRequest getServletRequest()
           
 HttpServletResponse getServletResponse()
           
 Map<String,Object> getSessionMap()
           
 org.apache.struts2.spi.ValueStack getValueStack()
           
 String proceed()
           
(package private)  void setActionContext(org.apache.struts2.spi.ActionContext actionContext)
           
 void setLocale(Locale locale)
           
 void setProceed(Callable<String> proceed)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xworkContext

ActionContext xworkContext

actionContext

org.apache.struts2.spi.ActionContext actionContext

messages

org.apache.struts2.Messages messages

ILLEGAL_PROCEED

public static final Callable<String> ILLEGAL_PROCEED

attributeMap

Map<String,Object> attributeMap

valueStack

org.apache.struts2.spi.ValueStack valueStack

proceed

Callable<String> proceed

threadLocalRequestContext

static ThreadLocal<Object[]> threadLocalRequestContext
Constructor Detail

RequestContextImpl

public RequestContextImpl(ActionContext xworkContext)
Method Detail

getActionContext

public org.apache.struts2.spi.ActionContext getActionContext()
Specified by:
getActionContext in interface org.apache.struts2.spi.RequestContext

getAction

public Object getAction()
Specified by:
getAction in interface org.apache.struts2.spi.RequestContext

setActionContext

void setActionContext(org.apache.struts2.spi.ActionContext actionContext)

getParameterMap

public Map<String,String[]> getParameterMap()
Specified by:
getParameterMap in interface org.apache.struts2.spi.RequestContext

getAttributeMap

public Map<String,Object> getAttributeMap()
Specified by:
getAttributeMap in interface org.apache.struts2.spi.RequestContext

getSessionMap

public Map<String,Object> getSessionMap()
Specified by:
getSessionMap in interface org.apache.struts2.spi.RequestContext

getApplicationMap

public Map<String,Object> getApplicationMap()
Specified by:
getApplicationMap in interface org.apache.struts2.spi.RequestContext

findCookiesForName

public List<Cookie> findCookiesForName(String name)
Specified by:
findCookiesForName in interface org.apache.struts2.spi.RequestContext

getLocale

public Locale getLocale()
Specified by:
getLocale in interface org.apache.struts2.spi.RequestContext

setLocale

public void setLocale(Locale locale)
Specified by:
setLocale in interface org.apache.struts2.spi.RequestContext

getMessages

public org.apache.struts2.Messages getMessages()
Specified by:
getMessages in interface org.apache.struts2.spi.RequestContext

getServletRequest

public HttpServletRequest getServletRequest()
Specified by:
getServletRequest in interface org.apache.struts2.spi.RequestContext

getServletResponse

public HttpServletResponse getServletResponse()
Specified by:
getServletResponse in interface org.apache.struts2.spi.RequestContext

getServletContext

public ServletContext getServletContext()
Specified by:
getServletContext in interface org.apache.struts2.spi.RequestContext

getValueStack

public org.apache.struts2.spi.ValueStack getValueStack()
Specified by:
getValueStack in interface org.apache.struts2.spi.RequestContext

proceed

public String proceed()
               throws Exception
Specified by:
proceed in interface org.apache.struts2.spi.RequestContext
Throws:
Exception

setProceed

public void setProceed(Callable<String> proceed)

getProceed

public Callable<String> getProceed()

callInContext

public static String callInContext(ActionInvocation invocation,
                                   Callable<String> callable)
                            throws Exception
Creates RequestContext if necessary. Always creates a new ActionContext and restores an existing ActionContext when finished.

Throws:
Exception

get

public static RequestContextImpl get()


Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.