All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.wavefront.agent.handlers.ReportableEntityHandlerFactory Maven / Gradle / Ivy

There is a newer version: 9999.0
Show newest version
package com.wavefront.agent.handlers;

import com.wavefront.data.ReportableEntityType;

import javax.annotation.Nonnull;

/**
 * Factory for {@link ReportableEntityHandler} objects.
 *
 * @author [email protected]
 */
public interface ReportableEntityHandlerFactory {

  /**
   * Create, or return existing, {@link ReportableEntityHandler}.
   *
   * @param handlerKey unique identifier for the handler.
   * @return new or existing handler.
   */
   ReportableEntityHandler getHandler(HandlerKey handlerKey);

  /**
   * Create, or return existing, {@link ReportableEntityHandler}.
   *
   * @param  entityType ReportableEntityType for the handler.
   * @param  handle     handle.
   * @return new or existing handler.
   */
  default  ReportableEntityHandler getHandler(
      ReportableEntityType entityType, String handle) {
    return getHandler(HandlerKey.of(entityType, handle));
  }

  /**
   * Shutdown pipeline for a specific handle.
   */
  void shutdown(@Nonnull String handle);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy