@Tag(name="events subscription",description="Endpoints to register and terminate an Event Listener")
publicinterfaceHubApi{
Loggerlog=LoggerFactory.getLogger(HubApi.class);
defaultOptional<ObjectMapper>getObjectMapper(){
returnOptional.empty();
}
defaultOptional<NativeWebRequest>getRequest(){
returnOptional.empty();
}
defaultOptional<String>getAcceptHeader(){
returngetRequest().map(r->r.getHeader("Accept"));
}
/**
* POST /hub : Register a listener
* Sets the communication endpoint address the service instance must use to deliver information about its health state, execution state, failures and metrics.
*
* @param eventSubscriptionInput Data containing the callback endpoint to deliver the information (required)
* @return Notified (status code 201)
* or Error (status code 200)
*/
@Operation(
operationId="registerListener",
summary="Register a listener",
description="Sets the communication endpoint address the service instance must use to deliver information about its health state, execution state, failures and metrics.",
@Parameter(name="EventSubscriptionInput",description="Data containing the callback endpoint to deliver the information",required=true)@Valid@RequestBodyEventSubscriptionInputeventSubscriptionInput
* Resets the communication endpoint address the service instance must use to deliver information about its health state, execution state, failures and metrics.
*
* @param id Identifier of the Service (required)
* @return Deleted (status code 204)
* or Error (status code 200)
*/
@Operation(
operationId="unregisterListener",
summary="Unregister a listener",
description="Resets the communication endpoint address the service instance must use to deliver information about its health state, execution state, failures and metrics.",