Package org.onosproject.net.driver
Interface Projectable
-
- All Known Subinterfaces:
Device
,DisjointPath
,EdgeLink
,Element
,ForwardingDevice
,Host
,HostProbe
,Link
,Path
- All Known Implementing Classes:
AbstractElement
,AbstractProjectableModel
,DefaultDevice
,DefaultDisjointPath
,DefaultEdgeLink
,DefaultHost
,DefaultLink
,DefaultPath
@Beta public interface Projectable
Abstraction of an entity capable of being projected as another entity.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <B extends Behaviour>
Bas(Class<B> projectionClass)
Returns the specified projection of this entity if such projection is supported.<B extends Behaviour>
booleanis(Class<B> projectionClass)
Returns true if this entity is capable of being projected as the specified class.default <B extends Behaviour>
Optional<B>project(Class<B> projectionClass)
Returns the specified projection of this entity if such projection is supported.
-
-
-
Method Detail
-
as
<B extends Behaviour> B as(Class<B> projectionClass)
Returns the specified projection of this entity if such projection is supported.- Type Parameters:
B
- type of behaviour- Parameters:
projectionClass
- requested projection class- Returns:
- projection instance
- Throws:
IllegalStateException
- if a driver cannot be foundIllegalArgumentException
- if the projection is not supported
-
is
<B extends Behaviour> boolean is(Class<B> projectionClass)
Returns true if this entity is capable of being projected as the specified class.- Type Parameters:
B
- type of behaviour- Parameters:
projectionClass
- requested projection class- Returns:
- true if the requested projection is supported
-
-