Package org.apache.storm.daemon.drpc

## Class DRPCServer

- java.lang.Object
- - org.apache.storm.daemon.drpc.DRPCServer

- All Implemented Interfaces:
    `AutoCloseable`

      public class DRPCServer
      extends Object
      implements AutoCloseable

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DRPCServer​(Map<String,​Object> conf, StormMetricsRegistry metricsRegistry)` | Constructor.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `addRequestContextFilter​(org.eclipse.jetty.servlet.ServletContextHandler context, String configName, Map<String,​Object> conf)` | Add a request context filter to the Servlet Context Handler.
    `void` | `close()` |
    `int` | `getDrpcInvokePort()` | The port the DRPC invoke server is listening on.
    `int` | `getDrpcPort()` | The port the DRPC handler server is listening on.
    `int` | `getHttpServerPort()` | The port the HTTP server is listening on.
    `static void` | `main​(String[] args)` | Main method to start the server.

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

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

- - ### Constructor Detail

    - #### DRPCServer

          public DRPCServer​(Map<String,​Object> conf,
                            StormMetricsRegistry metricsRegistry)

      Constructor.
      Parameters:
        `conf` - Drpc conf for the servers
        `metricsRegistry` - The metrics registry

  - ### Method Detail

    - #### addRequestContextFilter

          public static void addRequestContextFilter​(org.eclipse.jetty.servlet.ServletContextHandler context,
                                                     String configName,
                                                     Map<String,​Object> conf)

      Add a request context filter to the Servlet Context Handler.
      Parameters:
        `context` - The Servlet Context handler
        `configName` - Config name
        `conf` - Conf to be added in context filter

    - #### close

          public void close()

      Specified by:
        `close` in interface `AutoCloseable`

    - #### getDrpcPort

          public int getDrpcPort()

      The port the DRPC handler server is listening on.
      Returns:
        The port the DRPC handler server is listening on.

    - #### getDrpcInvokePort

          public int getDrpcInvokePort()

      The port the DRPC invoke server is listening on.
      Returns:
        The port the DRPC invoke server is listening on.

    - #### getHttpServerPort

          public int getHttpServerPort()

      The port the HTTP server is listening on. Not available until `start()` has run.
      Returns:
        The port the HTTP server is listening on. Not available until `start()` has run.

    - #### main

          public static void main​(String[] args)
                           throws Exception

      Main method to start the server.
      Throws:
        `Exception`