Class AbstractModelAccess

  • All Implemented Interfaces:
    ModelAccess

    public abstract class AbstractModelAccess
    extends java.lang.Object
    implements ModelAccess
    Basic implementation of the model access.
    Author:
    Holger Eichelberger, SSE
    • Constructor Detail

      • AbstractModelAccess

        protected AbstractModelAccess​(AbstractModelAccess.NotificationChangedListener notificationChangedListener)
        Creates an abstract model access with notification changed listener.
        Parameters:
        notificationChangedListener - listener to be called when the notification settings have been changed, typically during initialization of the connector/model
    • Method Detail

      • isDetailNotifiedItemEnabled

        protected final boolean isDetailNotifiedItemEnabled()
        Returns whether detailed notifications for monitored items is enabled.
        Returns:
        true for details, false for null
      • useNotifications

        protected final boolean useNotifications()
        Returns whether (event-based) notifications or polling shall be used.
        Returns:
        true for notifications, false for polling
      • useNotifications

        public final void useNotifications​(boolean useNotifications)
        Description copied from interface: ModelAccess
        Use notifications or polling. This is required here, as the related translator code ModelAccess.monitor(String...) depends on that. [monitoring]
        Specified by:
        useNotifications in interface ModelAccess
        Parameters:
        useNotifications - true for notifications, false for polling
      • qName

        private java.lang.String qName​(java.lang.String init,
                                       java.lang.String... names)
        Composes a qualified name.
        Parameters:
        init - the initialization for the result to be used when the first non-empty name shall be appended
        names - the names to be appended
        Returns:
        the qualified name, empty if there was nothing to compose irrespective of init
      • qName

        public java.lang.String qName​(java.lang.String... names)
        Description copied from interface: ModelAccess
        Composes multiple names to a qualified name using ModelAccess.getQSeparator().
        Specified by:
        qName in interface ModelAccess
        Parameters:
        names - the names (may be empty but shall be ignored then)
        Returns:
        the composed qualified name, empty if no names were given
      • iqName

        public java.lang.String iqName​(java.lang.String... names)
        Description copied from interface: ModelAccess
        Composes multiple names to a qualified instance name starting with ModelAccess.topInstancesQName() using ModelAccess.getQSeparator().
        Specified by:
        iqName in interface ModelAccess
        Parameters:
        names - the names (may be empty but shall be ignored then)
        Returns:
        the composed qualified name, empty if no names were given
      • getConnectorParameter

        protected abstract ConnectorParameter getConnectorParameter()
        Returns the actual connector parameters that apply for this model instance.
        Returns:
        the connector parameters