Package org.onosproject.ui
Class UiTopoOverlay
- java.lang.Object
-
- org.onosproject.ui.UiTopoOverlay
-
public class UiTopoOverlay extends java.lang.Object
Represents user interface topology view overlay.This base class does little more than provide a logger and an identifier. Subclasses will probably want to override some or all of the base methods to do useful things during the life-cycle of the overlay.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
log
Logger for this overlay.
-
Constructor Summary
Constructors Constructor Description UiTopoOverlay(java.lang.String id)
Creates a new user interface topology view overlay descriptor, with the given identifier.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
activate()
Callback invoked when this overlay is activated.java.util.Map<java.lang.String,java.lang.String>
additionalLinkData(LinkEvent event)
Deprecated.this is a temporary addition for Goldeneye (1.6) release, and is superceded by use ofmodifyEdgeLinkDetails(org.onosproject.ui.topo.PropertyPanel, org.onosproject.net.HostId, org.onosproject.net.ConnectPoint)
andmodifyInfraLinkDetails(org.onosproject.ui.topo.PropertyPanel, org.onosproject.net.ConnectPoint, org.onosproject.net.ConnectPoint)
.void
deactivate()
Callback invoked when this overlay is deactivated.void
destroy()
Callback invoked to destroy this instance by cleaning up any internal state ready for garbage collection.java.lang.String
id()
Returns the identifier for this overlay.void
init()
Callback invoked to initialize this overlay, soon after creation.boolean
isActive()
Returns true if this overlay is currently active.void
modifyDeviceDetails(PropertyPanel pp, DeviceId deviceId)
Callback to modify the contents of the details panel for a selected device.void
modifyEdgeLinkDetails(PropertyPanel pp, HostId hostId, ConnectPoint cp)
Callback to modify the contents of the details panel for a selected edge link.void
modifyHostDetails(PropertyPanel pp, HostId hostId)
Callback to modify the contents of the details panel for a selected host.void
modifyInfraLinkDetails(PropertyPanel pp, ConnectPoint cpA, ConnectPoint cpB)
Callback to modify the contents of the details panel for a selected infrastructure link.void
modifySummary(PropertyPanel pp)
Callback to modify the contents of the summary panel.
-
-
-
Method Detail
-
id
public java.lang.String id()
Returns the identifier for this overlay.- Returns:
- the identifier
-
init
public void init()
Callback invoked to initialize this overlay, soon after creation. This default implementation does nothing.
-
activate
public void activate()
Callback invoked when this overlay is activated.
-
deactivate
public void deactivate()
Callback invoked when this overlay is deactivated.
-
isActive
public boolean isActive()
Returns true if this overlay is currently active.- Returns:
- true if overlay active
-
destroy
public void destroy()
Callback invoked to destroy this instance by cleaning up any internal state ready for garbage collection. This default implementation holds no state and does nothing.
-
modifySummary
public void modifySummary(PropertyPanel pp)
Callback to modify the contents of the summary panel. This default implementation does nothing.- Parameters:
pp
- property panel model of summary data
-
modifyDeviceDetails
public void modifyDeviceDetails(PropertyPanel pp, DeviceId deviceId)
Callback to modify the contents of the details panel for a selected device. This default implementation does nothing.- Parameters:
pp
- property panel model of device datadeviceId
- device id
-
modifyHostDetails
public void modifyHostDetails(PropertyPanel pp, HostId hostId)
Callback to modify the contents of the details panel for a selected host. This default implementation does nothing.- Parameters:
pp
- property panel model of host datahostId
- host id
-
modifyEdgeLinkDetails
public void modifyEdgeLinkDetails(PropertyPanel pp, HostId hostId, ConnectPoint cp)
Callback to modify the contents of the details panel for a selected edge link. The parameters include identifiers for the host and the connect point (device and port) to which the host is connected.This default implementation does nothing.
- Parameters:
pp
- property panel model of edge link datahostId
- host IDcp
- connect point
-
modifyInfraLinkDetails
public void modifyInfraLinkDetails(PropertyPanel pp, ConnectPoint cpA, ConnectPoint cpB)
Callback to modify the contents of the details panel for a selected infrastructure link. The parameters include the two connect points at either end of the link.Note that links in the topology view are (usually) "bi-directional", meaning that both A-->B and B-->A backing links exist. If, however, there is only one backing link, it is guaranteed to be A-->B.
This default implementation does nothing.
- Parameters:
pp
- property panel model of infrastructure link datacpA
- connect point AcpB
- connect point B
-
additionalLinkData
@Deprecated public java.util.Map<java.lang.String,java.lang.String> additionalLinkData(LinkEvent event)
Deprecated.this is a temporary addition for Goldeneye (1.6) release, and is superceded by use ofmodifyEdgeLinkDetails(org.onosproject.ui.topo.PropertyPanel, org.onosproject.net.HostId, org.onosproject.net.ConnectPoint)
andmodifyInfraLinkDetails(org.onosproject.ui.topo.PropertyPanel, org.onosproject.net.ConnectPoint, org.onosproject.net.ConnectPoint)
.Callback invoked when a link event is processed (e.g. link added). A subclass may override this method to return a map of property key/value pairs to be included in the JSON event back to the client, so that those additional properties are available to be displayed as link details.The default implementation returns
null
, that is, no additional properties to be added.- Parameters:
event
- the link event- Returns:
- map of additional key/value pairs to be added to the JSON event
-
-