Interface RoutedServicesLayer

    • Field Detail

      • ROUTED_SERVICES_LAYER_ID_CLASS

        static final Class<RoutedServicesLayer> ROUTED_SERVICES_LAYER_ID_CLASS
        id class for generating ids
    • Method Detail

      • getIdClass

        default Class<RoutedServicesLayer> 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
      • 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
      • isEmpty

        boolean isEmpty()
        Check if the layer is empty of any routed services
        Returns:
        true when empty, false otherwise
      • getParentLayer

        ServiceNetworkLayer getParentLayer()
        The parent service layer of this routed services layer
        Returns:
        parent layer
      • isServicesByModeEmpty

        boolean isServicesByModeEmpty​(Mode mode)
        Verify if there exist no registered services for a given mode at all at present
        Parameters:
        mode - to check
        Returns:
        true when no single routed service by mode exists, false otherwise
      • getServicesByMode

        RoutedModeServices getServicesByMode​(Mode mode)
        The services for a given mode available on this layer. If no services are yet available an empty instance is created and registered. It is expected that each routed service across all modes on the layer has a unique internal id, so internal ids do not restart at zero per mode
        Parameters:
        mode - to obtain services for
        Returns:
        services by mode, empty instance if none have been registered yet
      • resetChildManagedIdEntities

        default void resetChildManagedIdEntities()
        Each class that has a managed id, should be able to reset any children that themselves are managedIdEntity containers. This ensures that when resetting such a container any child containers are also reset
        Specified by:
        resetChildManagedIdEntities in interface ManagedId
      • getSupportedModes

        default Collection<Mode> getSupportedModes()
        Collect the supported modes that potentially have services registered based on the parent layer
        Returns:
        supported modes
      • getSupportedModesWithServices

        default Collection<Mode> getSupportedModesWithServices()
        Collect the modes for which a RoutedModeService entry is available, i.e., for which we expect services to exist rather than potentially support. this method does not look at the parent layer supported modes, but only at the modes for which a routed services container exists.
        Returns:
        available modes
      • getLayerModifier

        RoutedServicesLayerModifier getLayerModifier()
        Routed services have an additional modifier options to provided integrated utilities for changing the routed services in a way that updates all attached managed routed and service network elements involved
        Returns:
        routed services layer modifier
      • deepClone

        RoutedServicesLayer deepClone()
        An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call. To be used with caution if not called by managed id container related code
        Specified by:
        deepClone in interface IdAble
        Returns:
        deep copy of entity