Package org.onosproject.segmentrouting
Class DefaultTunnel
- java.lang.Object
-
- org.onosproject.segmentrouting.DefaultTunnel
-
-
Constructor Summary
Constructors Constructor Description DefaultTunnel(String tid, List<Integer> labelIds)Creates a Tunnel reference.DefaultTunnel(DefaultTunnel tunnel)Creates a new DefaultTunnel reference using the tunnel reference.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidallowToRemoveGroup(boolean b)Sets the flag to allow to remove the group or not.booleanequals(Object o)intgroupId()Returns the group ID for the tunnel.inthashCode()Stringid()Returns the tunnel ID.booleanisAllowedToRemoveGroup()Checks if it is allowed to remove the group for the tunnel.List<Integer>labelIds()Returns Segment IDs for the tunnel including source and destination.voidsetGroupId(int id)Sets group ID for the tunnel.
-
-
-
Constructor Detail
-
DefaultTunnel
public DefaultTunnel(String tid, List<Integer> labelIds)
Creates a Tunnel reference.- Parameters:
tid- Tunnel IDlabelIds- 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
-
labelIds
public List<Integer> labelIds()
Description copied from interface:TunnelReturns Segment IDs for the tunnel including source and destination.
-
groupId
public int groupId()
Description copied from interface:TunnelReturns the group ID for the tunnel.
-
setGroupId
public void setGroupId(int id)
Description copied from interface:TunnelSets group ID for the tunnel.- Specified by:
setGroupIdin interfaceTunnel- Parameters:
id- group identifier
-
isAllowedToRemoveGroup
public boolean isAllowedToRemoveGroup()
Description copied from interface:TunnelChecks if it is allowed to remove the group for the tunnel.- Specified by:
isAllowedToRemoveGroupin interfaceTunnel- Returns:
- true if allowed, false otherwise
-
allowToRemoveGroup
public void allowToRemoveGroup(boolean b)
Description copied from interface:TunnelSets the flag to allow to remove the group or not.- Specified by:
allowToRemoveGroupin interfaceTunnel- Parameters:
b- the flag; true - allow to remove
-
-