Class TransportLayerNetwork<U extends TransportLayer,​T extends TransportLayers<U>>

  • Type Parameters:
    U - transport layer base class
    T - transport layer container class where each layer extends <U>
    All Implemented Interfaces:
    Serializable, Cloneable, Comparable<IdAble>, EventListener, PlanitComponentListener, EventListener, ExternalIdAble, IdAble
    Direct Known Subclasses:
    TopologicalLayerNetwork

    public abstract class TransportLayerNetwork<U extends TransportLayer,​T extends TransportLayers<U>>
    extends Network
    A transport network with one or more layers. One can choose the container for the different layers as a generic type that defines the container level operations available. Each container has a certain base class for the TransportLayer entities which is the second generic type. This allows one to have a base class for each layer, while the layer itself can derive from this base level. This way the user has maximum flexibility regarding what the functionality and properties of each layer are and how they are exposed via the container
    Author:
    markr
    See Also:
    Serialized Form
    • Constructor Detail

      • TransportLayerNetwork

        public TransportLayerNetwork​(IdGroupingToken tokenId)
        Default constructor
        Parameters:
        tokenId - to use for id generation
    • Method Detail

      • createLayersContainer

        protected abstract T createLayersContainer​(IdGroupingToken networkIdToken)
        Derived type is to provide the actual layer implementations
        Parameters:
        networkIdToken - to use
        Returns:
        infrastructure layers container
      • getLayerByMode

        public U getLayerByMode​(Mode mode)
        collect a layer by mode
        Parameters:
        mode - to collect layer for
        Returns:
        corresponding layer, (null if not found)
      • getModes

        public Modes getModes()
        Collect the modes
        Returns:
        modes container
      • getTransportLayers

        public T getTransportLayers()
        Collect the transport layers
        Returns:
        transport layers container
      • reset

        public void reset()
        All components should be able to reset going back to some representative initial state
        Overrides:
        reset in class Network