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

com.wavefront.integrations.WavefrontConnectionHandler Maven / Gradle / Ivy

There is a newer version: 4.8
Show newest version
package com.wavefront.integrations;

import java.io.Closeable;
import java.io.IOException;

/**
 * Wavefront Client that sends data to a Wavefront proxy or Wavefront service.
 *
 * @author Vikram Raman ([email protected])
 */
public interface WavefrontConnectionHandler extends Closeable {

  /**
   * Connects to the server.
   *
   * @throws IllegalStateException if the client is already connected
   * @throws IOException           if there is an error connecting
   */
  void connect() throws IllegalStateException, IOException;

  /**
   * Flushes buffer, if applicable
   *
   * @throws IOException
   */
  void flush() throws IOException;

  /**
   * Returns true if ready to send data
   */
  boolean isConnected();

  /**
   * Returns the number of failed writes to the server.
   *
   * @return the number of failed writes to the server
   */
  int getFailureCount();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy