@Test public void removeLink() { addLink(DID1, P1, DID2, P2, DIRECT); addLink(DID2, P2, DID1, P1, DIRECT); assertEquals("incorrect link count", 2, service.getLinkCount()); providerService.linkVanished(new DefaultLinkDescription(cp(DID1, P1), cp(DID2, P2), DIRECT)); validateEvents(LINK_REMOVED); assertEquals("incorrect link count", 1, service.getLinkCount()); assertNull("link should not be found", service.getLink(cp(DID1, P1), cp(DID2, P2))); assertNotNull("link should be found", service.getLink(cp(DID2, P2), cp(DID1, P1))); providerService.linkVanished(new DefaultLinkDescription(cp(DID1, P1), cp(DID2, P2), DIRECT)); assertEquals("no events expected", 0, listener.events.size()); }
@Override public void removeLink(ConnectPoint src, ConnectPoint dst) { post(store.removeLink(src, dst)); }
LinkManager extends AbstractListenerProviderRegistry<LinkEvent, LinkListener, LinkProvider, LinkProviderService> implements LinkService, LinkAdminService, LinkProviderRegistry { @Override public void removeLink(ConnectPoint src, ConnectPoint dst) { post(store.removeLink(src, dst)); } }
LinkManager extends AbstractListenerProviderRegistry<LinkEvent, LinkListener, LinkProvider, LinkProviderService> implements LinkService, LinkAdminService, LinkProviderRegistry { @Override public void removeLink(ConnectPoint src, ConnectPoint dst) { post(store.removeLink(src, dst)); }  }
LinkManager extends AbstractListenerProviderRegistry<LinkEvent, LinkListener, LinkProvider, LinkProviderService> implements LinkService, LinkAdminService, LinkProviderRegistry { @Override public void removeLink(ConnectPoint src, ConnectPoint dst) { post(store.removeLink(src, dst)); }  @Activate void activate(); @Deactivate void deactivate(); @Override int getLinkCount(); @Override Iterable<Link> getLinks(); @Override Iterable<Link> getActiveLinks(); @Override Set<Link> getDeviceLinks(DeviceId deviceId); @Override Set<Link> getDeviceEgressLinks(DeviceId deviceId); @Override Set<Link> getDeviceIngressLinks(DeviceId deviceId); @Override Set<Link> getLinks(ConnectPoint connectPoint); @Override Set<Link> getEgressLinks(ConnectPoint connectPoint); @Override Set<Link> getIngressLinks(ConnectPoint connectPoint); @Override Link getLink(ConnectPoint src, ConnectPoint dst); @Override void removeLinks(ConnectPoint connectPoint); @Override void removeLinks(DeviceId deviceId); @Override void removeLink(ConnectPoint src, ConnectPoint dst); }
LinkManager extends AbstractListenerProviderRegistry<LinkEvent, LinkListener, LinkProvider, LinkProviderService> implements LinkService, LinkAdminService, LinkProviderRegistry { @Override public void removeLink(ConnectPoint src, ConnectPoint dst) { post(store.removeLink(src, dst)); }  @Activate void activate(); @Deactivate void deactivate(); @Override int getLinkCount(); @Override Iterable<Link> getLinks(); @Override Iterable<Link> getActiveLinks(); @Override Set<Link> getDeviceLinks(DeviceId deviceId); @Override Set<Link> getDeviceEgressLinks(DeviceId deviceId); @Override Set<Link> getDeviceIngressLinks(DeviceId deviceId); @Override Set<Link> getLinks(ConnectPoint connectPoint); @Override Set<Link> getEgressLinks(ConnectPoint connectPoint); @Override Set<Link> getIngressLinks(ConnectPoint connectPoint); @Override Link getLink(ConnectPoint src, ConnectPoint dst); @Override void removeLinks(ConnectPoint connectPoint); @Override void removeLinks(DeviceId deviceId); @Override void removeLink(ConnectPoint src, ConnectPoint dst);  }