Package casa.lepton

Class OppNetGraph

java.lang.Object
org.graphstream.graph.implementations.AbstractElement
org.graphstream.graph.implementations.AbstractGraph
org.graphstream.graph.implementations.AdjacencyListGraph
org.graphstream.graph.implementations.MultiGraph
casa.lepton.OppNetGraph
All Implemented Interfaces:
OppNet, OppNetEventsSource, Closeable, AutoCloseable, Iterable<org.graphstream.graph.Node>, Runnable, org.graphstream.graph.Element, org.graphstream.graph.Graph, org.graphstream.graph.Structure, org.graphstream.stream.AttributeSink, org.graphstream.stream.ElementSink, org.graphstream.stream.Pipe, org.graphstream.stream.Replayable, org.graphstream.stream.Sink, org.graphstream.stream.Source
Direct Known Subclasses:
OppNetGraphDGS, OppNetGraphWalk

public class OppNetGraph extends org.graphstream.graph.implementations.MultiGraph implements OppNet, Runnable, Closeable
A OppNetGraph represents a network composed of devices (OppNode) linked by edges (OppEdge) representing actual or possible connections between them. Multiple edges can exist between two nodes, each edge representing a connection between the nodes through a specific connectivity type (OppEdge.getConnectivityType()), provided both nodes support the connectivity type (OppNode.hasConnectivityType(String)). The graph is dynamic: it is runnable (play() and stop() methods). At each step, its nodes move and edges are updated accordingly: edges are added (resp. removed) if the nodes are (resp. no more) in mutual radio range according to their connectivity types (areInRange(OppNode, OppNode, String)). The steps are characterized by a simulation time. The simulation can run in real time or not (accelerated or slowed down). This class has two main subclasses: OppNetGraphDGS if the simulation is run according to an input DGS file and OppNetGraphWalk if the simulation is run according to a mobility model (see Walk).
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.graphstream.graph.implementations.AdjacencyListGraph

    org.graphstream.graph.implementations.AdjacencyListGraph.EdgeIterator<T extends org.graphstream.graph.Edge>, org.graphstream.graph.implementations.AdjacencyListGraph.NodeIterator<T extends org.graphstream.graph.Node>

    Nested classes/interfaces inherited from class org.graphstream.graph.implementations.AbstractElement

    org.graphstream.graph.implementations.AbstractElement.AttributeChangeEvent

    Nested classes/interfaces inherited from interface org.graphstream.stream.Replayable

    org.graphstream.stream.Replayable.Controller
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected casa.util.geom.AreaCar
     
     
    protected OppNetConsole
     
    protected long
     
    protected String
     
    protected final PrintWriter
     
    protected final long
     
    protected OppEdgeFactory
     
     
    protected OppNetFrame
     
    protected final casa.dgs.DGSAttributes
     
    protected boolean
     
    protected Hub
     
    protected long
     
    protected final boolean
     
    protected OppNodeFactory
     
     
    protected OppNetRules
     
    protected OppNetOutput
     
    protected final long
     
    protected final OppNetProperties
     
    protected long
     
    protected boolean
     
    protected Thread
     
    protected TimeZone
     

    Fields inherited from class org.graphstream.graph.implementations.AdjacencyListGraph

    DEFAULT_EDGE_CAPACITY, DEFAULT_NODE_CAPACITY, edgeArray, edgeCount, edgeMap, GROW_FACTOR, nodeArray, nodeCount, nodeMap

    Fields inherited from class org.graphstream.graph.implementations.AbstractElement

    attributes, attributesBeingRemoved, id

    Fields inherited from interface casa.lepton.OppNet

    EDGE_ADDED, EDGE_CHANGED, EDGE_REMOVED, NODE_ADDED, NODE_MOVED, NODE_REMOVED
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    OppNetGraph(String networkId, OppNetProperties props)
    Graph attributes initialization from the given properties.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addConnectivityType(String nodeId, String connectivityType)
    Add a new connectivity type for the node and update edges accordingly.
    addEdge(String id, org.graphstream.graph.Node node1, org.graphstream.graph.Node node2)
     
    addEdge(String id, org.graphstream.graph.Node node1, org.graphstream.graph.Node node2, boolean directed)
     
    void
    addEdgeListener(String nodeId, String connectivityType, OppEdgeListener listener)
    Add a new listener interested in edge events for the given node.
    void
    addNode(String nodeId, String profile)
    Add a new node in the OppNet.
    void
    Add a new listener interested in node events for a specific node.
    boolean
    areNeighbors(String nodeId1, String nodeId2, String connectivityType, String edgeStatus)
    Returns true if there is an edge with the node for the given connectivity type and status.
    void
    Stops playing the simulation and close all resources.
    void
    Remove a node from the OppNet.
    double
    Give the simulation current acceleration
    casa.util.geom.AreaCar
    Give the graph area.
    casa.dgs.DGSAttributes
     
    Give the console
     
     
    long
    Gives the current step.
    long
    Gives the current simulation time, extrapolated according to the real time and the real start time, if the simulation is running.
    getEdgeStatus(String nodeId1, String nodeId2, String connectivityType)
    Give the status of an edge charaterized by the nodes' ids and the connectivity type.
    Give the hub
    getLabel(String nodeId)
    Give the label of the node
    getNeighbors(String nodeId, String connectivityType, String edgeStatus)
    Give the neighbors' ids of the node for a given connectivity type and status.
    getNeighborsNodes(String nodeId, String connectivityType, String edgeStatus)
    Give the neighbor nodes of the node for a given connectivity type and status.
    Give the nodes in the OppNet.
    getNodeStatus(String nodeId, String connectivityType)
    Give the status of a node for a given connectivity type.
    long
     
    getTag(String nodeId)
    Give the tag of the node.
    Give the timezone of the step times
    boolean
    Return true if a console is provided to access the graph
    boolean
    Return true if the simulation has more steps to run
    boolean
    isNode(String nodeId)
    Check whether the node exists in the OppNet.
    boolean
    isOnline(String nodeId)
    Give the on/offline status of the node.
    void
    Waits until the simulation is stopped.
    protected final void
    logDGS(String line)
    Write a DGS line preceded by a 'st' line if needed in the dgsWriter, if it is not null.
    makeEdgeId(String id1, String id2, String connectivityType)
    Give a unique edge id from the given nodes ids and connectivityType in the form "idA-idB:type" where idA = min(id1,id2) and idB = max(id1,id2).
    Make a unique instance of the frame that displays the graph if OppNetProperties.isShow() is true
    Make a unique instance of OppNetOutput, that produces a video of the simulation if OppNetProperties.getVideoImgDir() is not null
    int
    nbNeighbors(String nodeId, String connectivityType, String edgeStatus)
    Returns the number of neighbors of the node for the given connectivity type and status.
    protected void
     
    protected void
     
    void
    Starts playing the simulation.
    protected void
    println(PrintWriter writer, String line)
    Write a line in the given writer, if it is not null
    protected void
     
    void
    removeConnectivityType(String nodeId, String connectivityType)
    Remove a connectivity type for the node and update edges accordingly.
     
    removeEdge(org.graphstream.graph.Edge e)
     
    void
    removeEdgeListener(String nodeId, String connectivityType)
    Remove a listener interested in edge events for the given node.
    void
    Remove a listener interested in node events.
    void
    run()
    Run simulation steps separated by the period given at object's instanciation.
    void
    setAccel(double newAccel)
    Change the acceleration and reset the startTime accordingly.
    final void
    setArea(casa.util.geom.AreaCar area)
    Set the graph area.
    boolean
    setEdgeStatus(String nodeId1, String nodeId2, String connectivityType, String status)
    Change the status of an edge charaterized by the nodes' ids and the connectivity type.
    void
    setLabel(String nodeId, String label)
    Change the label of the node
    void
    setNodeStatus(String nodeId, String connectivityType, String status)
    Change the status of a node for a given connectivity type.
    void
    setOnline(String nodeId, boolean online)
    Change the on/offline status of the node and update edges accordingly.
    void
    setTag(String nodeId, String tag)
    Set the given tag to the node.
    boolean
    Run a simulation step: move nodes and update edges accordingly, and wait for the next step time
    void
    Stops playing the simulation.
    protected void
     
    protected void
    waitUntil(long step)
    Wait until the given step, with the accel factor.

    Methods inherited from class org.graphstream.graph.implementations.AdjacencyListGraph

    addEdgeCallback, addNodeCallback, clearCallback, getEdge, getEdge, getEdgeCount, getEdgeIterator, getNode, getNode, getNodeCount, getNodeIterator, removeEdgeCallback, removeNodeCallback

    Methods inherited from class org.graphstream.graph.implementations.AbstractGraph

    addAttributeSink, addEdge, addEdge, addEdge, addEdge, addEdge, addElementSink, addNode, addSink, attributeChanged, attributeSinks, clear, clearAttributeSinks, clearElementSinks, clearSinks, display, display, edgeAdded, edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, edgeFactory, edgeRemoved, elementSinks, getEachEdge, getEachNode, getEdgeSet, getNodeSet, getReplayController, getStep, graphAttributeAdded, graphAttributeChanged, graphAttributeRemoved, graphCleared, isAutoCreationEnabled, isStrict, iterator, nodeAdded, nodeAttributeAdded, nodeAttributeChanged, nodeAttributeRemoved, nodeFactory, nodeRemoved, nullAttributesAreErrors, read, read, removeAttributeSink, removeEdge, removeEdge, removeEdge, removeEdge, removeEdge, removeElementSink, removeNode, removeNode, removeNode, removeNode, removeSink, setAutoCreate, setEdgeFactory, setNodeFactory, setNullAttributesAreErrors, setStrict, stepBegins, stepBegins, write, write

    Methods inherited from class org.graphstream.graph.implementations.AbstractElement

    addAttribute, addAttributes, changeAttribute, clearAttributes, clearAttributesWithNoEvent, getArray, getAttribute, getAttribute, getAttributeCount, getAttributeKeyIterator, getAttributeKeySet, getEachAttributeKey, getFirstAttributeOf, getFirstAttributeOf, getHash, getId, getIndex, getNumber, getVector, hasArray, hasAttribute, hasAttribute, hasHash, hasLabel, hasNumber, hasVector, removeAttribute, setAttribute, setIndex, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.graphstream.graph.Element

    addAttribute, addAttributes, changeAttribute, clearAttributes, getArray, getAttribute, getAttribute, getAttributeCount, getAttributeKeyIterator, getAttributeKeySet, getEachAttributeKey, getFirstAttributeOf, getFirstAttributeOf, getHash, getId, getIndex, getNumber, getVector, hasArray, hasAttribute, hasAttribute, hasHash, hasLabel, hasNumber, hasVector, removeAttribute, setAttribute

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Field Details

    • props

      protected final OppNetProperties props
    • dgsWriter

      protected final PrintWriter dgsWriter
    • lastLogTime

      protected long lastLogTime
    • duration

      protected final long duration
    • period

      protected final long period
    • makeEdges

      protected final boolean makeEdges
    • currentStep

      protected long currentStep
    • refTime

      protected long refTime
    • timezone

      protected TimeZone timezone
    • started

      protected boolean started
    • thread

      protected Thread thread
    • hasNext

      protected boolean hasNext
    • area

      protected casa.util.geom.AreaCar area
    • oppNetRules

      protected OppNetRules oppNetRules
    • connectivityProfiles

      protected ConnectivityProfiles connectivityProfiles
    • defaultConnectivityType

      protected String defaultConnectivityType
    • nodeFactory

      protected OppNodeFactory nodeFactory
    • edgeFactory

      protected OppEdgeFactory edgeFactory
    • console

      protected OppNetConsole console
    • hub

      protected Hub hub
    • edgeListeners

      protected Map<String,OppEdgeListener> edgeListeners
    • nodeListeners

      protected Map<String,OppNodeListener> nodeListeners
    • frame

      protected OppNetFrame frame
    • output

      protected OppNetOutput output
    • graphAttributes

      protected final casa.dgs.DGSAttributes graphAttributes
  • Constructor Details

    • OppNetGraph

      protected OppNetGraph(String networkId, OppNetProperties props) throws IOException
      Graph attributes initialization from the given properties.
      Parameters:
      networkId - the graph id
      props - the graph properties
      Throws:
      IOException - if an error occurs while opening the console
  • Method Details

    • getAttributes

      public casa.dgs.DGSAttributes getAttributes()
    • hasConsole

      public boolean hasConsole()
      Return true if a console is provided to access the graph
      Returns:
      true if there is a console
    • getConsole

      public OppNetConsole getConsole()
      Give the console
      Returns:
      the console
    • getHub

      public Hub getHub()
      Give the hub
      Returns:
      the hub
    • makeFrame

      public OppNetFrame makeFrame()
      Make a unique instance of the frame that displays the graph if OppNetProperties.isShow() is true
      Returns:
      the frame
    • makeOutput

      public OppNetOutput makeOutput()
      Make a unique instance of OppNetOutput, that produces a video of the simulation if OppNetProperties.getVideoImgDir() is not null
      Returns:
      OppNetOutput instance
    • makeEdgeId

      public String makeEdgeId(String id1, String id2, String connectivityType)
      Give a unique edge id from the given nodes ids and connectivityType in the form "idA-idB:type" where idA = min(id1,id2) and idB = max(id1,id2).
      Specified by:
      makeEdgeId in interface OppNet
      Parameters:
      id1 - a node id.
      id2 - other node id.
      connectivityType - the connectivity type.
      Returns:
      unique edge id.
    • getTimeZone

      public TimeZone getTimeZone()
      Give the timezone of the step times
      Returns:
      the timezone
    • getArea

      public casa.util.geom.AreaCar getArea()
      Give the graph area.
      Returns:
      the graph area
    • setArea

      public final void setArea(casa.util.geom.AreaCar area)
      Set the graph area.
      Parameters:
      area - the new graph area (may be null)
    • play

      public void play()
      Starts playing the simulation.
    • stop

      public void stop()
      Stops playing the simulation.
    • join

      public void join()
      Waits until the simulation is stopped.
    • close

      public void close()
      Stops playing the simulation and close all resources.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • run

      public void run()
      Run simulation steps separated by the period given at object's instanciation.
      Specified by:
      run in interface Runnable
    • waitUntil

      protected void waitUntil(long step)
      Wait until the given step, with the accel factor.
      Parameters:
      step - the next step
    • getAccel

      public double getAccel()
      Give the simulation current acceleration
      Returns:
      the acceleration
    • setAccel

      public void setAccel(double newAccel)
      Change the acceleration and reset the startTime accordingly. The
      Parameters:
      newAccel - the new acceleration
    • step

      public boolean step()
      Run a simulation step: move nodes and update edges accordingly, and wait for the next step time
      Returns:
      false if this step is the last one
    • getCurrentStep

      public long getCurrentStep()
      Gives the current step.
    • getCurrentTime

      public long getCurrentTime()
      Gives the current simulation time, extrapolated according to the real time and the real start time, if the simulation is running. Else return the time of the current step (currentStep + refTime)
    • getRefTime

      public long getRefTime()
    • hasNext

      public boolean hasNext()
      Return true if the simulation has more steps to run
      Returns:
      true if the simulation has more steps to run
    • updateEdges

      protected void updateEdges(Collection<OppNode> movedNodes)
    • addNode

      public void addNode(String nodeId, String profile)
      Description copied from interface: OppNet
      Add a new node in the OppNet.
      Specified by:
      addNode in interface OppNet
      Parameters:
      nodeId - the new node id.
      profile - the node's profile name (may be null)
    • deleteNode

      public void deleteNode(String nodeId)
      Description copied from interface: OppNet
      Remove a node from the OppNet.
      Specified by:
      deleteNode in interface OppNet
      Parameters:
      nodeId - the id of the node to be deleted.
    • isNode

      public boolean isNode(String nodeId)
      Description copied from interface: OppNet
      Check whether the node exists in the OppNet.
      Specified by:
      isNode in interface OppNet
      Parameters:
      nodeId - a node id.
      Returns:
      true if a node having this node id exists in the graph.
    • getNodes

      public Set<String> getNodes()
      Description copied from interface: OppNet
      Give the nodes in the OppNet.
      Specified by:
      getNodes in interface OppNet
      Returns:
      a collection of all nodes in the graph.
    • setOnline

      public void setOnline(String nodeId, boolean online)
      Description copied from interface: OppNet
      Change the on/offline status of the node and update edges accordingly.
      Specified by:
      setOnline in interface OppNet
      Parameters:
      nodeId - a node id.
      online - the new status for the node having this id.
    • isOnline

      public boolean isOnline(String nodeId)
      Description copied from interface: OppNet
      Give the on/offline status of the node.
      Specified by:
      isOnline in interface OppNet
      Parameters:
      nodeId - a node id.
      Returns:
      the status of the node having this id.
    • setLabel

      public void setLabel(String nodeId, String label)
      Description copied from interface: OppNet
      Change the label of the node
      Specified by:
      setLabel in interface OppNet
      Parameters:
      nodeId - a node id.
      label - the new label for the node having this id.
    • getLabel

      public String getLabel(String nodeId)
      Description copied from interface: OppNet
      Give the label of the node
      Specified by:
      getLabel in interface org.graphstream.graph.Element
      Specified by:
      getLabel in interface OppNet
      Overrides:
      getLabel in class org.graphstream.graph.implementations.AbstractElement
      Parameters:
      nodeId - a node id.
      Returns:
      the label for the node having this id.
    • getCoordCar

      public String getCoordCar(String nodeId)
    • getCoordGeo

      public String getCoordGeo(String nodeId)
    • setTag

      public void setTag(String nodeId, String tag)
      Description copied from interface: OppNet
      Set the given tag to the node.
      Specified by:
      setTag in interface OppNet
      Parameters:
      nodeId - a node id.
      tag - the new status for the node having this id.
    • getTag

      public String getTag(String nodeId)
      Description copied from interface: OppNet
      Give the tag of the node.
      Specified by:
      getTag in interface OppNet
      Parameters:
      nodeId - a node id.
      Returns:
      the tag of the node having this id.
    • addConnectivityType

      public void addConnectivityType(String nodeId, String connectivityType)
      Description copied from interface: OppNet
      Add a new connectivity type for the node and update edges accordingly.
      Specified by:
      addConnectivityType in interface OppNet
      Parameters:
      nodeId - a node id.
      connectivityType - a connectivity type to be added to this node.
    • removeConnectivityType

      public void removeConnectivityType(String nodeId, String connectivityType)
      Description copied from interface: OppNet
      Remove a connectivity type for the node and update edges accordingly.
      Specified by:
      removeConnectivityType in interface OppNet
      Parameters:
      nodeId - a node id.
      connectivityType - a connectivity type to be removed from this node.
    • setNodeStatus

      public void setNodeStatus(String nodeId, String connectivityType, String status)
      Description copied from interface: OppNet
      Change the status of a node for a given connectivity type.
      Specified by:
      setNodeStatus in interface OppNet
      Parameters:
      nodeId - a node id.
      connectivityType - a connectivity type.
      status - the new status.
    • getNodeStatus

      public String getNodeStatus(String nodeId, String connectivityType)
      Description copied from interface: OppNet
      Give the status of a node for a given connectivity type.
      Specified by:
      getNodeStatus in interface OppNet
      Parameters:
      nodeId - a node id.
      connectivityType - a connectivity type.
      Returns:
      the status for this node and connectivity type.
    • setEdgeStatus

      public boolean setEdgeStatus(String nodeId1, String nodeId2, String connectivityType, String status)
      Description copied from interface: OppNet
      Change the status of an edge charaterized by the nodes' ids and the connectivity type. If the edge does not exist, do nothing and change the status of nodes accordingly.
      Specified by:
      setEdgeStatus in interface OppNet
      Parameters:
      nodeId1 - a node id.
      nodeId2 - another node id.
      connectivityType - a connectivity type.
      status - the new edge status.
      Returns:
      true if the status has been changed.
    • getEdgeStatus

      public String getEdgeStatus(String nodeId1, String nodeId2, String connectivityType)
      Description copied from interface: OppNet
      Give the status of an edge charaterized by the nodes' ids and the connectivity type. If the edge does not exist, return null
      Specified by:
      getEdgeStatus in interface OppNet
      Parameters:
      nodeId1 - a node id.
      nodeId2 - another node id.
      connectivityType - a connectivity type.
      Returns:
      the edge status
    • getNeighbors

      public Collection<String> getNeighbors(String nodeId, String connectivityType, String edgeStatus)
      Description copied from interface: OppNet
      Give the neighbors' ids of the node for a given connectivity type and status. If connectivityType is null, give all neighbors for any connectivity type. If status is null, give all neighbors for any status.
      Specified by:
      getNeighbors in interface OppNet
      Parameters:
      nodeId - a node id.
      connectivityType - a connectivity type. May be null.
      edgeStatus - an edge status. May be null.
      Returns:
      ids of nodes having edges with the given status and connectivity type.
    • nbNeighbors

      public int nbNeighbors(String nodeId, String connectivityType, String edgeStatus)
      Description copied from interface: OppNet
      Returns the number of neighbors of the node for the given connectivity type and status. If connectivityType is null, returns the number of neighbors for any connectivity type. If status is null, returns the number of neighbors whatever the connectivity status.
      Specified by:
      nbNeighbors in interface OppNet
      Parameters:
      nodeId - a node id.
      connectivityType - a connectivity type. May be null.
      edgeStatus - an edge status. May be null.
      Returns:
      return true if the nodes have an edge having the given status and connectivity type.
    • getNeighborsNodes

      public Collection<OppNode> getNeighborsNodes(String nodeId, String connectivityType, String edgeStatus)
      Give the neighbor nodes of the node for a given connectivity type and status. If connectivityType is null, give all neighbors for any connectivity type. If status is null, give all neighbors for any status.
      Parameters:
      nodeId - a node id.
      connectivityType - a connectivity type. May be null.
      edgeStatus - an edge status. May be null.
      Returns:
      nodes having edges with the given status and connectivity type.
    • areNeighbors

      public boolean areNeighbors(String nodeId1, String nodeId2, String connectivityType, String edgeStatus)
      Description copied from interface: OppNet
      Returns true if there is an edge with the node for the given connectivity type and status. If connectivityType is null, return true if there is an edge for any connectivity type. If status is null, give all neighbors for any status.
      Specified by:
      areNeighbors in interface OppNet
      Parameters:
      nodeId1 - a node id.
      nodeId2 - another node id.
      connectivityType - a connectivity type. May be null.
      edgeStatus - an edge status. May be null.
      Returns:
      return true if the nodes have an edge having the given status and connectivity type.
    • removeEdge

      public OppEdge removeEdge(String id)
      Specified by:
      removeEdge in interface org.graphstream.graph.Graph
      Overrides:
      removeEdge in class org.graphstream.graph.implementations.AbstractGraph
    • removeEdge

      public OppEdge removeEdge(org.graphstream.graph.Edge e)
      Specified by:
      removeEdge in interface org.graphstream.graph.Graph
      Overrides:
      removeEdge in class org.graphstream.graph.implementations.AbstractGraph
    • addEdge

      public OppEdge addEdge(String id, org.graphstream.graph.Node node1, org.graphstream.graph.Node node2)
      Specified by:
      addEdge in interface org.graphstream.graph.Graph
      Overrides:
      addEdge in class org.graphstream.graph.implementations.AbstractGraph
    • addEdge

      public OppEdge addEdge(String id, org.graphstream.graph.Node node1, org.graphstream.graph.Node node2, boolean directed)
      Specified by:
      addEdge in interface org.graphstream.graph.Graph
      Overrides:
      addEdge in class org.graphstream.graph.implementations.AbstractGraph
    • removeAllEdges

      protected void removeAllEdges(OppNode node)
    • logDGS

      protected final void logDGS(String line)
      Write a DGS line preceded by a 'st' line if needed in the dgsWriter, if it is not null. lastLogTime is the previous 'st' line written (-1 at the beginning)
      Parameters:
      line - the DGS line
    • println

      protected void println(PrintWriter writer, String line)
      Write a line in the given writer, if it is not null
    • addEdgeListener

      public void addEdgeListener(String nodeId, String connectivityType, OppEdgeListener listener)
      Description copied from interface: OppNetEventsSource
      Add a new listener interested in edge events for the given node.
      Specified by:
      addEdgeListener in interface OppNetEventsSource
      Parameters:
      nodeId - a node id.
      connectivityType - a connectivity type.
      listener - the new listener.
    • removeEdgeListener

      public void removeEdgeListener(String nodeId, String connectivityType)
      Description copied from interface: OppNetEventsSource
      Remove a listener interested in edge events for the given node.
      Specified by:
      removeEdgeListener in interface OppNetEventsSource
      Parameters:
      nodeId - a node id.
      connectivityType - a connectivity type.
    • addNodeListener

      public void addNodeListener(String nodeId, OppNodeListener listener)
      Description copied from interface: OppNetEventsSource
      Add a new listener interested in node events for a specific node.
      Specified by:
      addNodeListener in interface OppNetEventsSource
      Parameters:
      nodeId - a node id.
      listener - the new listener.
    • removeNodeListener

      public void removeNodeListener(String nodeId)
      Description copied from interface: OppNetEventsSource
      Remove a listener interested in node events.
      Specified by:
      removeNodeListener in interface OppNetEventsSource
      Parameters:
      nodeId - a node id.
    • notifyNodeListeners

      protected void notifyNodeListeners(OppNode node, String command)
    • notifyEdgeListeners

      protected void notifyEdgeListeners(OppEdge edge, String command)