@Test public void getHosts() { detect(HID1, MAC1, VLAN1, LOC1, IP1); detect(HID2, MAC2, VLAN1, LOC2, IP2); validateHosts("host not properly stored", mgr.getHosts(), HID1, HID2); validateHosts("can't get hosts by VLAN", mgr.getHostsByVlan(VLAN1), HID1, HID2); validateHosts("can't get hosts by MAC", mgr.getHostsByMac(MAC1), HID1); validateHosts("can't get hosts by IP", mgr.getHostsByIp(IP1), HID1); validateHosts("can't get hosts by location", mgr.getConnectedHosts(LOC1), HID1); assertTrue("incorrect host location", mgr.getConnectedHosts(DID2).isEmpty()); }
@Override public Iterable<Host> getHosts() { checkPermission(HOST_READ); return store.getHosts(); }
HostManager extends AbstractListenerProviderRegistry<HostEvent, HostListener, HostProvider, HostProviderService> implements HostService, HostAdminService, HostProviderRegistry { @Override public Iterable<Host> getHosts() { checkPermission(HOST_READ); return store.getHosts(); } }
HostManager extends AbstractListenerProviderRegistry<HostEvent, HostListener, HostProvider, HostProviderService> implements HostService, HostAdminService, HostProviderRegistry { @Override public Iterable<Host> getHosts() { checkPermission(HOST_READ); return store.getHosts(); }  }
HostManager extends AbstractListenerProviderRegistry<HostEvent, HostListener, HostProvider, HostProviderService> implements HostService, HostAdminService, HostProviderRegistry { @Override public Iterable<Host> getHosts() { checkPermission(HOST_READ); return store.getHosts(); }  @Activate void activate(); @Deactivate void deactivate(); @Override int getHostCount(); @Override Iterable<Host> getHosts(); @Override Host getHost(HostId hostId); @Override Set<Host> getHostsByVlan(VlanId vlanId); @Override Set<Host> getHostsByMac(MacAddress mac); @Override Set<Host> getHostsByIp(IpAddress ip); @Override Set<Host> getConnectedHosts(ConnectPoint connectPoint); @Override Set<Host> getConnectedHosts(DeviceId deviceId); @Override void startMonitoringIp(IpAddress ip); @Override void stopMonitoringIp(IpAddress ip); @Override void requestMac(IpAddress ip); @Override void removeHost(HostId hostId); }
HostManager extends AbstractListenerProviderRegistry<HostEvent, HostListener, HostProvider, HostProviderService> implements HostService, HostAdminService, HostProviderRegistry { @Override public Iterable<Host> getHosts() { checkPermission(HOST_READ); return store.getHosts(); }  @Activate void activate(); @Deactivate void deactivate(); @Override int getHostCount(); @Override Iterable<Host> getHosts(); @Override Host getHost(HostId hostId); @Override Set<Host> getHostsByVlan(VlanId vlanId); @Override Set<Host> getHostsByMac(MacAddress mac); @Override Set<Host> getHostsByIp(IpAddress ip); @Override Set<Host> getConnectedHosts(ConnectPoint connectPoint); @Override Set<Host> getConnectedHosts(DeviceId deviceId); @Override void startMonitoringIp(IpAddress ip); @Override void stopMonitoringIp(IpAddress ip); @Override void requestMac(IpAddress ip); @Override void removeHost(HostId hostId); static final String HOST_ID_NULL; }