import org.opendaylight.yangtools.yang.binding.RpcService;
/**
- * Provides ability to registered Remote Procedure Call (RPC) service implementations. The RPCs are
- * defined in YANG models.
- *
+ * Provides ability to registered Remote Procedure Call (RPC) service implementations. The RPCs are defined in YANG
+ * models.
*/
public interface RpcProviderService extends BindingService {
+ /**
+ * Register RPCs combined in a {@link RpcService} interface.
+ *
+ * @param <R> {@link RpcService} type
+ * @param <I> {@link RpcService} implementation type
+ * @param type {@link RpcService} class
+ * @param implementation implementation object
+ * @return An {@link ObjectRegistration} controlling unregistration
+ * @throws NullPointerException if any argument is {@code null}
+ */
+ <R extends RpcService, I extends R> ObjectRegistration<I> registerRpcImplementation(Class<R> type,
+ I implementation);
- <S extends RpcService, T extends S> ObjectRegistration<T> registerRpcImplementation(Class<S> type,
- T implementation);
-
-
- <S extends RpcService, T extends S> ObjectRegistration<T> registerRpcImplementation(Class<S> type,
- T implementation, Set<InstanceIdentifier<?>> paths);
-
+ /**
+ * Register RPCs combined in a {@link RpcService} interface on a set of datastore context paths.
+ *
+ * @param <R> {@link RpcService} type
+ * @param <I> {@link RpcService} implementation type
+ * @param type {@link RpcService} class
+ * @param implementation implementation object
+ * @param paths Datastore paths to service
+ * @return An {@link ObjectRegistration} controlling unregistration
+ * @throws NullPointerException if any argument is {@code null}
+ */
+ <R extends RpcService, I extends R> ObjectRegistration<I> registerRpcImplementation(Class<R> type, I implementation,
+ Set<InstanceIdentifier<?>> paths);
}
}
@Override
- public <S extends RpcService, T extends S> ObjectRegistration<T> registerRpcImplementation(final Class<S> type,
- final T implementation) {
+ public <R extends RpcService, I extends R> ObjectRegistration<I> registerRpcImplementation(final Class<R> type,
+ final I implementation) {
return register(type, implementation, GLOBAL);
}
@Override
- public <S extends RpcService, T extends S> ObjectRegistration<T> registerRpcImplementation(final Class<S> type,
- final T implementation, final Set<InstanceIdentifier<?>> paths) {
+ public <R extends RpcService, I extends R> ObjectRegistration<I> registerRpcImplementation(final Class<R> type,
+ final I implementation, final Set<InstanceIdentifier<?>> paths) {
return register(type, implementation, toYangInstanceIdentifiers(paths));
}
}
@Override
- public <S extends RpcService, T extends S> ObjectRegistration<T> registerRpcImplementation(final Class<S> type,
- final T implementation) {
+ public <R extends RpcService, I extends R> ObjectRegistration<I> registerRpcImplementation(final Class<R> type,
+ final I implementation) {
return delegate().registerRpcImplementation(type, implementation);
}
@Override
- public <S extends RpcService, T extends S> ObjectRegistration<T> registerRpcImplementation(final Class<S> type,
- final T implementation, final Set<InstanceIdentifier<?>> paths) {
+ public <R extends RpcService, I extends R> ObjectRegistration<I> registerRpcImplementation(final Class<R> type,
+ final I implementation, final Set<InstanceIdentifier<?>> paths) {
return delegate().registerRpcImplementation(type, implementation, paths);
}