Interface ObjectRegistration<T>
- Type Parameters:
T- primary Java interface type
- All Superinterfaces:
AutoCloseable
Registration handle returned from
MiddlewareRuntime.export(String, T, Class, ExportOptions).
The handle is thread-safe when implemented by the runtime. Closing it is
idempotent and unexports the concrete instance represented by ref().
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Unexports the object.instance()Returns the local target instance owned by the runtime.ref()Returns the exported object reference.default voidsetReadiness(boolean ready, Duration validity) Sets host-owned readiness with a finite freshness bound, without changing export identity.status()Returns the current instance status.
-
Method Details
-
ref
-
instance
-
status
-
setReadiness
Sets host-owned readiness with a finite freshness bound, without changing export identity. Only the registration owner receives this handle; invocation metadata cannot call this setter. Once enabled, expiry is unready even if the probe/heartbeat scheduler stops. Legacy exports which never opt in retain their existing unlimited readiness behavior. A false observation never becomes ready merely because it expires. Unsupported runtimes fail closed.- Parameters:
ready- latest trusted host readiness resultvalidity- freshness duration from1millisecond through5minutes- Throws:
MiddlewareException- for unsupported runtimes, invalid validity or closed registrations
-
close
void close()Unexports the object. The method is idempotent.- Specified by:
closein interfaceAutoCloseable
-