Class DefaultTunnel

  • All Implemented Interfaces:
    Tunnel

    public class DefaultTunnel
    extends Object
    implements Tunnel
    Default Tunnel class.
    • Constructor Detail

      • DefaultTunnel

        public DefaultTunnel​(String tid,
                             List<Integer> labelIds)
        Creates a Tunnel reference.
        Parameters:
        tid - Tunnel ID
        labelIds - Label stack of the tunnel
      • DefaultTunnel

        public DefaultTunnel​(DefaultTunnel tunnel)
        Creates a new DefaultTunnel reference using the tunnel reference.
        Parameters:
        tunnel - DefaultTunnel reference
    • Method Detail

      • id

        public String id()
        Description copied from interface: Tunnel
        Returns the tunnel ID.
        Specified by:
        id in interface Tunnel
        Returns:
        tunnel ID
      • labelIds

        public List<Integer> labelIds()
        Description copied from interface: Tunnel
        Returns Segment IDs for the tunnel including source and destination.
        Specified by:
        labelIds in interface Tunnel
        Returns:
        List of Node ID
      • groupId

        public int groupId()
        Description copied from interface: Tunnel
        Returns the group ID for the tunnel.
        Specified by:
        groupId in interface Tunnel
        Returns:
        group ID
      • setGroupId

        public void setGroupId​(int id)
        Description copied from interface: Tunnel
        Sets group ID for the tunnel.
        Specified by:
        setGroupId in interface Tunnel
        Parameters:
        id - group identifier
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • isAllowedToRemoveGroup

        public boolean isAllowedToRemoveGroup()
        Description copied from interface: Tunnel
        Checks if it is allowed to remove the group for the tunnel.
        Specified by:
        isAllowedToRemoveGroup in interface Tunnel
        Returns:
        true if allowed, false otherwise
      • allowToRemoveGroup

        public void allowToRemoveGroup​(boolean b)
        Description copied from interface: Tunnel
        Sets the flag to allow to remove the group or not.
        Specified by:
        allowToRemoveGroup in interface Tunnel
        Parameters:
        b - the flag; true - allow to remove