Package org.wildfly.discovery
Interface ServiceRegistration
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
AggregateServiceRegistration
A service registration handle, which can be used to remove a previously registered service.
- Author:
- David M. Lloyd
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ServiceRegistrationAn empty service registration handle, which has no effect. -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()Re-activate this registration immediately and indefinitely.static ServiceRegistrationaggregate(ServiceRegistration... registrations) Create an aggregate of registrations which are all controlled as one.voidclose()Close and remove this registration immediately.voidInvalidate this registration immediately (possibly temporarily) without closing it.default voidhintDeactivateAt(Instant instant) Hint to this registration that deactivation of the service is likely at the given time.
-
Field Details
-
EMPTY
An empty service registration handle, which has no effect.
-
-
Method Details
-
close
void close()Close and remove this registration immediately.- Specified by:
closein interfaceAutoCloseable
-
deactivate
void deactivate()Invalidate this registration immediately (possibly temporarily) without closing it. -
activate
void activate()Re-activate this registration immediately and indefinitely. -
hintDeactivateAt
Hint to this registration that deactivation of the service is likely at the given time.- Parameters:
instant- the time at which deactivation is likely (must not benull)
-
aggregate
Create an aggregate of registrations which are all controlled as one.- Parameters:
registrations- the registrations to control- Returns:
- the aggregated handle
-