Interface DOMRpcService
-
- All Superinterfaces:
DOMService
,DOMService
- All Known Implementing Classes:
DOMRpcRouter
,ForwardingDOMRpcService
,LegacyDOMRpcServiceAdapter
@Deprecated(forRemoval=true) public interface DOMRpcService extends DOMService
Deprecated, for removal: This API element is subject to removal in a future version.UseDOMRpcService
insteadADOMService
which allows clients to invoke RPCs. The conceptual model of this service is that of a dynamic router, where the set of available RPC services can change dynamically. The service allows users to add a listener to track the process of RPCs becoming available.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description @NonNull CheckedFuture<DOMRpcResult,DOMRpcException>
invokeRpc(@NonNull SchemaPath type, @Nullable NormalizedNode<?,?> input)
Deprecated, for removal: This API element is subject to removal in a future version.Initiate invocation of an RPC.<T extends DOMRpcAvailabilityListener>
@NonNull ListenerRegistration<T>registerRpcListener(@NonNull T listener)
Deprecated, for removal: This API element is subject to removal in a future version.Register aDOMRpcAvailabilityListener
with this service to receive notifications about RPC implementations becoming (un)available.
-
-
-
Method Detail
-
invokeRpc
@NonNull CheckedFuture<DOMRpcResult,DOMRpcException> invokeRpc(@NonNull SchemaPath type, @Nullable NormalizedNode<?,?> input)
Deprecated, for removal: This API element is subject to removal in a future version.Initiate invocation of an RPC. This method is guaranteed to not block on any external resources.- Parameters:
type
- SchemaPath of the RPC to be invokedinput
- Input arguments, null if the RPC does not take any.- Returns:
- A
CheckedFuture
which will return either a result structure, or report a subclass ofDOMRpcException
reporting a transport error.
-
registerRpcListener
<T extends DOMRpcAvailabilityListener> @NonNull ListenerRegistration<T> registerRpcListener(@NonNull T listener)
Deprecated, for removal: This API element is subject to removal in a future version.Register aDOMRpcAvailabilityListener
with this service to receive notifications about RPC implementations becoming (un)available. The listener will be invoked with the current implementations reported and will be kept uptodate as implementations come and go.Users should note that using a listener does not necessarily mean that
invokeRpc(SchemaPath, NormalizedNode)
will not report a failure due toDOMRpcImplementationNotAvailableException
and need to be ready to handle it.Implementations of this interface are encouraged to take reasonable precautions to prevent this scenario from occurring.
- Parameters:
listener
-DOMRpcAvailabilityListener
instance to register- Returns:
- A
ListenerRegistration
representing this registration. Performing aListenerRegistration.close()
will cancel it. Returned object is guaranteed to be non-null.
-
-