Class OrchestraHttpServer
java.lang.Object
com.iantapply.orchestra.web.OrchestraHttpServer
- All Implemented Interfaces:
AutoCloseable
Small authenticated HTTP server exposing health and Prometheus metrics.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCallback used by the HTTP adapter to create an immediate event execution. -
Constructor Summary
ConstructorsConstructorDescriptionOrchestraHttpServer(InetSocketAddress address, MetricsRegistry metrics, Map<String, Actor> tokens, OrchestraHttpServer.EventTrigger eventTrigger) Creates the HTTP listener without starting it. -
Method Summary
-
Constructor Details
-
OrchestraHttpServer
public OrchestraHttpServer(InetSocketAddress address, MetricsRegistry metrics, Map<String, Actor> tokens, OrchestraHttpServer.EventTrigger eventTrigger) throws IOExceptionCreates the HTTP listener without starting it.- Parameters:
address- bind addressmetrics- metrics registry exposed at/metricstokens- bearer-token to actor mappingseventTrigger- callback that creates an immediate event execution- Throws:
IOException- when the listening server cannot be created
-
-
Method Details
-
start
public void start()Starts accepting HTTP requests. -
close
public void close()Stops accepting requests after a one-second grace period.- Specified by:
closein interfaceAutoCloseable
-