Invokers are considered an implementation detail and this particular
method is not used anywhere except tests. Schedule it for removal along
with ClassBasedRpcServiceInvoker it uses.
Change-Id: I4d8c57bbd982ea6eae21706d909af16495f29f56
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
import org.opendaylight.yangtools.yang.binding.RpcService;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.binding.RpcService;
import org.opendaylight.yangtools.yang.common.QName;
+@Deprecated(forRemoval = true, since = "9.0.3")
final class ClassBasedRpcServiceInvoker extends AbstractMappedRpcInvoker<String> {
private static final LoadingCache<Class<? extends RpcService>, RpcServiceInvoker> INVOKERS =
CacheBuilder.newBuilder().weakKeys()
final class ClassBasedRpcServiceInvoker extends AbstractMappedRpcInvoker<String> {
private static final LoadingCache<Class<? extends RpcService>, RpcServiceInvoker> INVOKERS =
CacheBuilder.newBuilder().weakKeys()
*
* @param type RpcService interface, which was generated from model.
* @return Cached instance of {@link RpcServiceInvoker} for supplied RPC type.
*
* @param type RpcService interface, which was generated from model.
* @return Cached instance of {@link RpcServiceInvoker} for supplied RPC type.
+ * @deprecated This method is not used by the adapter and is scheduled for removal.
+ @Deprecated(forRemoval = true, since = "9.0.3")
public static RpcServiceInvoker from(final Class<? extends RpcService> type) {
return ClassBasedRpcServiceInvoker.instanceFor(type);
}
public static RpcServiceInvoker from(final Class<? extends RpcService> type) {
return ClassBasedRpcServiceInvoker.instanceFor(type);
}
import org.opendaylight.yangtools.yang.binding.RpcService;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.binding.RpcService;
import org.opendaylight.yangtools.yang.common.QName;
+@Deprecated(forRemoval = true, since = "9.0.3")
public class ClassBasedRpcServiceInvokerTest {
public class ClassBasedRpcServiceInvokerTest {
@Test
public void qnameToKeyTest() throws Exception {
final ClassBasedRpcServiceInvoker classBasedRpcServiceInvoker =
@Test
public void qnameToKeyTest() throws Exception {
final ClassBasedRpcServiceInvoker classBasedRpcServiceInvoker =
QName.create(QNameModule.create(XMLNamespace.of("testURI"), Revision.of("2017-10-26")), "test"), method)));
}
QName.create(QNameModule.create(XMLNamespace.of("testURI"), Revision.of("2017-10-26")), "test"), method)));
}
+ @Deprecated(forRemoval = true)
@Test(expected = IllegalArgumentException.class)
public void fromWithExceptionTest() {
RpcServiceInvoker.from(RpcService.class);
@Test(expected = IllegalArgumentException.class)
public void fromWithExceptionTest() {
RpcServiceInvoker.from(RpcService.class);