Interface Instrument

  • All Known Implementing Classes:
    AbstractInstrument

    public interface Instrument
    Interface that must be implemented by instruments.
    • Method Detail

      • getName

        String getName()
        Returns the name of the instrument. Must be unique per-provider.
      • getOptions

        String getOptions()
        Returns the options specified for the instrument in string form.
        Returns:
        options configuration options for the instrument
      • setOptions

        void setOptions​(String options)
        Sets options to specify for the instrument in standard string form. ex. DataCache(Options='Start=true')
        Parameters:
        options - options
      • getContext

        Object getContext()
        Gets the context of the instrument. Typically, a reference to a broker or broker factory.
        Returns:
        the context associated with the instrument.
      • setContext

        void setContext​(Object context)
        Sets the context of the instrument. Typically, a reference to a broker or broker factory.
      • setProvider

        void setProvider​(InstrumentationProvider provider)
        Sets the instrumentation provider for the instrument.
        Parameters:
        provider - instrumentation provider of the instrument
      • getProvider

        InstrumentationProvider getProvider()
        Gets the instrumentation provider for the instrument.
        Returns:
        instrumentation provider of the instrument
      • initialize

        void initialize()
        Initializes the instrument. Depending on the instrument, the provider, options, and various options may need to be set before calling this method.
      • getLevel

        InstrumentationLevel getLevel()
        Gets the instrumentation level of this instrument. The instrumentation level determines if and when the instrument will automatically start and stop.
        Returns:
        the instrumentation level of the instrument
      • isStarted

        boolean isStarted()
        Returns true if the instrument is started.
      • setStarted

        void setStarted​(boolean started)
        Sets whether the instrument is an available state.
        Parameters:
        started -
      • start

        void start()
        Starts the instrument. Typically this will be performed through the provider, but in some cases an instrument will have its own specialized startup.
      • stop

        void stop()
        Starts the instrument. Typically this will be performed through the provider, but in some cases an instrument will have its own specialized shutdown.
      • restart

        void restart()
        Restarts the instrument. Typically this will be performed through the provider, but in some cases an instrument will have its own specialized restart.