Package energy.eddie.aiida.services
Class HandshakeService
java.lang.Object
energy.eddie.aiida.services.HandshakeService
Performs the handshake with the EDDIE framework that created a permission request: fetching its details and
reporting whether it was accepted, rejected, or cannot be fulfilled.
-
Constructor Summary
ConstructorsConstructorDescriptionHandshakeService(ApplicationInformationService applicationInformationService, org.springframework.web.reactive.function.client.WebClient webClient) -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<MqttDto> accept(HandshakeTarget target) Accepts the permission request at the respective EDDIE framework.voiddenoteUnfulfillable(HandshakeTarget target, String reason) Makes a blocking request to the EDDIE framework to report that this AIIDA instance cannot fulfill the permission request.reactor.core.publisher.Mono<PermissionDetailsDto> fetchDetails(HandshakeTarget target) Fetches the details about the permission and the associated data need from the respective EDDIE framework.voidreject(HandshakeTarget target, String reason) Makes a blocking request to the EDDIE framework to report that the user rejected the permission request.
-
Constructor Details
-
HandshakeService
public HandshakeService(ApplicationInformationService applicationInformationService, org.springframework.web.reactive.function.client.WebClient webClient)
-
-
Method Details
-
fetchDetails
Fetches the details about the permission and the associated data need from the respective EDDIE framework. -
accept
Accepts the permission request at the respective EDDIE framework. Returns the MQTT credentials and topic names that are to be used by the associated permission. -
reject
Makes a blocking request to the EDDIE framework to report that the user rejected the permission request. Occurring errors are logged and rethrown.- Parameters:
reason- Optional human-readable reason that is forwarded to the eligible party.
-
denoteUnfulfillable
Makes a blocking request to the EDDIE framework to report that this AIIDA instance cannot fulfill the permission request. Occurring errors are logged and rethrown.- Parameters:
reason- Optional human-readable reason that is forwarded to the eligible party.
-