Interface HostService

    • Method Detail

      • getHostCount

        int getHostCount()
        Returns the number of end-station hosts known to the system.
        Returns:
        number of end-station hosts
      • getHosts

        java.lang.Iterable<Host> getHosts()
        Returns a collection of all end-station hosts.
        Returns:
        collection of hosts
      • getHost

        Host getHost​(HostId hostId)
        Returns the host with the specified identifier.
        Parameters:
        hostId - host identifier
        Returns:
        host or null if one with the given identifier is not known
      • getHostsByVlan

        java.util.Set<Host> getHostsByVlan​(VlanId vlanId)
        Returns the set of hosts that belong to the specified VLAN.
        Parameters:
        vlanId - vlan identifier
        Returns:
        set of hosts in the given vlan id
      • getHostsByMac

        java.util.Set<Host> getHostsByMac​(MacAddress mac)
        Returns the set of hosts that have the specified MAC address.
        Parameters:
        mac - mac address
        Returns:
        set of hosts with the given mac
      • getHostsByIp

        java.util.Set<Host> getHostsByIp​(IpAddress ip)
        Returns the set of hosts that have the specified IP address.
        Parameters:
        ip - ip address
        Returns:
        set of hosts with the given IP
      • getConnectedHosts

        java.util.Set<Host> getConnectedHosts​(ConnectPoint connectPoint)
        Returns the set of hosts that attach to the specified connection point.
        Parameters:
        connectPoint - connection point
        Returns:
        set of hosts connected to the connection point
      • getConnectedHosts

        default java.util.Set<Host> getConnectedHosts​(ConnectPoint connectPoint,
                                                      boolean matchAuxLocations)
        Returns the set of host that attach to the specified connect point.
        Parameters:
        connectPoint - connect point
        matchAuxLocations - true to match on the auxLocations, false to match on locations of the hosts
        Returns:
        set of hosts connected to the connection point
      • getConnectedHosts

        java.util.Set<Host> getConnectedHosts​(DeviceId deviceId)
        Returns the set of hosts that attach to the specified device.
        Parameters:
        deviceId - device identifier
        Returns:
        set of hosts connected to the device
      • startMonitoringIp

        void startMonitoringIp​(IpAddress ip)
        Requests the host service to monitor hosts with the given IP address and notify listeners of changes.
        Parameters:
        ip - IP address of the host to monitor
      • stopMonitoringIp

        void stopMonitoringIp​(IpAddress ip)
        Stops the host service from monitoring an IP address.
        Parameters:
        ip - IP address to stop monitoring
      • requestMac

        void requestMac​(IpAddress ip)
        Requests the host service to resolve the MAC address for the given IP address. This will trigger a notification to the host listeners if the MAC address is found.
        Parameters:
        ip - IP address to find the MAC address for