@Test public void testRouteAdd() { final TestKit probeReg = new TestKit(SYSTEM); final ActorRef rpcRegistry = probeReg.getRef(); final OpsListener opsListener = new OpsListener(rpcRegistry, rpcRegistry); opsListener.onRpcAvailable(Collections.singleton(RPC_ID)); probeReg.expectMsgClass(RpcRegistry.Messages.AddOrUpdateRoutes.class); }
@Override public void onRpcAvailable(final Collection<DOMRpcIdentifier> rpcs) { checkArgument(rpcs != null, "Input Collection of DOMRpcIdentifier can not be null."); LOG.debug("Adding registration for [{}]", rpcs); rpcRegistry.tell(new AddOrUpdateRoutes(rpcs), ActorRef.noSender()); }
OpsListener implements DOMRpcAvailabilityListener, DOMActionAvailabilityExtension.AvailabilityListener { @Override public void onRpcAvailable(final Collection<DOMRpcIdentifier> rpcs) { checkArgument(rpcs != null, "Input Collection of DOMRpcIdentifier can not be null."); LOG.debug("Adding registration for [{}]", rpcs); rpcRegistry.tell(new AddOrUpdateRoutes(rpcs), ActorRef.noSender()); } }
OpsListener implements DOMRpcAvailabilityListener, DOMActionAvailabilityExtension.AvailabilityListener { @Override public void onRpcAvailable(final Collection<DOMRpcIdentifier> rpcs) { checkArgument(rpcs != null, "Input Collection of DOMRpcIdentifier can not be null."); LOG.debug("Adding registration for [{}]", rpcs); rpcRegistry.tell(new AddOrUpdateRoutes(rpcs), ActorRef.noSender()); } OpsListener(final ActorRef rpcRegistry, final ActorRef actionRegistry); }
OpsListener implements DOMRpcAvailabilityListener, DOMActionAvailabilityExtension.AvailabilityListener { @Override public void onRpcAvailable(final Collection<DOMRpcIdentifier> rpcs) { checkArgument(rpcs != null, "Input Collection of DOMRpcIdentifier can not be null."); LOG.debug("Adding registration for [{}]", rpcs); rpcRegistry.tell(new AddOrUpdateRoutes(rpcs), ActorRef.noSender()); } OpsListener(final ActorRef rpcRegistry, final ActorRef actionRegistry); @Override void onRpcAvailable(final Collection<DOMRpcIdentifier> rpcs); @Override void onRpcUnavailable(final Collection<DOMRpcIdentifier> rpcs); @Override boolean acceptsImplementation(final DOMRpcImplementation impl); @Override boolean acceptsImplementation(final DOMActionImplementation impl); @Override void onActionsChanged(final Set<DOMActionInstance> removed, final Set<DOMActionInstance> added); }
OpsListener implements DOMRpcAvailabilityListener, DOMActionAvailabilityExtension.AvailabilityListener { @Override public void onRpcAvailable(final Collection<DOMRpcIdentifier> rpcs) { checkArgument(rpcs != null, "Input Collection of DOMRpcIdentifier can not be null."); LOG.debug("Adding registration for [{}]", rpcs); rpcRegistry.tell(new AddOrUpdateRoutes(rpcs), ActorRef.noSender()); } OpsListener(final ActorRef rpcRegistry, final ActorRef actionRegistry); @Override void onRpcAvailable(final Collection<DOMRpcIdentifier> rpcs); @Override void onRpcUnavailable(final Collection<DOMRpcIdentifier> rpcs); @Override boolean acceptsImplementation(final DOMRpcImplementation impl); @Override boolean acceptsImplementation(final DOMActionImplementation impl); @Override void onActionsChanged(final Set<DOMActionInstance> removed, final Set<DOMActionInstance> added);  }