@PostConstruct
    public void afterPropertiesSet() throws Exception {
        bindPort = 19091;

        /* The port on which the server should run */
        server = ServerBuilder.forPort(bindPort)
                .addService(new GreeterImpl())
                .build()
                .start();
        logger.info("Server started, listening on " + bindPort);
        Runtime.getRuntime().addShutdownHook(new Thread() {
            @Override
            public void run() {
                // Use stderr here since the logger may have been reset by its JVM shutdown hook.
                System.err.println("*** shutting down gRPC server since JVM is shutting down");
                HelloWorldServer.this.destroy();
                System.err.println("*** server shut down");
            }
        });
    }
Server that manages startup/shutdown of a {@code Greeter} server.
agent-module/agent-testweb/grpc-plugin-testweb/src/main/java/com/pinpoint/test/plugin/HelloWorldServer.java