Skip to content

Commit

Permalink
SentenceReader javadocs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ktuukkan committed Oct 13, 2013
1 parent 19c8dca commit 07b719f
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions src/main/java/net/sf/marineapi/nmea/io/SentenceReader.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/*
/*
* SentenceReader.java
* Copyright (C) 2010-2012 Kimmo Tuukkanen
*
*
* This file is part of Java Marine API.
* <http://ktuukkan.github.io/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 <http://www.gnu.org/licenses/>.
*/
Expand All @@ -38,12 +38,12 @@

/**
* Sentence reader detects supported NMEA 0183 sentences from the specified
* <code>InputStream</code> and dispatches them to registered listeners as
* sentence events. Each event contains a parser for the read sentence.
* data source and dispatches them to registered listeners as sentence events.
* Each event contains a parser for the read sentence.
* <p>
* Parsers dispatched by reader are created using {@link SentenceFactory} class,
* where you can also register your own custom parsers.
*
*
* @author Kimmo Tuukkanen
* @see SentenceListener
* @see SentenceEvent
Expand Down Expand Up @@ -73,7 +73,7 @@ public class SentenceReader {

/**
* Creates a new instance of SentenceReader.
*
*
* @param source Stream from which to read NMEA data
*/
public SentenceReader(InputStream source) {
Expand All @@ -82,7 +82,7 @@ public SentenceReader(InputStream source) {

/**
* Creates a SentenceReader for UDP/DatagramSocket.
*
*
* @param source Socket from which to read NMEA data
*/
public SentenceReader(DatagramSocket source) {
Expand All @@ -92,7 +92,7 @@ public SentenceReader(DatagramSocket source) {
/**
* Adds a {@link SentenceListener} that wants to receive all sentences read
* by the reader.
*
*
* @param listener {@link SentenceListener} to be registered.
* @see net.sf.marineapi.nmea.event.SentenceListener
*/
Expand All @@ -103,7 +103,7 @@ public void addSentenceListener(SentenceListener listener) {
/**
* Adds a {@link SentenceListener} that is interested in receiving only
* sentences of certain type.
*
*
* @param sl SentenceListener to add
* @param type Sentence type for which the listener is registered.
* @see net.sf.marineapi.nmea.event.SentenceListener
Expand All @@ -115,7 +115,7 @@ public void addSentenceListener(SentenceListener sl, SentenceId type) {
/**
* Adds a {@link SentenceListener} that is interested in receiving only
* sentences of certain type.
*
*
* @param sl SentenceListener to add
* @param type Sentence type for which the listener is registered.
* @see net.sf.marineapi.nmea.event.SentenceListener
Expand All @@ -126,7 +126,7 @@ public void addSentenceListener(SentenceListener sl, String type) {

/**
* Returns the current reading paused timeout.
*
*
* @return Timeout limit in milliseconds.
* @see #setPauseTimeout(int)
*/
Expand All @@ -137,7 +137,7 @@ public int getPauseTimeout() {
/**
* Remove a listener from reader. When removed, listener will not receive
* any events from the reader.
*
*
* @param listener {@link SentenceListener} to be removed.
*/
public void removeSentenceListener(SentenceListener listener) {
Expand All @@ -151,7 +151,7 @@ public void removeSentenceListener(SentenceListener listener) {
/**
* Sets the InputStream to be used as data source. If reader is running, it
* is first stopped and you must call {@link #start()} to resume reading.
*
*
* @param stream InputStream to set.
*/
public void setInputStream(InputStream stream) {
Expand All @@ -164,7 +164,7 @@ public void setInputStream(InputStream stream) {
/**
* Sets the DatagramSocket to be used as data source. If reader is running,
* it is first stopped and you must call {@link #start()} to resume reading.
*
*
* @param socket DatagramSocket to set
*/
public void setDatagramSocket(DatagramSocket socket) {
Expand All @@ -176,7 +176,7 @@ public void setDatagramSocket(DatagramSocket socket) {

/**
* Set timeout time for reading paused events. Default is 5000 ms.
*
*
* @param millis Timeout in milliseconds.
*/
public void setPauseTimeout(int millis) {
Expand All @@ -185,7 +185,7 @@ public void setPauseTimeout(int millis) {

/**
* Starts reading the input stream and dispatching events.
*
*
* @throws IllegalStateException If reader is already running.
*/
public void start() {
Expand Down Expand Up @@ -254,7 +254,7 @@ void fireReadingStopped() {

/**
* Dispatch data to all listeners.
*
*
* @param sentence sentence string.
*/
void fireSentenceEvent(Sentence sentence) {
Expand All @@ -281,7 +281,7 @@ void fireSentenceEvent(Sentence sentence) {

/**
* Registers a SentenceListener to hash map with given key.
*
*
* @param type Sentence type to register for
* @param listener SentenceListener to register
*/
Expand Down

0 comments on commit 07b719f

Please sign in to comment.