Package org.onosproject.net
Class DefaultLink
- java.lang.Object
-
- org.onosproject.net.AbstractAnnotated
-
- org.onosproject.net.AbstractModel
-
- org.onosproject.net.AbstractProjectableModel
-
- org.onosproject.net.DefaultLink
-
- All Implemented Interfaces:
Annotated
,Projectable
,Link
,NetworkResource
,Provided
- Direct Known Subclasses:
DefaultEdgeLink
,DefaultPath
public class DefaultLink extends AbstractProjectableModel implements Link
Default infrastructure link model implementation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultLink.Builder
Builder for DefaultLink objects.-
Nested classes/interfaces inherited from class org.onosproject.net.AbstractProjectableModel
AbstractProjectableModel.AnnotationDriverData
-
Nested classes/interfaces inherited from interface org.onosproject.net.Link
Link.State, Link.Type
-
-
Field Summary
-
Fields inherited from class org.onosproject.net.AbstractProjectableModel
NO_DRIVER, NO_DRIVER_SERVICE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultLink(ProviderId providerId, ConnectPoint src, ConnectPoint dst, Link.Type type, Link.State state, Annotations... annotations)
Creates an infrastructure link using the supplied information.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultLink.Builder
builder()
Creates a new default link builder.ConnectPoint
dst()
Returns the link destination connection point.boolean
equals(java.lang.Object obj)
int
hashCode()
boolean
isExpected()
Indicates if the link was created from a predefined configuration.ConnectPoint
src()
Returns the link source connection point.Link.State
state()
Returns the link state.java.lang.String
toString()
Link.Type
type()
Returns the link type.-
Methods inherited from class org.onosproject.net.AbstractProjectableModel
as, asData, bindAndCheckDriver, bindDriver, driver, driverService, is, locateDriver, setDriverService
-
Methods inherited from class org.onosproject.net.AbstractModel
providerId
-
Methods inherited from class org.onosproject.net.AbstractAnnotated
annotations
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.onosproject.net.Annotated
annotations
-
Methods inherited from interface org.onosproject.net.driver.Projectable
as, is, project
-
Methods inherited from interface org.onosproject.net.Provided
providerId
-
-
-
-
Constructor Detail
-
DefaultLink
protected DefaultLink(ProviderId providerId, ConnectPoint src, ConnectPoint dst, Link.Type type, Link.State state, Annotations... annotations)
Creates an infrastructure link using the supplied information.- Parameters:
providerId
- provider identitysrc
- link sourcedst
- link destinationtype
- link typestate
- link stateannotations
- optional key/value annotations
-
-
Method Detail
-
src
public ConnectPoint src()
Description copied from interface:Link
Returns the link source connection point.
-
dst
public ConnectPoint dst()
Description copied from interface:Link
Returns the link destination connection point.
-
state
public Link.State state()
Description copied from interface:Link
Returns the link state.
-
isExpected
public boolean isExpected()
Description copied from interface:Link
Indicates if the link was created from a predefined configuration.- Specified by:
isExpected
in interfaceLink
- Returns:
- true if the link was created from a predefined configuration, false otherwise.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
builder
public static DefaultLink.Builder builder()
Creates a new default link builder.- Returns:
- default link builder
-
-