... " methods in DOMRpcProviderService"
This reverts commit
adf49155eced15c9f654d7bed7ee45cd95686e4f.
This is perhaps only a workaround,
depending on why test app expects class in the first place.
Change-Id: I68840f79aec25b128ddb78edc1a1e5514de16631
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
*/
package org.opendaylight.controller.md.sal.dom.api;
-import com.google.common.collect.ImmutableSet;
import java.util.Set;
import javax.annotation.Nonnull;
* @throws NullPointerException if implementation or types is null
* @throws IllegalArgumentException if types is empty or contains a null element.
*/
- default @Nonnull <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T> registerRpcImplementation(
- @Nonnull final T implementation, @Nonnull final DOMRpcIdentifier... rpcs) {
- return registerRpcImplementation(implementation, ImmutableSet.copyOf(rpcs));
- }
+ @Nonnull <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T> registerRpcImplementation(
+ @Nonnull T implementation, @Nonnull DOMRpcIdentifier... rpcs);
/**
* Register an {@link DOMRpcImplementation} object with this service.
import com.google.common.collect.Collections2;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableList.Builder;
+import com.google.common.collect.ImmutableSet;
import com.google.common.collect.MapDifference;
import com.google.common.collect.MapDifference.ValueDifference;
import com.google.common.collect.Maps;
return rpcRouter;
}
+ @Override
+ public <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T> registerRpcImplementation(
+ final T implementation, final DOMRpcIdentifier... rpcs) {
+ return registerRpcImplementation(implementation, ImmutableSet.copyOf(rpcs));
+ }
+
private synchronized void removeRpcImplementation(final DOMRpcImplementation implementation,
final Set<DOMRpcIdentifier> rpcs) {
final DOMRpcRoutingTable oldTable = routingTable;
return session;
}
+
+ @Nonnull
+ @Override
+ public <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T> registerRpcImplementation(@Nonnull final T implementation, @Nonnull final DOMRpcIdentifier... rpcs) {
+ return rpcProvider.registerRpcImplementation(implementation, rpcs);
+ }
+
@Nonnull
@Override
public <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T> registerRpcImplementation(@Nonnull final T implementation, @Nonnull final Set<DOMRpcIdentifier> rpcs) {
*/
package org.opendaylight.controller.md.sal.dom.spi;
+import com.google.common.collect.ImmutableSet;
+import org.opendaylight.controller.md.sal.dom.api.DOMRpcIdentifier;
+import org.opendaylight.controller.md.sal.dom.api.DOMRpcImplementation;
+import org.opendaylight.controller.md.sal.dom.api.DOMRpcImplementationRegistration;
import org.opendaylight.controller.md.sal.dom.api.DOMRpcProviderService;
/**
* Convenience abstract base class for {@link DOMRpcProviderService} implementations.
- *
- * @deprecated Useless class. Implement {@link DOMRpcProviderService} directly.
*/
-@Deprecated
public abstract class AbstractDOMRpcProviderService implements DOMRpcProviderService {
-
+ @Override
+ public final <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T> registerRpcImplementation(final T implementation, final DOMRpcIdentifier... types) {
+ return registerRpcImplementation(implementation, ImmutableSet.copyOf(types));
+ }
}
protected abstract @Nonnull DOMRpcProviderService delegate();
@Override
- public <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T> registerRpcImplementation(
- final T implementation, final Set<DOMRpcIdentifier> types) {
+ public <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T> registerRpcImplementation(final T implementation, final DOMRpcIdentifier... types) {
+ return delegate().registerRpcImplementation(implementation, types);
+ }
+
+ @Override
+ public <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T> registerRpcImplementation(final T implementation, final Set<DOMRpcIdentifier> types) {
return delegate().registerRpcImplementation(implementation, types);
}
}