Interface PendingService.OwnedService<S,R>
- Type Parameters:
S- type of service ownedR- type of value passed to the hook indicating that the service's pending has ended (the service became ready)
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
AbstractManagedPendingService.SafeOwnedService
- Enclosing interface:
- PendingService<O,
S, R>
An owned service which must be closed once the owner is ready with it.
-
Method Summary
-
Method Details
-
service
S service()Service accessible until this instance gets closed.- Returns:
- actual owned service
-
onceReady
Specifies a callback to be called once the service's pending has ended (the service became ready).- Parameters:
serviceCallback- callback to be called when the service becomes ready
-
close
void close()- Specified by:
closein interfaceAutoCloseable
-