Package org.astrogrid.samp.test
Class Snooper
java.lang.Object
org.astrogrid.samp.test.Snooper
Subscribes to SAMP messages and logs any received to an output stream.
The only responses to messages have samp.status=samp.warning.
- Since:
- 4 Sep 2008
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionSnooper
(ClientProfile profile, Subscriptions subs, OutputStream out, int autoSec) Constructor using default metadata.Snooper
(ClientProfile profile, Subscriptions subs, Metadata meta, OutputStream out, int autoSec) Constructor using custom metadata. -
Method Summary
-
Constructor Details
-
Snooper
Constructor using default metadata.- Parameters:
profile
- profilesubs
- subscriptions defining which messages are received and loggedout
- destination stream for logging infoautoSec
- number of seconds between auto connection attempts
-
Snooper
public Snooper(ClientProfile profile, Subscriptions subs, Metadata meta, OutputStream out, int autoSec) Constructor using custom metadata.- Parameters:
profile
- profilesubs
- subscriptions defining which messages are received and loggedmeta
- client metadataout
- destination stream for logging infoautoSec
- number of seconds between auto connection attempts
-
-
Method Details
-
createDefaultMetadata
Returns the default metadata for the Snooper client.- Returns:
- meta
-
main
Main method. Runs a snooper.- Throws:
IOException
-
runMain
Does the work for the main method. Use -help flag.- Throws:
IOException
-