Class AbstractInstrument

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getContext()
      Gets the context of the instrument.
      InstrumentationLevel getLevel()
      Gets the instrumentation level of this instrument.
      abstract java.lang.String getName()
      Returns the name of the instrument.
      java.lang.String getOptions()
      Returns the options specified for the instrument in string form.
      InstrumentationProvider getProvider()
      Gets the instrumentation provider for the instrument.
      abstract void initialize()
      Initializes the instrument.
      boolean isStarted()
      Returns true if the instrument is started.
      void restart()
      Restarts the instrument.
      void setContext​(java.lang.Object context)
      Sets the context of the instrument.
      void setOptions​(java.lang.String options)
      Sets options to specify for the instrument in standard string form.
      void setProvider​(InstrumentationProvider provider)
      Sets the instrumentation provider for the instrument.
      void setStarted​(boolean started)
      Sets whether the instrument is an available state.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractInstrument

        public AbstractInstrument()
    • Method Detail

      • getContext

        public java.lang.Object getContext()
        Description copied from interface: Instrument
        Gets the context of the instrument. Typically, a reference to a broker or broker factory.
        Specified by:
        getContext in interface Instrument
        Returns:
        the context associated with the instrument.
      • setContext

        public void setContext​(java.lang.Object context)
        Description copied from interface: Instrument
        Sets the context of the instrument. Typically, a reference to a broker or broker factory.
        Specified by:
        setContext in interface Instrument
      • getOptions

        public java.lang.String getOptions()
        Description copied from interface: Instrument
        Returns the options specified for the instrument in string form.
        Specified by:
        getOptions in interface Instrument
        Returns:
        options configuration options for the instrument
      • setOptions

        public void setOptions​(java.lang.String options)
        Description copied from interface: Instrument
        Sets options to specify for the instrument in standard string form. ex. DataCache(Options='Start=true')
        Specified by:
        setOptions in interface Instrument
        Parameters:
        options - options
      • isStarted

        public boolean isStarted()
        Description copied from interface: Instrument
        Returns true if the instrument is started.
        Specified by:
        isStarted in interface Instrument
      • setStarted

        public void setStarted​(boolean started)
        Description copied from interface: Instrument
        Sets whether the instrument is an available state.
        Specified by:
        setStarted in interface Instrument
      • restart

        public void restart()
        Description copied from interface: Instrument
        Restarts the instrument. Typically this will be performed through the provider, but in some cases an instrument will have its own specialized restart.
        Specified by:
        restart in interface Instrument
      • setProvider

        public void setProvider​(InstrumentationProvider provider)
        Description copied from interface: Instrument
        Sets the instrumentation provider for the instrument.
        Specified by:
        setProvider in interface Instrument
        Parameters:
        provider - instrumentation provider of the instrument
      • getLevel

        public InstrumentationLevel getLevel()
        Description copied from interface: Instrument
        Gets the instrumentation level of this instrument. The instrumentation level determines if and when the instrument will automatically start and stop.
        Specified by:
        getLevel in interface Instrument
        Returns:
        the instrumentation level of the instrument
      • getName

        public abstract java.lang.String getName()
        Description copied from interface: Instrument
        Returns the name of the instrument. Must be unique per-provider.
        Specified by:
        getName in interface Instrument
      • initialize

        public abstract void initialize()
        Description copied from interface: Instrument
        Initializes the instrument. Depending on the instrument, the provider, options, and various options may need to be set before calling this method.
        Specified by:
        initialize in interface Instrument