Class RestApi
java.lang.Object
com.smeup.kokos.sdk.entrypoint.restapi.RestApi
- Author:
- mattia.bonardi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddEndpoint(String path, org.eclipse.jetty.server.Handler handler) static voidaddEndpoint(org.eclipse.jetty.http.pathmap.PathSpec path, org.eclipse.jetty.server.Handler handler) static <T extends com.smeup.kokos.sdk.configuration.MicroExecutorConfiguration>
voidstartServer(com.smeup.kokos.sdk.configuration.MicroExecutorStartupContext<T> startupContext) static <T extends com.smeup.kokos.sdk.configuration.MicroExecutorConfiguration>
voidstartServer(String microExecutorId, Class<T> configurationClass) Deprecated.startServer(final MicroExecutorStartupContext invalid input: '<' T > startupContext)static <T extends com.smeup.kokos.sdk.configuration.MicroExecutorConfiguration>
voidstartServer(String microExecutorId, Class<T> configurationClass, Consumer<T> callBackFunction) Deprecated.use startServer(final MicroExecutorStartupContextstartupContext) instead static voidStops the server with the default shutdown timeout.static voidstopServer(long timeout) Stops the server with a specified timeout.
-
Constructor Details
-
RestApi
public RestApi()
-
-
Method Details
-
startServer
public static <T extends com.smeup.kokos.sdk.configuration.MicroExecutorConfiguration> void startServer(com.smeup.kokos.sdk.configuration.MicroExecutorStartupContext<T> startupContext) throws Exception - Throws:
Exception
-
startServer
@Deprecated public static <T extends com.smeup.kokos.sdk.configuration.MicroExecutorConfiguration> void startServer(String microExecutorId, Class<T> configurationClass) throws Exception Deprecated.startServer(final MicroExecutorStartupContext invalid input: '<' T > startupContext)Create and load configuration, start HTTP Jetty Server and initialize APIs- Type Parameters:
T- extends MicroExecutorConfiguration- Parameters:
microExecutorId- micro-executor id- Throws:
Exception- Exception
-
startServer
@Deprecated public static <T extends com.smeup.kokos.sdk.configuration.MicroExecutorConfiguration> void startServer(String microExecutorId, Class<T> configurationClass, Consumer<T> callBackFunction) throws Exception Deprecated.use startServer(final MicroExecutorStartupContextstartupContext) instead Create and load configuration, start HTTP Jetty Server and initialize APIs- Type Parameters:
T- extends MicroExecutorConfiguration- Parameters:
microExecutorId- micro-executor idcallBackFunction- the function invoked before the server starts- Throws:
Exception- Exception
-
addEndpoint
-
addEndpoint
public static void addEndpoint(org.eclipse.jetty.http.pathmap.PathSpec path, org.eclipse.jetty.server.Handler handler) -
stopServer
Stops the server with a specified timeout.- Parameters:
timeout- the timeout in milliseconds to wait for the server to stop- Throws:
Exception- if an error occurs while stopping the server
-
stopServer
Stops the server with the default shutdown timeout.- Throws:
Exception- if an error occurs while stopping the server
-