Package ortus.boxlang.web.exchange
Class BoxHTTPServletExchange
java.lang.Object
ortus.boxlang.web.exchange.BoxHTTPServletExchange
- All Implemented Interfaces:
ortus.boxlang.web.exchange.IBoxHTTPExchange
public class BoxHTTPServletExchange
extends Object
implements ortus.boxlang.web.exchange.IBoxHTTPExchange
I implement a BoxLang HTTP exchange for a Servlet
-
Nested Class Summary
Nested classes/interfaces inherited from interface ortus.boxlang.web.exchange.IBoxHTTPExchange
ortus.boxlang.web.exchange.IBoxHTTPExchange.FileUpload -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ortus.boxlang.web.context.WebRequestBoxContextThe BoxLang context for this requestprotected javax.servlet.http.HttpServletRequestThe servlet requestprotected javax.servlet.http.HttpServletResponseThe servlet responseprotected javax.servlet.ServletContextThe servlet context -
Constructor Summary
ConstructorsConstructorDescriptionBoxHTTPServletExchange(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Create a new BoxLang HTTP exchange for a Servlet -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResponseCookie(ortus.boxlang.web.exchange.BoxCookie cookie) voidaddResponseHeader(String name, String value) voidvoidgetRequestAttribute(String name) longortus.boxlang.web.exchange.BoxCookiegetRequestCookie(String name) ortus.boxlang.web.exchange.BoxCookie[]getRequestHeader(String name) intintintgetResponseHeader(String name) intortus.boxlang.web.exchange.IBoxHTTPExchange.FileUpload[]ortus.boxlang.web.context.WebRequestBoxContextbooleanbooleanvoidremoveRequestAttribute(String name) voidvoidsendResponseBinary(byte[] data) voidsendResponseFile(File file) voidsetRequestAttribute(String name, Object value) voidsetResponseHeader(String name, String value) voidsetResponseStatus(int sc) voidsetResponseStatus(int sc, String sm) voidsetWebContext(ortus.boxlang.web.context.WebRequestBoxContext boxContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ortus.boxlang.web.exchange.IBoxHTTPExchange
isTextBasedContentType
-
Field Details
-
servletContext
protected javax.servlet.ServletContext servletContextThe servlet context -
request
protected javax.servlet.http.HttpServletRequest requestThe servlet request -
response
protected javax.servlet.http.HttpServletResponse responseThe servlet response -
boxContext
protected ortus.boxlang.web.context.WebRequestBoxContext boxContextThe BoxLang context for this request
-
-
Constructor Details
-
BoxHTTPServletExchange
public BoxHTTPServletExchange(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Create a new BoxLang HTTP exchange for a Servlet- Parameters:
request- The servlet requestresponse- The servlet response
-
-
Method Details
-
setWebContext
public void setWebContext(ortus.boxlang.web.context.WebRequestBoxContext boxContext) - Specified by:
setWebContextin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getWebContext
public ortus.boxlang.web.context.WebRequestBoxContext getWebContext()- Specified by:
getWebContextin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
forward
- Specified by:
forwardin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
addResponseCookie
public void addResponseCookie(ortus.boxlang.web.exchange.BoxCookie cookie) - Specified by:
addResponseCookiein interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
addResponseHeader
- Specified by:
addResponseHeaderin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
flushResponseBuffer
public void flushResponseBuffer()- Specified by:
flushResponseBufferin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestAttribute
- Specified by:
getRequestAttributein interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestAttributeMap
- Specified by:
getRequestAttributeMapin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestAuthType
- Specified by:
getRequestAuthTypein interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestCharacterEncoding
- Specified by:
getRequestCharacterEncodingin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestContentLength
public long getRequestContentLength()- Specified by:
getRequestContentLengthin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestContentType
- Specified by:
getRequestContentTypein interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestContextPath
- Specified by:
getRequestContextPathin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestCookies
public ortus.boxlang.web.exchange.BoxCookie[] getRequestCookies()- Specified by:
getRequestCookiesin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestHeaderMap
- Specified by:
getRequestHeaderMapin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestHeader
- Specified by:
getRequestHeaderin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestLocalAddr
- Specified by:
getRequestLocalAddrin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestLocalName
- Specified by:
getRequestLocalNamein interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestLocalPort
public int getRequestLocalPort()- Specified by:
getRequestLocalPortin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestLocale
- Specified by:
getRequestLocalein interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestLocales
- Specified by:
getRequestLocalesin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestMethod
- Specified by:
getRequestMethodin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestURLMap
- Specified by:
getRequestURLMapin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestFormMap
- Specified by:
getRequestFormMapin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getCharacterEncodingOrDefault
-
getUploadData
public ortus.boxlang.web.exchange.IBoxHTTPExchange.FileUpload[] getUploadData()- Specified by:
getUploadDatain interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestPathInfo
- Specified by:
getRequestPathInfoin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestPathTranslated
- Specified by:
getRequestPathTranslatedin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestProtocol
- Specified by:
getRequestProtocolin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestQueryString
- Specified by:
getRequestQueryStringin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestBody
- Specified by:
getRequestBodyin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestRemoteAddr
- Specified by:
getRequestRemoteAddrin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestRemoteHost
- Specified by:
getRequestRemoteHostin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestRemotePort
public int getRequestRemotePort()- Specified by:
getRequestRemotePortin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestRemoteUser
- Specified by:
getRequestRemoteUserin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestScheme
- Specified by:
getRequestSchemein interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestServerName
- Specified by:
getRequestServerNamein interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestServerPort
public int getRequestServerPort()- Specified by:
getRequestServerPortin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestURI
- Specified by:
getRequestURIin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestURL
- Specified by:
getRequestURLin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestUserPrincipal
- Specified by:
getRequestUserPrincipalin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getResponseHeader
- Specified by:
getResponseHeaderin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getResponseHeaderMap
- Specified by:
getResponseHeaderMapin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getResponseStatus
public int getResponseStatus()- Specified by:
getResponseStatusin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getResponseWriter
- Specified by:
getResponseWriterin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
sendResponseBinary
public void sendResponseBinary(byte[] data) - Specified by:
sendResponseBinaryin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
sendResponseFile
- Specified by:
sendResponseFilein interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
isRequestSecure
public boolean isRequestSecure()- Specified by:
isRequestSecurein interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
removeRequestAttribute
- Specified by:
removeRequestAttributein interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
resetResponseBuffer
public void resetResponseBuffer()- Specified by:
resetResponseBufferin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
setRequestAttribute
- Specified by:
setRequestAttributein interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
setResponseHeader
- Specified by:
setResponseHeaderin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
setResponseStatus
public void setResponseStatus(int sc) - Specified by:
setResponseStatusin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
setResponseStatus
- Specified by:
setResponseStatusin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
getRequestCookie
- Specified by:
getRequestCookiein interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-
isResponseStarted
public boolean isResponseStarted()- Specified by:
isResponseStartedin interfaceortus.boxlang.web.exchange.IBoxHTTPExchange
-