Class ScriptBasedMapping

    • Field Detail

      • MIN_ALLOWABLE_ARGS

        static final int MIN_ALLOWABLE_ARGS
        Minimum number of arguments: 1.
        See Also:
        Constant Field Values
      • DEFAULT_ARG_COUNT

        static final int DEFAULT_ARG_COUNT
        Default number of arguments: 100.
        See Also:
        Constant Field Values
      • SCRIPT_FILENAME_KEY

        static final java.lang.String SCRIPT_FILENAME_KEY
        Key to the script filename "networkTopologyScriptFileName".
        See Also:
        Constant Field Values
      • SCRIPT_ARG_COUNT_KEY

        static final java.lang.String SCRIPT_ARG_COUNT_KEY
        Key to the argument count that the script supports "networkTopologyScriptNumberArgs".
        See Also:
        Constant Field Values
      • NO_SCRIPT

        public static final java.lang.String NO_SCRIPT
        Text used in the toString() method if there is no string "no script".
        See Also:
        Constant Field Values
    • Constructor Detail

      • ScriptBasedMapping

        public ScriptBasedMapping()
        Create an instance with the default configuration.

        Calling setConf(Configuration) will trigger a re-evaluation of the configuration settings and so be used to set up the mapping script.

      • ScriptBasedMapping

        public ScriptBasedMapping​(org.apache.commons.configuration.Configuration conf)
        Create an instance from the given configuration.
        Parameters:
        conf - configuration
    • Method Detail

      • getConf

        public org.apache.commons.configuration.Configuration getConf()
        Description copied from interface: Configurable
        Return the configuration used by this object.
        Specified by:
        getConf in interface Configurable
        Overrides:
        getConf in class AbstractDNSToSwitchMapping
        Returns:
        configuration used by this object.
      • setConf

        public void setConf​(org.apache.commons.configuration.Configuration conf)
        Set the configuration to be used by this object.

        This will get called in the superclass constructor, so a check is needed to ensure that the raw mapping is defined before trying to relaying a null configuration.

        Specified by:
        setConf in interface Configurable
        Overrides:
        setConf in class AbstractDNSToSwitchMapping
        Parameters:
        conf -