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

net.sf.marineapi.nmea.io.DataReader Maven / Gradle / Ivy

The newest version!
/*
 * DataReader.java
 * Copyright (C) 2012 Kimmo Tuukkanen
 * 
 * This file is part of Java Marine API.
 * 
 * 
 * Java Marine API is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or (at your
 * option) any later version.
 * 
 * Java Marine API is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
 * for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with Java Marine API. If not, see .
 */
package net.sf.marineapi.nmea.io;

/**
 * Common interface for data readers.
 * 
 * @author Kimmo Tuukkanen
 */
interface DataReader extends Runnable {

	/**
	 * Returns the current pause time between read attempts.
	 * 
	 * @return Reader interval in milliseconds.
	 */
	int getInterval();

	/**
	 * Tells if the reader is running and actively scanning the data source for
	 * new data.
	 * 
	 * @return true if running, otherwise false.
	 */
	boolean isRunning();

	/**
	 * Set reader pause time between read attempts.
	 * 
	 * @param interval Interval in milliseconds.
	 */
	void setInterval(int interval);

	/**
	 * Stops the reader permanently.
	 */
	void stop();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy