Class BoxHTTPUndertowExchange

java.lang.Object
ortus.boxlang.web.exchange.BoxHTTPUndertowExchange
All Implemented Interfaces:
ortus.boxlang.web.exchange.IBoxHTTPExchange

public class BoxHTTPUndertowExchange extends Object implements ortus.boxlang.web.exchange.IBoxHTTPExchange
I implement a BoxLang HTTP exchange for Undertow
  • Field Details

    • channel

      protected org.xnio.channels.StreamSinkChannel channel
      Undertow response channel
    • exchange

      protected io.undertow.server.HttpServerExchange exchange
      The Undertow exchange for this request
    • context

      protected ortus.boxlang.web.context.WebRequestBoxContext context
      The BoxLang context for this request
  • Constructor Details

    • BoxHTTPUndertowExchange

      public BoxHTTPUndertowExchange(io.undertow.server.HttpServerExchange exchange)
      Create a new BoxLang HTTP exchange for Undertow
      Parameters:
      exchange - The Undertow exchange for this request
  • Method Details

    • getResponseChannel

      public org.xnio.channels.StreamSinkChannel getResponseChannel()
      Get the response channel for this exchange
      Returns:
      The response channel
    • getExchange

      public io.undertow.server.HttpServerExchange getExchange()
      Get the Undertow exchange for this request
      Returns:
      The Undertow exchange
    • setWebContext

      public void setWebContext(ortus.boxlang.web.context.WebRequestBoxContext context)
      Specified by:
      setWebContext in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getWebContext

      public ortus.boxlang.web.context.WebRequestBoxContext getWebContext()
      Specified by:
      getWebContext in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • forward

      public void forward(String URI)
      Specified by:
      forward in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • addResponseCookie

      public void addResponseCookie(ortus.boxlang.web.exchange.BoxCookie cookie)
      Specified by:
      addResponseCookie in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • addResponseHeader

      public void addResponseHeader(String name, String value)
      Specified by:
      addResponseHeader in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • flushResponseBuffer

      public void flushResponseBuffer()
      Specified by:
      flushResponseBuffer in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestAttribute

      public Object getRequestAttribute(String name)
      Specified by:
      getRequestAttribute in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestAttributeMap

      public Map<String,Object> getRequestAttributeMap()
      Specified by:
      getRequestAttributeMap in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestAuthType

      public String getRequestAuthType()
      Specified by:
      getRequestAuthType in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestCharacterEncoding

      public String getRequestCharacterEncoding()
      Specified by:
      getRequestCharacterEncoding in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestContentLength

      public long getRequestContentLength()
      Specified by:
      getRequestContentLength in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestContentType

      public String getRequestContentType()
      Specified by:
      getRequestContentType in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestContextPath

      public String getRequestContextPath()
      Specified by:
      getRequestContextPath in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestCookies

      public ortus.boxlang.web.exchange.BoxCookie[] getRequestCookies()
      Specified by:
      getRequestCookies in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestHeaderMap

      public Map<String,String[]> getRequestHeaderMap()
      Specified by:
      getRequestHeaderMap in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestHeader

      public String getRequestHeader(String name)
      Specified by:
      getRequestHeader in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestHeader

      public String getRequestHeader(io.undertow.util.HttpString name)
    • getRequestLocalAddr

      public String getRequestLocalAddr()
      Specified by:
      getRequestLocalAddr in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestLocalName

      public String getRequestLocalName()
      Specified by:
      getRequestLocalName in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestLocalPort

      public int getRequestLocalPort()
      Specified by:
      getRequestLocalPort in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestLocale

      public Locale getRequestLocale()
      Specified by:
      getRequestLocale in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestLocales

      public Enumeration<Locale> getRequestLocales()
      Specified by:
      getRequestLocales in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestMethod

      public String getRequestMethod()
      Specified by:
      getRequestMethod in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestURLMap

      public Map<String,String[]> getRequestURLMap()
      Specified by:
      getRequestURLMap in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestFormMap

      public Map<String,String[]> getRequestFormMap()
      Specified by:
      getRequestFormMap in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getUploadData

      public ortus.boxlang.web.exchange.IBoxHTTPExchange.FileUpload[] getUploadData()
      Specified by:
      getUploadData in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestPathInfo

      public String getRequestPathInfo()
      Specified by:
      getRequestPathInfo in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestPathTranslated

      public String getRequestPathTranslated()
      Specified by:
      getRequestPathTranslated in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestProtocol

      public String getRequestProtocol()
      Specified by:
      getRequestProtocol in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestQueryString

      public String getRequestQueryString()
      Specified by:
      getRequestQueryString in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestBody

      public Object getRequestBody()
      Specified by:
      getRequestBody in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestRemoteAddr

      public String getRequestRemoteAddr()
      Specified by:
      getRequestRemoteAddr in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestRemoteHost

      public String getRequestRemoteHost()
      Specified by:
      getRequestRemoteHost in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestRemotePort

      public int getRequestRemotePort()
      Specified by:
      getRequestRemotePort in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestRemoteUser

      public String getRequestRemoteUser()
      Specified by:
      getRequestRemoteUser in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestScheme

      public String getRequestScheme()
      Specified by:
      getRequestScheme in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestServerName

      public String getRequestServerName()
      Specified by:
      getRequestServerName in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestServerPort

      public int getRequestServerPort()
      Specified by:
      getRequestServerPort in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestURI

      public String getRequestURI()
      Specified by:
      getRequestURI in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestURL

      public StringBuffer getRequestURL()
      Specified by:
      getRequestURL in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestUserPrincipal

      public Principal getRequestUserPrincipal()
      Specified by:
      getRequestUserPrincipal in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getResponseHeader

      public String getResponseHeader(String name)
      Specified by:
      getResponseHeader in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getResponseHeaderMap

      public Map<String,String[]> getResponseHeaderMap()
      Specified by:
      getResponseHeaderMap in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getResponseStatus

      public int getResponseStatus()
      Specified by:
      getResponseStatus in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getResponseWriter

      public PrintWriter getResponseWriter()
      Specified by:
      getResponseWriter in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • sendResponseBinary

      public void sendResponseBinary(byte[] data)
      Specified by:
      sendResponseBinary in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • sendResponseFile

      public void sendResponseFile(File file)
      Specified by:
      sendResponseFile in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • isRequestSecure

      public boolean isRequestSecure()
      Specified by:
      isRequestSecure in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • removeRequestAttribute

      public void removeRequestAttribute(String name)
      Specified by:
      removeRequestAttribute in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • resetResponseBuffer

      public void resetResponseBuffer()
      Specified by:
      resetResponseBuffer in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • setRequestAttribute

      public void setRequestAttribute(String name, Object value)
      Specified by:
      setRequestAttribute in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • setResponseHeader

      public void setResponseHeader(String name, String value)
      Specified by:
      setResponseHeader in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • setResponseStatus

      public void setResponseStatus(int sc)
      Specified by:
      setResponseStatus in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • setResponseStatus

      public void setResponseStatus(int sc, String sm)
      Specified by:
      setResponseStatus in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • getRequestCookie

      public ortus.boxlang.web.exchange.BoxCookie getRequestCookie(String name)
      Specified by:
      getRequestCookie in interface ortus.boxlang.web.exchange.IBoxHTTPExchange
    • isResponseStarted

      public boolean isResponseStarted()
      Specified by:
      isResponseStarted in interface ortus.boxlang.web.exchange.IBoxHTTPExchange