Package net.anwiba.spatial.gps.gpsd
Class Connection
- java.lang.Object
-
- net.anwiba.spatial.gps.gpsd.Connection
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class Connection extends java.lang.Object implements java.lang.AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description Connection(java.net.Socket socket, java.io.BufferedReader in, java.io.BufferedWriter out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcall(java.lang.String cmd)voidclose()java.lang.Iterable<Device>devices()Pollpoll()<T> Trecieve(java.lang.Class<T> clazz)Versionversion()net.anwiba.commons.lang.object.ObjectPair<Devices,Watch>watch(boolean enable, java.lang.String deviceName)
-
-
-
Method Detail
-
watch
public net.anwiba.commons.lang.object.ObjectPair<Devices,Watch> watch(boolean enable, java.lang.String deviceName) throws java.io.IOException
- Throws:
java.io.IOException
-
devices
public java.lang.Iterable<Device> devices() throws java.io.IOException
- Throws:
java.io.IOException
-
version
public Version version() throws java.io.IOException
- Throws:
java.io.IOException
-
poll
public Poll poll() throws java.io.IOException
- Throws:
java.io.IOException
-
recieve
public <T> T recieve(java.lang.Class<T> clazz) throws java.io.IOException- Throws:
java.io.IOException
-
call
public void call(java.lang.String cmd) throws java.io.IOException- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.io.IOException
-
-