public interface DOMRpcAvailabilityListener extends EventListener
EventListener used to track RPC implementations becoming (un)available a DOMRpcService. Note that
the reported DOMRpcIdentifiers form an identifier space shared between RFC7950 actions and RFC6020 RPCs,
the former being also known as 'Routed RPCs'.
Interpretation of DOMRpcIdentifiers has to be evaluated in the context of one of these types, which need to be
determined by matching DOMRpcIdentifier.getType() against a
SchemaContext, which determines actual semantics of
DOMRpcIdentifier.getContextReference(). Corresponding SchemaNode is required to be a known sub-interface
of OperationDefinition.
For RFC6020 RPCs, reported context reference is always non-null and empty. It indicates an RPC implementation has been registered and invocations can be reasonably (with obvious distributed system caveats coming from asynchronous events) expected to succeed.
For RFC7950 actions with a non-empty context-reference, the indication is the same as for RFC6020 RPCs.
For RFC7950 actions with an empty context-reference, the indication is that the corresponding actions are potentially available, but are subject to dynamic lifecycle of their context references. This includes two primary use cases:
Second use case will not be providing further events, but rather will attempt to map any incoming invocation onto
some other RPC or action, or similar, which can separately fail. If a sub-request fails, such implementations are
required do report DOMRpcImplementationNotAvailableException as the invocation result, with the underlying
failure being linked as a cause.
| Modifier and Type | Method and Description |
|---|---|
default boolean |
acceptsImplementation(DOMRpcImplementation impl)
Implementation filtering method.
|
void |
onRpcAvailable(Collection<DOMRpcIdentifier> rpcs)
Method invoked whenever an RPC type becomes available.
|
void |
onRpcUnavailable(Collection<DOMRpcIdentifier> rpcs)
Method invoked whenever an RPC type becomes unavailable.
|
void onRpcAvailable(@Nonnull Collection<DOMRpcIdentifier> rpcs)
rpcs - RPC types newly availablevoid onRpcUnavailable(@Nonnull Collection<DOMRpcIdentifier> rpcs)
rpcs - RPC types which became unavailabledefault boolean acceptsImplementation(DOMRpcImplementation impl)
impl - RPC implementation being registeredCopyright © 2019 OpenDaylight. All rights reserved.