- java.lang.Object
-
- net.morimekta.tiny.server.TinyApplicationContext
-
public final class TinyApplicationContext extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TinyApplicationContext.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TinyApplicationContext
addHealthCheck(String name, net.morimekta.tiny.http.TinyHealth.HealthCheck healthCheck)
Add health check to active checks.TinyApplicationContext
addReadyCheck(String name, net.morimekta.tiny.http.TinyHealth.ReadyCheck readyCheck)
Add ready check to active checks.int
getAdminPort()
Get the port the Admin HTTP server is listening to.TinyApplicationContext
removeHealthCheck(String name)
Remove health check with given name.TinyApplicationContext
removeReadyCheck(String name)
Remove ready check with given name.
-
-
-
Method Detail
-
getAdminPort
public int getAdminPort()
Get the port the Admin HTTP server is listening to.- Returns:
- The listening Admin port.
-
addReadyCheck
public TinyApplicationContext addReadyCheck(String name, net.morimekta.tiny.http.TinyHealth.ReadyCheck readyCheck)
Add ready check to active checks.- Parameters:
name
- Ready check name. The name must be unique.readyCheck
- The ready check to be done.- Returns:
- The context.
-
removeReadyCheck
public TinyApplicationContext removeReadyCheck(String name)
Remove ready check with given name.- Parameters:
name
- The ready check name.- Returns:
- The context.
-
addHealthCheck
public TinyApplicationContext addHealthCheck(String name, net.morimekta.tiny.http.TinyHealth.HealthCheck healthCheck)
Add health check to active checks.- Parameters:
name
- Ready check name.healthCheck
- The health check to be done.- Returns:
- The context.
-
removeHealthCheck
public TinyApplicationContext removeHealthCheck(String name)
Remove health check with given name.- Parameters:
name
- The health check name.- Returns:
- The context.
-
-