public interface TopologyService
Modifier and Type | Method and Description |
---|---|
void |
addListener(TopologyListener listener)
Registers a listener for only topology-related events.
|
TopologyCluster |
getCluster(DeviceId deviceId)
Retrieves the cluster in which the specified infrastructure devices is
located.
|
Set<DeviceId> |
getClusterDevices(TopologyCluster cluster)
Returns the set of devices contained within the specified cluster.
|
Set<TopologyCluster> |
getClusters()
Returns the set of clusters in the current topology.
|
Set<TopologyListener> |
getListeners()
Returns the set of listeners for topology-related events.
|
Set<Path> |
getPaths(DeviceId src,
DeviceId dst)
Returns all shortest paths between the specified source and destination
infrastructure devices, measuring link edge weight using hop count.
|
Set<Path> |
getPaths(DeviceId src,
DeviceId dst,
LinkWeight weight)
Returns all shortest paths between the specified source and destination
infrastructure devices using the supplied link edge weight function.
|
Topology |
getTopology()
Returns the current topology information.
|
boolean |
isBroadcastAllowed(ConnectionPoint point)
Indicates whether or not the specified connection point is allowed to
be used for traffic broadcast.
|
boolean |
isInfrastructure(ConnectionPoint point)
Indicates whether or not the specified connection point is part of
the infrastructure.
|
boolean |
pathExists(DeviceId src,
DeviceId dst)
Indicates, whether a path exists or not between two infrastructure devices
|
void |
removeListener(TopologyListener listener)
Unregisters a listener from topology-related events, regardless of which
topology-related events the listener was registered to receive.
|
Topology getTopology()
ServiceNotFoundException
- if no topology has been computed yetboolean pathExists(DeviceId src, DeviceId dst)
src
- id of the source devicedst
- if of the destination deviceSet<Path> getPaths(DeviceId src, DeviceId dst)
src
- id of the source devicedst
- if of the destination deviceSet<Path> getPaths(DeviceId src, DeviceId dst, LinkWeight weight)
The LinkWeight.weight(com.hp.sdn.model.Link)
may return a
negative number to indicate that any path traversing that link should
be considered as not viable.
src
- id of the source devicedst
- if of the destination deviceweight
- link edge weight functionboolean isInfrastructure(ConnectionPoint point)
point
- connection point to testboolean isBroadcastAllowed(ConnectionPoint point)
point
- connection point to testSet<TopologyCluster> getClusters()
TopologyCluster
TopologyCluster getCluster(DeviceId deviceId)
deviceId
- id of the infrastructure deviceSet<DeviceId> getClusterDevices(TopologyCluster cluster)
cluster
- topology clustervoid addListener(TopologyListener listener)
listener
- the event listenervoid removeListener(TopologyListener listener)
listener
- the event listenerIllegalArgumentException
- if the listener was not registeredSet<TopologyListener> getListeners()
Copyright © 2016. All Rights Reserved.