Package org.onosproject.net
Class DefaultPort
- java.lang.Object
- 
- org.onosproject.net.AbstractAnnotated
- 
- org.onosproject.net.DefaultPort
 
 
- 
 public class DefaultPort extends AbstractAnnotated implements Port Default port implementation.
- 
- 
Field SummaryFields Modifier and Type Field Description static longDEFAULT_SPEEDDefault port speed in Mbps.
 - 
Constructor SummaryConstructors Constructor Description DefaultPort(Element element, PortNumber number, boolean isEnabled, Annotations... annotations)Creates a network element attributed to the specified provider.DefaultPort(Element element, PortNumber number, boolean isEnabled, Port.Type type, long portSpeed, Annotations... annotations)Creates a network element attributed to the specified provider.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Elementelement()Returns the parent network element to which this port belongs.booleanequals(java.lang.Object obj)inthashCode()booleanisEnabled()Indicates whether or not the port is currently up and active.PortNumbernumber()Returns the port number.longportSpeed()Returns the current port speed in Mbps.java.lang.StringtoString()Port.Typetype()Returns the port type.- 
Methods inherited from class org.onosproject.net.AbstractAnnotatedannotations
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.onosproject.net.Annotatedannotations
 
- 
 
- 
- 
- 
Field Detail- 
DEFAULT_SPEEDpublic static final long DEFAULT_SPEED Default port speed in Mbps.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
DefaultPortpublic DefaultPort(Element element, PortNumber number, boolean isEnabled, Annotations... annotations) Creates a network element attributed to the specified provider.- Parameters:
- element- parent network element
- number- port number
- isEnabled- indicator whether the port is up and active
- annotations- optional key/value annotations
 
 - 
DefaultPortpublic DefaultPort(Element element, PortNumber number, boolean isEnabled, Port.Type type, long portSpeed, Annotations... annotations) Creates a network element attributed to the specified provider.- Parameters:
- element- parent network element
- number- port number
- isEnabled- indicator whether the port is up and active
- type- port type
- portSpeed- port speed in Mbs
- annotations- optional key/value annotations
 
 
- 
 - 
Method Detail- 
elementpublic Element element() Description copied from interface:PortReturns the parent network element to which this port belongs.
 - 
numberpublic PortNumber number() Description copied from interface:PortReturns the port number.
 - 
isEnabledpublic boolean isEnabled() Description copied from interface:PortIndicates whether or not the port is currently up and active.
 - 
portSpeedpublic long portSpeed() Description copied from interface:PortReturns the current port speed in Mbps.
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-