org.apache.hadoop.hdfs.server.datanode.web.webhdfs

## Class WebHdfsHandler

- java.lang.Object
- - io.netty.channel.ChannelHandlerAdapter
  - - io.netty.channel.ChannelInboundHandlerAdapter
    - - io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.HttpRequest>
      - - org.apache.hadoop.hdfs.server.datanode.web.webhdfs.WebHdfsHandler

- All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

      public class WebHdfsHandler
      extends io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.HttpRequest>

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

      `io.netty.channel.ChannelHandler.Sharable`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `APPLICATION_JSON_UTF8`
    `static String` | `APPLICATION_OCTET_STREAM`
    `static EnumSet<org.apache.hadoop.fs.CreateFlag>` | `EMPTY_CREATE_FLAG`
    `static String` | `WEBHDFS_PREFIX`
    `static int` | `WEBHDFS_PREFIX_LENGTH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WebHdfsHandler(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.conf.Configuration confForCreate)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `channelRead0(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpRequest req)`
    `void` | `exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)`
    `void` | `handle(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpRequest req)`

    - ### Methods inherited from class io.netty.channel.SimpleChannelInboundHandler

      `acceptInboundMessage, channelRead`

    - ### Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

      `channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered`

    - ### Methods inherited from class io.netty.channel.ChannelHandlerAdapter

      `ensureNotSharable, handlerAdded, handlerRemoved, isSharable`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface io.netty.channel.ChannelHandler

      `handlerAdded, handlerRemoved`

- - ### Field Detail

    - #### WEBHDFS_PREFIX

          public static final String WEBHDFS_PREFIX

      See Also:
        Constant Field Values

    - #### WEBHDFS_PREFIX_LENGTH

          public static final int WEBHDFS_PREFIX_LENGTH

    - #### APPLICATION_OCTET_STREAM

          public static final String APPLICATION_OCTET_STREAM

      See Also:
        Constant Field Values

    - #### APPLICATION_JSON_UTF8

          public static final String APPLICATION_JSON_UTF8

      See Also:
        Constant Field Values

    - #### EMPTY_CREATE_FLAG

          public static final EnumSet<org.apache.hadoop.fs.CreateFlag> EMPTY_CREATE_FLAG

  - ### Constructor Detail

    - #### WebHdfsHandler

          public WebHdfsHandler(org.apache.hadoop.conf.Configuration conf,
                                org.apache.hadoop.conf.Configuration confForCreate)
                         throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### channelRead0

          public void channelRead0(io.netty.channel.ChannelHandlerContext ctx,
                                   io.netty.handler.codec.http.HttpRequest req)
                            throws Exception

      Specified by:
        `channelRead0` in class `io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.HttpRequest>`
      Throws:
        `Exception`

    - #### handle

          public void handle(io.netty.channel.ChannelHandlerContext ctx,
                             io.netty.handler.codec.http.HttpRequest req)
                      throws IOException,
                             URISyntaxException

      Throws:
        `IOException`
        `URISyntaxException`

    - #### exceptionCaught

          public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
                                      Throwable cause)

      Specified by:
        `exceptionCaught` in interface `io.netty.channel.ChannelHandler`
      Specified by:
        `exceptionCaught` in interface `io.netty.channel.ChannelInboundHandler`
      Overrides:
        `exceptionCaught` in class `io.netty.channel.ChannelInboundHandlerAdapter`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.