Skip to content

Commit

Permalink
Modernize RPC implementation registration
Browse files Browse the repository at this point in the history
Use these changes to modernize RPC implementation registration:
opendaylight/lispflowmapping@27c0004

JIRA: LIGHTY-298
Signed-off-by: tobias.pobocik <[email protected]>
  • Loading branch information
Tobianas committed May 14, 2024
1 parent 0574650 commit 8b87c41
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
package io.lighty.gnmi.southbound.schema.certstore.rpc;


import com.google.common.collect.ClassToInstanceMap;
import com.google.common.collect.ImmutableClassToInstanceMap;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.SettableFuture;
import io.lighty.gnmi.southbound.schema.certstore.service.CertificationStorageService;
import java.security.GeneralSecurityException;
import java.util.Collection;
import java.util.List;
import org.opendaylight.mdsal.common.api.CommitInfo;
import org.opendaylight.yang.gen.v1.urn.lighty.gnmi.certificate.storage.rev210504.AddKeystoreCertificate;
import org.opendaylight.yang.gen.v1.urn.lighty.gnmi.certificate.storage.rev210504.AddKeystoreCertificateInput;
Expand Down Expand Up @@ -90,10 +90,9 @@ public void onFailure(final Throwable throwable) {
return rpcResult;
}

public ClassToInstanceMap<Rpc<?,?>> getRpcClassToInstanceMap() {
return ImmutableClassToInstanceMap.<Rpc<?, ?>>builder()
.put(AddKeystoreCertificate.class, this::addKeystoreCertificate)
.put(RemoveKeystoreCertificate.class, this::removeKeystoreCertificate)
.build();
public Collection<Rpc<?,?>> getRpcClassToInstanceMap() {
return List.of(
(AddKeystoreCertificate) this::addKeystoreCertificate,
(RemoveKeystoreCertificate) this::removeKeystoreCertificate);
}
}

0 comments on commit 8b87c41

Please sign in to comment.