public class RequestContextImpl extends Object implements IRequestContext, IAttributeContainer
| Constructor and Description |
|---|
RequestContextImpl(IRequestResponse rr,
DomApplication app,
AppSession ses) |
| Modifier and Type | Method and Description |
|---|---|
void |
discard() |
void |
flush() |
DomApplication |
getApplication()
Return the DomApplication instance.
|
Object |
getAttribute(String name) |
BrowserVersion |
getBrowserVersion() |
String |
getExtension()
Return the name extension of the input URL without it's "." character.
|
UploadItem[] |
getFileParameter(String name) |
String[] |
getFileParameters()
Returns the names of all file parameters.
|
String |
getInputPath()
Return the input path relative to the webapp's root.
|
Writer |
getOutputWriter(String contentType,
String encoding)
This returns a fully buffered output writer.
|
String |
getParameter(String name) |
String[] |
getParameterNames() |
String[] |
getParameters(String name) |
String |
getRelativePath(String rel)
Creates a full path from an application-relative path.
|
IRequestResponse |
getRequestResponse() |
IServerSession |
getServerSession(boolean create) |
AppSession |
getSession()
Get the session for this context.
|
String |
getUserAgent()
Returns the value of the "User-Agent" header to determine the browser type.
|
WindowSession |
getWindowSession()
Gets this request's conversation.
|
void |
internalOnRequestFinished()
Called for all requests that have used a RequestContextImpl.
|
void |
internalSetWindowSession(WindowSession cm)
QUESTIONABLE.
|
void |
redirect(String newUrl)
Send a redirect response to the client.
|
void |
sendError(int httpErrorCode,
String message)
Send an error back to the client.
|
void |
setAttribute(String name,
Object value) |
public RequestContextImpl(@Nonnull IRequestResponse rr, @Nonnull DomApplication app, @Nonnull AppSession ses)
@Nonnull public final DomApplication getApplication()
IRequestContextgetApplication in interface IRequestContextIRequestContext.getApplication()@Nonnull public final AppSession getSession()
getSession in interface IRequestContextIRequestContext.getSession()@Nonnull public IRequestResponse getRequestResponse()
getRequestResponse in interface IRequestContextpublic final void internalSetWindowSession(WindowSession cm)
cm - @Nonnull public final WindowSession getWindowSession()
getWindowSession in interface IRequestContextIRequestContext.getWindowSession()public void internalOnRequestFinished()
@Nonnull public String getExtension()
IRequestContextgetExtension in interface IRequestContextIRequestContext.getExtension()@Nonnull public final String getInputPath()
IRequestContextgetInputPath in interface IRequestContextIRequestContext.getInputPath()public String getUserAgent()
IRequestContextgetUserAgent in interface IRequestContextIRequestContext.getUserAgent()public BrowserVersion getBrowserVersion()
getBrowserVersion in interface IExtendedParameterInfopublic void discard()
throws IOException
IOException@Nonnull public String getRelativePath(@Nonnull String rel)
IRequestContextgetRelativePath in interface IRequestContextIRequestContext.getRelativePath(java.lang.String)@Nonnull public Writer getOutputWriter(@Nonnull String contentType, @Nullable String encoding) throws IOException
getOutputWriter in interface IRequestContextIOExceptionpublic void redirect(@Nonnull String newUrl) throws Exception
newUrl - Exceptionpublic void sendError(int httpErrorCode,
@Nonnull
String message)
throws Exception
httpErrorCode - message - Exception@Nullable public IServerSession getServerSession(boolean create)
getServerSession in interface IRequestContext@Nullable public String getParameter(@Nonnull String name)
getParameter in interface IParameterInfoIParameterInfo.getParameter(java.lang.String)@Nonnull public String[] getParameters(@Nonnull String name)
getParameters in interface IParameterInfoIParameterInfo.getParameters(java.lang.String)@Nonnull public String[] getParameterNames()
getParameterNames in interface IParameterInfoIParameterInfo.getParameterNames()public String[] getFileParameters() throws Exception
Exceptionpublic UploadItem[] getFileParameter(@Nonnull String name) throws Exception
Exceptionpublic Object getAttribute(@Nonnull String name)
getAttribute in interface IAttributeContainerIAttributeContainer.getAttribute(java.lang.String)public void setAttribute(@Nonnull String name, @Nullable Object value)
setAttribute in interface IAttributeContainerCopyright © 2017 etc.to. All rights reserved.