Class ServletRequestContext
- java.lang.Object
-
- org.symphonyoss.s2.canon.runtime.http.AbstractRequestContext
-
- org.symphonyoss.s2.canon.runtime.http.ServletRequestContext
-
- All Implemented Interfaces:
IAsyncRequestContext,IRequestContext
public class ServletRequestContext extends AbstractRequestContext implements IAsyncRequestContext
-
-
Field Summary
-
Fields inherited from interface org.symphonyoss.s2.canon.runtime.http.IRequestContext
FORM_CONTENT_TYPE, JSON_CONTENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description ServletRequestContext(HttpMethod method, org.symphonyoss.s2.fugue.core.trace.ITraceContext trace, IModelRegistry modelRegistry, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetCookie(String name)protected StringgetHeader(String name)javax.servlet.ServletInputStreamgetInputStream()javax.servlet.ServletOutputStreamgetOutputStream()protected StringgetParameter(String name)StringgetPathInfo()BufferedReadergetReader()PrintWritergetWriter()voidsendError(int sc, String msg)voidsetContentType(String type)voidsetStatus(int sc)javax.servlet.AsyncContextstartAsync()-
Methods inherited from class org.symphonyoss.s2.canon.runtime.http.AbstractRequestContext
asBoolean, asImmutableByteArray, asInteger, asLong, asString, error, error, error, getMethod, getParameterAsBoolean, getParameterAsImmutableByteArray, getParameterAsInteger, getParameterAsLong, getParameterAsString, getTrace, parseListPayload, parseListPayload, parsePayload, parsePayload, parsePayload, preConditionsAreMet, sendErrorResponse, sendOKResponse, sendOKResponse, sendOKResponse
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.symphonyoss.s2.canon.runtime.http.IRequestContext
asBoolean, asImmutableByteArray, asInteger, asLong, asString, error, error, error, getMethod, getParameterAsBoolean, getParameterAsImmutableByteArray, getParameterAsInteger, getParameterAsLong, getParameterAsString, getTrace, parseListPayload, parseListPayload, parsePayload, parsePayload, parsePayload, preConditionsAreMet, sendErrorResponse, sendOKResponse, sendOKResponse, sendOKResponse
-
-
-
-
Constructor Detail
-
ServletRequestContext
public ServletRequestContext(HttpMethod method, org.symphonyoss.s2.fugue.core.trace.ITraceContext trace, IModelRegistry modelRegistry, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
-
Method Detail
-
getCookie
protected String getCookie(String name)
- Specified by:
getCookiein classAbstractRequestContext
-
getHeader
protected String getHeader(String name)
- Specified by:
getHeaderin classAbstractRequestContext
-
getPathInfo
public String getPathInfo()
- Specified by:
getPathInfoin interfaceIRequestContext
-
getParameter
protected String getParameter(String name)
- Specified by:
getParameterin classAbstractRequestContext
-
getReader
public BufferedReader getReader() throws IOException
- Specified by:
getReaderin interfaceIRequestContext- Throws:
IOException
-
getWriter
public PrintWriter getWriter() throws IOException
- Specified by:
getWriterin interfaceIRequestContext- Throws:
IOException
-
setContentType
public void setContentType(String type)
- Specified by:
setContentTypein interfaceIRequestContext
-
setStatus
public void setStatus(int sc)
- Specified by:
setStatusin interfaceIRequestContext
-
sendError
public void sendError(int sc, String msg) throws IOException- Specified by:
sendErrorin interfaceIRequestContext- Throws:
IOException
-
getInputStream
public javax.servlet.ServletInputStream getInputStream() throws IOException- Specified by:
getInputStreamin interfaceIAsyncRequestContext- Throws:
IOException
-
getOutputStream
public javax.servlet.ServletOutputStream getOutputStream() throws IOException- Specified by:
getOutputStreamin interfaceIAsyncRequestContext- Throws:
IOException
-
startAsync
public javax.servlet.AsyncContext startAsync()
- Specified by:
startAsyncin interfaceIAsyncRequestContext
-
-