org.apache.tapestry5.services
Class DelegatingRequest

java.lang.Object
  extended by org.apache.tapestry5.services.DelegatingRequest
All Implemented Interfaces:
org.apache.tapestry5.services.Request
Direct Known Subclasses:
SimpleRequestWrapper

public class DelegatingRequest
extends Object
implements org.apache.tapestry5.services.Request

Class that wraps an Request, delegating all its methods.

Since:
5.1.0.1

Constructor Summary
DelegatingRequest()
          No-arg constructor.
DelegatingRequest(org.apache.tapestry5.services.Request request)
          Constructor that receives a Request.
 
Method Summary
 Object getAttribute(String name)
           
 String getContextPath()
           
 long getDateHeader(String name)
           
 String getHeader(String name)
           
 List<String> getHeaderNames()
           
 Locale getLocale()
           
 int getLocalPort()
           
 String getMethod()
           
 String getParameter(String name)
           
 List<String> getParameterNames()
           
 String[] getParameters(String name)
           
 String getPath()
           
 String getRemoteHost()
           
 String getServerName()
           
 int getServerPort()
           
 org.apache.tapestry5.services.Session getSession(boolean create)
           
 boolean isRequestedSessionIdValid()
           
 boolean isSecure()
           
 boolean isXHR()
           
 void setAttribute(String name, Object value)
           
 void setRequest(org.apache.tapestry5.services.Request request)
          Sets the delegate request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingRequest

public DelegatingRequest()
No-arg constructor. It should only be used for testing purposes.


DelegatingRequest

public DelegatingRequest(org.apache.tapestry5.services.Request request)
Constructor that receives a Request.

Parameters:
request - a Request. It cannot be null.
Method Detail

setRequest

public void setRequest(org.apache.tapestry5.services.Request request)
Sets the delegate request.

Parameters:
request - a Request. It cannot be null.

getSession

public org.apache.tapestry5.services.Session getSession(boolean create)
Specified by:
getSession in interface org.apache.tapestry5.services.Request
Parameters:
create -
Returns:
See Also:
Request.getSession(boolean)

getContextPath

public String getContextPath()
Specified by:
getContextPath in interface org.apache.tapestry5.services.Request
Returns:
See Also:
Request.getContextPath()

getParameterNames

public List<String> getParameterNames()
Specified by:
getParameterNames in interface org.apache.tapestry5.services.Request
Returns:
See Also:
Request.getParameterNames()

getParameter

public String getParameter(String name)
Specified by:
getParameter in interface org.apache.tapestry5.services.Request
Parameters:
name -
Returns:
See Also:
Request.getParameter(java.lang.String)

getParameters

public String[] getParameters(String name)
Specified by:
getParameters in interface org.apache.tapestry5.services.Request
Parameters:
name -
Returns:
See Also:
Request.getParameters(java.lang.String)

getPath

public String getPath()
Specified by:
getPath in interface org.apache.tapestry5.services.Request
Returns:
See Also:
Request.getPath()

getLocale

public Locale getLocale()
Specified by:
getLocale in interface org.apache.tapestry5.services.Request
Returns:
See Also:
Request.getLocale()

getHeaderNames

public List<String> getHeaderNames()
Specified by:
getHeaderNames in interface org.apache.tapestry5.services.Request
Returns:
See Also:
Request.getHeaderNames()

getDateHeader

public long getDateHeader(String name)
Specified by:
getDateHeader in interface org.apache.tapestry5.services.Request
Parameters:
name -
Returns:
See Also:
Request.getDateHeader(java.lang.String)

getHeader

public String getHeader(String name)
Specified by:
getHeader in interface org.apache.tapestry5.services.Request
Parameters:
name -
Returns:
See Also:
Request.getHeader(java.lang.String)

isXHR

public boolean isXHR()
Specified by:
isXHR in interface org.apache.tapestry5.services.Request
Returns:
See Also:
Request.isXHR()

isSecure

public boolean isSecure()
Specified by:
isSecure in interface org.apache.tapestry5.services.Request
Returns:
See Also:
Request.isSecure()

getServerName

public String getServerName()
Specified by:
getServerName in interface org.apache.tapestry5.services.Request
Returns:
See Also:
Request.getServerName()

isRequestedSessionIdValid

public boolean isRequestedSessionIdValid()
Specified by:
isRequestedSessionIdValid in interface org.apache.tapestry5.services.Request
Returns:
See Also:
Request.isRequestedSessionIdValid()

getAttribute

public Object getAttribute(String name)
Specified by:
getAttribute in interface org.apache.tapestry5.services.Request
Parameters:
name -
Returns:
See Also:
Request.getAttribute(java.lang.String)

setAttribute

public void setAttribute(String name,
                         Object value)
Specified by:
setAttribute in interface org.apache.tapestry5.services.Request
Parameters:
name -
value -
See Also:
Request.setAttribute(java.lang.String, java.lang.Object)

getMethod

public String getMethod()
Specified by:
getMethod in interface org.apache.tapestry5.services.Request
Returns:
See Also:
Request.getMethod()

getLocalPort

public int getLocalPort()
Specified by:
getLocalPort in interface org.apache.tapestry5.services.Request
Returns:
See Also:
Request.getLocalPort()

getServerPort

public int getServerPort()
Specified by:
getServerPort in interface org.apache.tapestry5.services.Request
Returns:
See Also:
Request.getServerPort()

getRemoteHost

public String getRemoteHost()
Specified by:
getRemoteHost in interface org.apache.tapestry5.services.Request
Returns:
See Also:
Request.getRemoteHost()


Copyright © 2012. All Rights Reserved.