|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.garmin.fit.MesgBroadcaster
com.garmin.fit.BufferedMesgBroadcaster
public class BufferedMesgBroadcaster
BufferedMesgBroadcaster intercepts the incoming messages from the given decode stream, buffers them, and offers an opportunity to edit the messages before broadcasting the messages to all registered listeners.
To edit the messages, a MesgBroadcastPlugin must be registered. All registered MesgBroadcastPlugins are given the opportunity to see each message as they are decoded, as well as to see and edit the final list of messages before broadcast to listeners
Constructor Summary | |
---|---|
BufferedMesgBroadcaster()
Constructor. |
|
BufferedMesgBroadcaster(Decode decode)
Constructor. |
Method Summary | |
---|---|
void |
broadcast()
Passes the reference to the list of messages to any registered plugins. |
void |
onMesg(Mesg mesg)
Buffers incoming messages and passes them on to any registered plugins |
void |
registerMesgBroadcastPlugin(MesgBroadcastPlugin plugin)
Registers a plugin, which the class will call on onMesg and broadcast |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BufferedMesgBroadcaster()
public BufferedMesgBroadcaster(Decode decode)
decode
- Method Detail |
---|
public void registerMesgBroadcastPlugin(MesgBroadcastPlugin plugin)
plugin
- The MesgBroadcastPlugin object to be registeredpublic void onMesg(Mesg mesg)
onMesg
in interface MesgListener
onMesg
in class MesgBroadcaster
mesg
- public void broadcast()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |