@Beta public interface TunnelService extends ListenerService<TunnelEvent,TunnelListener>
Modifier and Type | Method and Description |
---|---|
java.util.Collection<Tunnel> |
borrowTunnel(ApplicationId consumerId,
TunnelEndPoint src,
TunnelEndPoint dst,
Annotations... annotations)
Borrows all tunnels between source and destination.
|
java.util.Collection<Tunnel> |
borrowTunnel(ApplicationId consumerId,
TunnelEndPoint src,
TunnelEndPoint dst,
Tunnel.Type type,
Annotations... annotations)
Borrows all specified type tunnels between source and destination.
|
Tunnel |
borrowTunnel(ApplicationId consumerId,
TunnelId tunnelId,
Annotations... annotations)
Borrows a specific tunnel.
|
java.util.Collection<Tunnel> |
borrowTunnel(ApplicationId consumerId,
TunnelName tunnelName,
Annotations... annotations)
Borrows a specific tunnel by tunnelName.
|
boolean |
downTunnel(ApplicationId producerId,
TunnelId tunnelId)
Triggers removal of specified tunnel.
|
java.lang.Iterable<Tunnel> |
getTunnels(DeviceId deviceId)
Returns the collection of tunnels applied on the specified device.
|
java.util.Collection<Tunnel> |
queryAllTunnels()
Returns all tunnels.
|
java.util.Collection<Tunnel> |
queryTunnel(Tunnel.Type type)
Returns all specified type tunnels.
|
java.util.Collection<Tunnel> |
queryTunnel(TunnelEndPoint src,
TunnelEndPoint dst)
Returns all tunnels between source point and destination point.
|
Tunnel |
queryTunnel(TunnelId tunnelId)
Returns a tunnel by a specific tunnel identity.
|
java.util.Collection<TunnelSubscription> |
queryTunnelSubscription(ApplicationId consumerId)
Returns all tunnel subscription record by consumer.
|
boolean |
returnTunnel(ApplicationId consumerId,
TunnelEndPoint src,
TunnelEndPoint dst,
Annotations... annotations)
Returns all tunnels between source and destination back the store.
|
boolean |
returnTunnel(ApplicationId consumerId,
TunnelEndPoint src,
TunnelEndPoint dst,
Tunnel.Type type,
Annotations... annotations)
Returns all specific type tunnels between source and destination back
store.
|
boolean |
returnTunnel(ApplicationId consumerId,
TunnelId tunnelId,
Annotations... annotations)
Returns back a specific tunnel to store.
|
boolean |
returnTunnel(ApplicationId consumerId,
TunnelName tunnelName,
Annotations... annotations)
Returns all specific name tunnel back store.
|
TunnelId |
setupTunnel(ApplicationId producerId,
ElementId srcElementId,
Tunnel tunnel,
Path path)
Creates a tunnel with given path and default initial state.
|
int |
tunnelCount()
Returns all tunnels.
|
addListener, removeListener
Tunnel borrowTunnel(ApplicationId consumerId, TunnelId tunnelId, Annotations... annotations)
consumerId
- a tunnel consumertunnelId
- tunnel identify generated by onosannotations
- Annotationsjava.util.Collection<Tunnel> borrowTunnel(ApplicationId consumerId, TunnelName tunnelName, Annotations... annotations)
consumerId
- a tunnel consumertunnelName
- tunnel nameannotations
- Annotationsjava.util.Collection<Tunnel> borrowTunnel(ApplicationId consumerId, TunnelEndPoint src, TunnelEndPoint dst, Annotations... annotations)
consumerId
- a tunnel consumersrc
- a source point of tunnel.dst
- a destination point of tunnelannotations
- Annotationsjava.util.Collection<Tunnel> borrowTunnel(ApplicationId consumerId, TunnelEndPoint src, TunnelEndPoint dst, Tunnel.Type type, Annotations... annotations)
consumerId
- a tunnel consumersrc
- a source point of tunnel.dst
- a destination point of tunneltype
- tunnel typeannotations
- AnnotationsTunnelId setupTunnel(ApplicationId producerId, ElementId srcElementId, Tunnel tunnel, Path path)
producerId
- a tunnel producersrcElementId
- element id of the sourcetunnel
- to be createdpath
- path of the tunnelboolean downTunnel(ApplicationId producerId, TunnelId tunnelId)
producerId
- a tunnel producertunnelId
- identity for the tunnel to be triggered for removalboolean returnTunnel(ApplicationId consumerId, TunnelId tunnelId, Annotations... annotations)
consumerId
- a tunnel consumertunnelId
- tunnel identify generated by ONOSannotations
- Annotationsboolean returnTunnel(ApplicationId consumerId, TunnelName tunnelName, Annotations... annotations)
consumerId
- a tunnel consumertunnelName
- tunnel nameannotations
- Annotationsboolean returnTunnel(ApplicationId consumerId, TunnelEndPoint src, TunnelEndPoint dst, Tunnel.Type type, Annotations... annotations)
consumerId
- a tunnel consumersrc
- a source point of tunnel.dst
- a destination point of tunneltype
- tunnel typeannotations
- Annotationsboolean returnTunnel(ApplicationId consumerId, TunnelEndPoint src, TunnelEndPoint dst, Annotations... annotations)
consumerId
- a tunnel consumersrc
- a source point of tunnel.dst
- a destination point of tunnel.annotations
- AnnotationsTunnel queryTunnel(TunnelId tunnelId)
tunnelId
- tunnel identify generated by tunnel producerjava.util.Collection<TunnelSubscription> queryTunnelSubscription(ApplicationId consumerId)
consumerId
- consumer identityjava.util.Collection<Tunnel> queryTunnel(Tunnel.Type type)
type
- tunnel typejava.util.Collection<Tunnel> queryTunnel(TunnelEndPoint src, TunnelEndPoint dst)
src
- a source point of tunnel.dst
- a destination point of tunnel.java.util.Collection<Tunnel> queryAllTunnels()
int tunnelCount()