Class BaseSource

java.lang.Object
com.arpnetworking.metrics.common.sources.BaseSource
All Implemented Interfaces:
com.arpnetworking.commons.observer.Observable, Source
Direct Known Subclasses:
ActorSource, FileSource, KafkaSource, MappingSource, TimeStampingSource

public abstract class BaseSource extends Object implements Source
Abstract base class for common functionality for obtaining Record. This class is thread safe.
Author:
Ville Koskela (ville dot koskela at inscopemetrics dot io)
  • Constructor Details

  • Method Details

    • attach

      public void attach(com.arpnetworking.commons.observer.Observer observer)
      Specified by:
      attach in interface com.arpnetworking.commons.observer.Observable
    • detach

      public void detach(com.arpnetworking.commons.observer.Observer observer)
      Specified by:
      detach in interface com.arpnetworking.commons.observer.Observable
    • notify

      protected void notify(Object event)
      Dispatch an event to all attached Observer instances.
      Parameters:
      event - The event to dispatch.
    • getName

      public String getName()
    • getMetricSafeName

      public String getMetricSafeName()
    • toLogValue

      public Object toLogValue()
      Generate a Steno log compatible representation.
      Returns:
      Steno log compatible representation.
    • toString

      public String toString()
      Overrides:
      toString in class Object