public class CollectorGrpcEmbeddedServer
extends java.lang.Object
Class that provides static methods for running a collector on an embedded server. There are three possible methods to invoke to run a collector on a lightweight gRPC server:
runEmbeddedServer(Collector) - for running a given collector
class and looking up the port in the default properties file if it
existsrunEmbeddedServer(Collector, int) - for running a given
collector class on a given portrunEmbeddedServer(Collector, String[]) - for running a given
collector class with the port possibly supplied as a command line
argument| Constructor and Description |
|---|
CollectorGrpcEmbeddedServer() |
| Modifier and Type | Method and Description |
|---|---|
static void |
runEmbeddedServer(Collector c)
Run an embedded gRPC server to host the collector, looking it up in a
properties file if one exists
|
static void |
runEmbeddedServer(Collector c,
int port)
Run an embedded gRPC server to host the collector on the given port
|
static void |
runEmbeddedServer(Collector c,
java.lang.String[] args)
Run an embedded gRPC server to host the collector, passing in command line
arguments to optionally specify the port number
|
public static void runEmbeddedServer(Collector c, java.lang.String[] args)
c - The collector to be usedargs - Any command line arguments provided, e.g.
-port <port_number>public static void runEmbeddedServer(Collector c)
c - The collector to be usedpublic static void runEmbeddedServer(Collector c, int port)
c - The collector to be usedport - The port on which to run the web server