类 AbstractUBXMessageListener<T extends UBXMessage>
java.lang.Object
net.sf.marineapi.nmea.event.AbstractSentenceListener<UBXSentence>
net.sf.marineapi.ublox.event.AbstractUBXMessageListener<T>
- 类型参数:
T- UBX message type to be listened.
- 所有已实现的接口:
EventListener,SentenceListener
public abstract class AbstractUBXMessageListener<T extends UBXMessage>
extends AbstractSentenceListener<UBXSentence>
Abstract listener for UBX messages. Extend this class to create a listener
for a specific UBX message type and register it in a
SentenceReader.
To listen to all incoming UBX sentences, extend the AbstractSentenceListener using UBXSentence as type.
This class is based on AbstractSentenceListener and thus it has the
same recommendations and limitations regarding the usage of generics and
inheritance.
- 作者:
- Gunnar Hillert
- 另请参阅:
-
构造器概要
构造器构造器说明Default constructor with automatic generic type resolving.Constructor with explicit generic type parameter. -
方法概要
修饰符和类型方法说明abstract voidInvoked when a UBX message has been received.voidEmpty implementation.voidEmpty implementation.voidEmpty implementation.final voidsentenceRead(UBXSentence sentence) Invoked whenUBXSentenceof any type is received.从类继承的方法 net.sf.marineapi.nmea.event.AbstractSentenceListener
sentenceRead
-
构造器详细资料
-
AbstractUBXMessageListener
public AbstractUBXMessageListener()Default constructor with automatic generic type resolving. Notice that theGenericTypeResolvermay not always succeed.- 抛出:
IllegalStateException- If the generic type cannot be resolved at runtime.- 另请参阅:
-
AbstractUBXMessageListener
Constructor with explicit generic type parameter. This constructor may be used when the default constructor fails to resolve the generic typeTat runtime.- 参数:
c- Message typeTto be listened.- 另请参阅:
-
-
方法详细资料
-
sentenceRead
Invoked when
UBXSentenceof any type is received. Pre-parses the message to determine it's type and invokes theonMessage(net.sf.marineapi.ublox.message.UBXMessage)method when the type matches the generic typeT.This method has been declared
finalto ensure the correct handling of received sentences.- 指定者:
sentenceRead在类中AbstractSentenceListener<UBXSentence>- 参数:
sentence- Sentence of typeT
-
onMessage
Invoked when a UBX message has been received.- 参数:
msg- UBXMessage of typeT
-
readingPaused
public void readingPaused()Empty implementation.- 指定者:
readingPaused在接口中SentenceListener- 覆盖:
readingPaused在类中AbstractSentenceListener<UBXSentence>- 另请参阅:
-
readingStarted
public void readingStarted()Empty implementation.- 指定者:
readingStarted在接口中SentenceListener- 覆盖:
readingStarted在类中AbstractSentenceListener<UBXSentence>- 另请参阅:
-
readingStopped
public void readingStopped()Empty implementation.- 指定者:
readingStopped在接口中SentenceListener- 覆盖:
readingStopped在类中AbstractSentenceListener<UBXSentence>- 另请参阅:
-