Java: Add shutdown method to NetworkTable.

This commit is contained in:
Peter Johnson
2015-08-28 23:57:37 -07:00
parent 5beaf45773
commit e516200e09

View File

@@ -44,6 +44,20 @@ public class NetworkTable implements ITable, IRemote {
running = true;
}
/**
* shuts down network tables
*/
public synchronized static void shutdown() {
if (!running)
throw new IllegalStateException(
"Network tables has not yet been initialized");
if (client)
NetworkTablesJNI.stopClient();
else
NetworkTablesJNI.stopServer();
running = false;
}
/**
* set that network tables should be a server
* This must be called before initalize or getTable