Interface NetworkLayer

    • Field Detail

      • NETWORK_LAYER_ID_CLASS

        static final Class<NetworkLayer> NETWORK_LAYER_ID_CLASS
        class used for managed id generation
    • Method Detail

      • getIdClass

        default Class<NetworkLayer> getIdClass()
        Each managed id class is expected to generate its ids based on its class signature. To be able to generate the correct id the class used for id generation is to be provided via this method call.
        Specified by:
        getIdClass in interface ManagedId
        Returns:
        idClass to use for generating ids for instances of this idable derived class
      • shallowClone

        NetworkLayer shallowClone()
        Create a shallow copy of this entity
        Specified by:
        shallowClone in interface IdAble
        Returns:
        shallow copy of entity
      • deepClone

        NetworkLayer deepClone()
        A network layer deep clone is expected to update interdependencies between "owned" deep cloned entities where possible
        Specified by:
        deepClone in interface IdAble
        Returns:
        deep copy of entity
      • createLayerLogPrefix

        static String createLayerLogPrefix​(NetworkLayer layer)
        create a string that can be used to prefix log statements for this layer to - in a unified way - identify this statement came from a particular layer
        Parameters:
        layer - to use
        Returns:
        String "[layer: xmlID ]"
      • registerSupportedMode

        boolean registerSupportedMode​(Mode supportedMode)
        register a mode as supported by this layer
        Parameters:
        supportedMode - to support
        Returns:
        true when successful false otherwise
      • registerSupportedModes

        boolean registerSupportedModes​(Collection<Mode> supportedModes)
        register modes as supported by this layer
        Parameters:
        supportedModes - to support
        Returns:
        true when successful false otherwise
      • getSupportedModes

        Collection<Mode> getSupportedModes()
        collect the modes supported by this infrastructure layer
        Returns:
        the supported modes for at least some part of the available infrastructure
      • supportsPredefinedMode

        boolean supportsPredefinedMode​(PredefinedModeType predefinedModeType)
        Verify if a predefined mode is supported based on its type
        Parameters:
        predefinedModeType - to verify
        Returns:
        true, when supported, false otherwise
      • isEmpty

        boolean isEmpty()
        check if the layer is empty of any infrastructure
        Returns:
        true when empty, false otherwise
      • logInfo

        void logInfo​(String prefix)
        invoked by entities inquiring about general information about the layer to display to users
        Parameters:
        prefix - optional prefix to include in each line of logging
      • validate

        boolean validate()
        validate the infrastructure of this layer
        Returns:
        true when valid, false otherwise
      • supports

        default boolean supports​(Mode mode)
        Determine if mode is supported by this layer
        Parameters:
        mode - to verify
        Returns:
        true when supporting, false otherwise
      • supports

        default boolean supports​(PredefinedModeType modeType)
        Determine if mode is supported by this layer
        Parameters:
        modeType - to verify
        Returns:
        true when supporting, false otherwise
      • hasSupportedModes

        default boolean hasSupportedModes()
        Determine if layer contains any supported modes
        Returns:
        true when supporting a mode, false otherwise
      • getFirstSupportedMode

        default Mode getFirstSupportedMode()
        Collect the first mode found under the supported modes from the collection provided by getSupportedModes
        Returns:
        first supported mode
      • reset

        void reset()
        Reset the layer