Class HandlerContext


public class HandlerContext extends Object
  • Constructor Details

    • HandlerContext

      public HandlerContext(String contextPath, ctx, io.netty.handler.codec.http.FullHttpRequest req)
  • Method Details

    • getRequestBaseURL

      public String getRequestBaseURL()
      Attempts to derive the externally used URL to Yamcs based on request information
      a url of the form [protocol]://[host]:[port][context]
    • getNettyChannelHandlerContext

      public getNettyChannelHandlerContext()
    • getNettyFullHttpRequest

      public io.netty.handler.codec.http.FullHttpRequest getNettyFullHttpRequest()
    • getContextPath

      public String getContextPath()
    • getPathWithoutContext

      public String getPathWithoutContext()
    • isGET

      public boolean isGET()
    • isPOST

      public boolean isPOST()
    • requireGET

      public void requireGET()
    • requirePOST

      public void requirePOST()
    • requireMethod

      public void requireMethod(io.netty.handler.codec.http.HttpMethod... allowedMethods)
    • requireFormEncoding

      public void requireFormEncoding()
    • requireFormParameter

      public String requireFormParameter(String parameter)
    • requireQueryParameter

      public String requireQueryParameter(String parameter)
    • requireParameter

      public String requireParameter(String parameter)
    • getHeader

      public String getHeader(CharSequence name)
    • isFormEncoded

      public boolean isFormEncoded()
    • getCredentials

      public String getCredentials(String type)
    • getBasicCredentials

      public String[] getBasicCredentials()
    • getFormParameter

      public String getFormParameter(String parameter)
    • getQueryParameter

      public String getQueryParameter(String parameter)
    • getParameter

      public String getParameter(String parameter)
    • createByteBuf

      public io.netty.buffer.ByteBuf createByteBuf()
    • renderOK

      public void renderOK(String templateResource, Map<String,Object> vars)
    • render

      public void render(io.netty.handler.codec.http.HttpResponseStatus status, String templateResource, Map<String,Object> vars)
    • renderToString

      public String renderToString(String templateResource, Map<String,Object> vars)
    • sendOK

      public void sendOK()
    • sendOK

      public void sendOK( message)
    • sendOK

      public void sendOK( jsonObject)
    • sendResponse

      public sendResponse(io.netty.handler.codec.http.HttpResponse response)
    • sendRedirect

      public void sendRedirect(String location)