Class ConnectPoint

    • Constructor Detail

      • ConnectPoint

        public ConnectPoint​(ElementId elementId,
                            PortNumber portNumber)
        Creates a new connection point.
        Parameters:
        elementId - network element identifier
        portNumber - port number
    • Method Detail

      • elementId

        public ElementId elementId()
        Returns the network element identifier.
        Returns:
        element identifier
      • deviceId

        public DeviceId deviceId()
        Returns the identifier of the infrastructure device if the connection point belongs to a network element which is indeed an infrastructure device.
        Returns:
        network element identifier as a device identifier
        Throws:
        IllegalStateException - if connection point is not associated with a device
      • hostId

        public HostId hostId()
        Returns the identifier of the infrastructure device if the connection point belongs to a network element which is indeed an end-station host.
        Returns:
        network element identifier as a host identifier
        Throws:
        IllegalStateException - if connection point is not associated with a host
      • ipElementId

        public IpElementId ipElementId()
        Returns the identifier of the infrastructure device if the connection point belongs to a network element which is indeed an ip of pcc client identifier.
        Returns:
        network element identifier as a pcc client identifier
        Throws:
        IllegalStateException - if connection point is not associated with a pcc client
      • port

        public PortNumber port()
        Returns the connection port number.
        Returns:
        port number
      • deviceConnectPoint

        public static ConnectPoint deviceConnectPoint​(String string)
        Parse a device connect point from a string. The connect point should be in the format "deviceUri/portNumber".
        Parameters:
        string - string to parse
        Returns:
        a ConnectPoint based on the information in the string.
      • hostConnectPoint

        public static ConnectPoint hostConnectPoint​(String string)
        Parse a host connect point from a string. The connect point should be in the format "hostId/vlanId/portNumber".
        Parameters:
        string - string to parse
        Returns:
        a ConnectPoint based on the information in the string.
      • fromString

        public static ConnectPoint fromString​(String string)
        Parse a device connect point from a string. The connect point should be in the same format as toString output.
        Parameters:
        string - string to parse
        Returns:
        a ConnectPoint based on the information in the string.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object