Class GyHttpContext

java.lang.Object
org.noear.solon.core.handle.Context
org.noear.solon.server.handle.ContextBase
org.noear.solon.server.grizzly.http.GyHttpContext

public class GyHttpContext extends ContextBase
Since:
3.6
Author:
noear
  • Field Details

  • Constructor Details

    • GyHttpContext

      public GyHttpContext(org.glassfish.grizzly.http.server.Request request, org.glassfish.grizzly.http.server.Response response)
  • Method Details

    • innerGetRequest

      protected org.glassfish.grizzly.http.server.Request innerGetRequest()
    • innerGetResponse

      protected org.glassfish.grizzly.http.server.Response innerGetResponse()
    • isHeadersSent

      public boolean isHeadersSent()
      Specified by:
      isHeadersSent in class org.noear.solon.core.handle.Context
    • request

      public Object request()
      Specified by:
      request in class org.noear.solon.core.handle.Context
    • remoteIp

      public String remoteIp()
      Specified by:
      remoteIp in class org.noear.solon.core.handle.Context
    • remotePort

      public int remotePort()
      Specified by:
      remotePort in class org.noear.solon.core.handle.Context
    • method

      public String method()
      Specified by:
      method in class org.noear.solon.core.handle.Context
    • protocol

      public String protocol()
      Specified by:
      protocol in class org.noear.solon.core.handle.Context
    • uri

      public URI uri()
      Specified by:
      uri in class org.noear.solon.core.handle.Context
    • isSecure

      public boolean isSecure()
      Specified by:
      isSecure in class org.noear.solon.core.handle.Context
    • url

      public String url()
      Specified by:
      url in class org.noear.solon.core.handle.Context
    • contentLength

      public long contentLength()
      Specified by:
      contentLength in class org.noear.solon.core.handle.Context
    • queryString

      public String queryString()
      Specified by:
      queryString in class org.noear.solon.core.handle.Context
    • body

      public String body(String charset) throws IOException
      Overrides:
      body in class org.noear.solon.core.handle.Context
      Throws:
      IOException
    • bodyAsStream

      public InputStream bodyAsStream() throws IOException
      Specified by:
      bodyAsStream in class org.noear.solon.core.handle.Context
      Throws:
      IOException
    • paramMap

      public org.noear.solon.core.util.MultiMap<String> paramMap()
      Specified by:
      paramMap in class org.noear.solon.core.handle.Context
    • fileMap

      public org.noear.solon.core.util.MultiMap<org.noear.solon.core.handle.UploadedFile> fileMap()
      Specified by:
      fileMap in class org.noear.solon.core.handle.Context
    • cookieMap

      public org.noear.solon.core.util.MultiMap<String> cookieMap()
      Specified by:
      cookieMap in class org.noear.solon.core.handle.Context
    • headerMap

      public org.noear.solon.core.util.MultiMap<String> headerMap()
      Specified by:
      headerMap in class org.noear.solon.core.handle.Context
    • response

      public Object response()
      Specified by:
      response in class org.noear.solon.core.handle.Context
    • contentTypeDoSet

      protected void contentTypeDoSet(String contentType)
      Specified by:
      contentTypeDoSet in class org.noear.solon.core.handle.Context
    • outputStream

      public OutputStream outputStream() throws IOException
      Specified by:
      outputStream in class org.noear.solon.core.handle.Context
      Throws:
      IOException
    • output

      public void output(byte[] bytes)
      Specified by:
      output in class org.noear.solon.core.handle.Context
    • output

      public void output(InputStream stream)
      Specified by:
      output in class org.noear.solon.core.handle.Context
    • headerSet

      public void headerSet(String key, String val)
      Specified by:
      headerSet in class org.noear.solon.core.handle.Context
    • headerAdd

      public void headerAdd(String key, String val)
      Specified by:
      headerAdd in class org.noear.solon.core.handle.Context
    • headerOfResponse

      public String headerOfResponse(String name)
      Specified by:
      headerOfResponse in class org.noear.solon.core.handle.Context
    • headerValuesOfResponse

      public Collection<String> headerValuesOfResponse(String name)
      Specified by:
      headerValuesOfResponse in class org.noear.solon.core.handle.Context
    • headerNamesOfResponse

      public Collection<String> headerNamesOfResponse()
      Specified by:
      headerNamesOfResponse in class org.noear.solon.core.handle.Context
    • cookieSet

      public void cookieSet(org.noear.solon.core.handle.Cookie cookie)
      Specified by:
      cookieSet in class org.noear.solon.core.handle.Context
    • redirect

      public void redirect(String url, int code)
      Specified by:
      redirect in class org.noear.solon.core.handle.Context
    • status

      public int status()
      Specified by:
      status in class org.noear.solon.core.handle.Context
    • statusDoSet

      protected void statusDoSet(int status)
      Specified by:
      statusDoSet in class org.noear.solon.core.handle.Context
    • contentLength

      public void contentLength(long size)
      Overrides:
      contentLength in class org.noear.solon.core.handle.Context
    • flush

      public void flush() throws IOException
      Specified by:
      flush in class org.noear.solon.core.handle.Context
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in class org.noear.solon.core.handle.Context
      Throws:
      IOException
    • innerCommit

      protected void innerCommit() throws IOException
      Overrides:
      innerCommit in class ContextBase
      Throws:
      IOException
    • asyncSupported

      public boolean asyncSupported()
      Specified by:
      asyncSupported in class org.noear.solon.core.handle.Context
    • asyncStarted

      public boolean asyncStarted()
      Specified by:
      asyncStarted in class org.noear.solon.core.handle.Context
    • asyncListener

      public void asyncListener(org.noear.solon.core.handle.ContextAsyncListener listener)
      Specified by:
      asyncListener in class org.noear.solon.core.handle.Context
    • asyncStart

      public void asyncStart(long timeout, Runnable runnable)
      Specified by:
      asyncStart in class org.noear.solon.core.handle.Context
    • asyncComplete

      public void asyncComplete()
      Specified by:
      asyncComplete in class org.noear.solon.core.handle.Context