Class CloudServiceDeferredStateEvent
java.lang.Object
eu.cloudnetservice.driver.event.Event
eu.cloudnetservice.driver.event.events.service.CloudServiceDeferredStateEvent
An event which gets called when a deferred service creation gets a state update, either by successfully creating the
service or by failing if the maximum retry count is reached.
This event is only called on all channel message receivers which were defined previously.
- Since:
- 4.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCloudServiceDeferredStateEvent(@NonNull UUID creationId, @NonNull ServiceCreateResult createResult) Constructs a new deferred state event instance. -
Method Summary
Modifier and TypeMethodDescriptionGet the underlying service of the service result.Get the id of the deferred result this event is associated with.Get the raw underlying create result.state()Get the state of the service creation.
-
Field Details
-
creationId
-
createResult
-
-
Constructor Details
-
CloudServiceDeferredStateEvent
public CloudServiceDeferredStateEvent(@NonNull @NonNull UUID creationId, @NonNull @NonNull ServiceCreateResult createResult) Constructs a new deferred state event instance.- Parameters:
creationId- the id submitted in the initial result of the service creation.createResult- the result of the creation process.- Throws:
NullPointerException- if the given creation id or result is null.
-
-
Method Details
-
deferredCreationId
-
state
Get the state of the service creation. Equivalent toserviceCreateResult().state().- Returns:
- the state of the service creation.
-
createdService
Get the underlying service of the service result. This method throws an exception if the state of the creation is notCREATED. Equivalent toserviceCreateResult().createdService().- Returns:
- the underlying service of the service result.
- Throws:
IllegalStateException- if the underlying result was not completed successfully.
-
serviceCreateResult
Get the raw underlying create result.- Returns:
- the raw underlying create result.
-