Package org.apache.storm.daemon.drpc
Class DRPCServer
java.lang.Object
org.apache.storm.daemon.drpc.DRPCServer
- All Implemented Interfaces:
AutoCloseable
-
Constructor Summary
ConstructorDescriptionDRPCServer
(Map<String, Object> conf, StormMetricsRegistry metricsRegistry) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
The port the DRPC invoke server is listening on.int
The port the DRPC handler server is listening on.int
The port the HTTP server is listening on.static void
Main method to start the server.
-
Constructor Details
-
DRPCServer
Constructor.- Parameters:
conf
- Drpc conf for the serversmetricsRegistry
- The metrics registry
-
-
Method Details
-
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 handlerconfigName
- Config nameconf
- Conf to be added in context filter
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
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 untilstart()
has run.- Returns:
- The port the HTTP server is listening on. Not available until
start()
has run.
-
main
Main method to start the server.- Throws:
Exception
-