public class DRPCServer extends Object implements AutoCloseable
Constructor and Description |
---|
DRPCServer(Map<String,Object> conf,
StormMetricsRegistry metricsRegistry)
Constructor.
|
Modifier and Type | Method and 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.
|
public DRPCServer(Map<String,Object> conf, StormMetricsRegistry metricsRegistry)
Constructor.
conf
- Drpc conf for the serversmetricsRegistry
- The metrics registrypublic 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.
context
- The Servlet Context handlerconfigName
- Config nameconf
- Conf to be added in context filterpublic void close()
close
in interface AutoCloseable
public int getDrpcPort()
The port the DRPC handler server is listening on.
public int getDrpcInvokePort()
The port the DRPC invoke server is listening on.
public int getHttpServerPort()
The port the HTTP server is listening on. Not available until start()
has run.
start()
has run.Copyright © 2019 The Apache Software Foundation. All rights reserved.