I2PTunnel:

- Fix bug that left server acceptor thread running after close
- Add destroy() methods to release all resources when closing a tunnel for good,
  particularly the streaming timer threads
- Use COWAL to prevent concurrency problems
- Javadocs
Streaming:
- Don't return null from accept() any more; actually throw
  ConnectException as the javadocs have always specified
- Throw ConnectException from accept() if interrupted; previously caught and ignored
- Throw exceptions from ConnectionHandler.accept(), not higher up
- Close ServerSocket when ConnectionManager is shut down
- Synchronize setActive(), clear queue when starting to accept,
  better handling of calls that don't change state
- Javadocs
ConfigClientsHelper: Call isPluginRunning() less often
PluginStarter: Simplify detection of active threads

Above changes mostly in support of zzzot plugin implementing ClientApp
and being able to shut down completely so there are no threads
in its thread group, so /configclients will all show status as stopped.
Previously, the I2PTunnelServer acceptor thread and
one or more streaming timer threads would remain.
This commit is contained in:
zzz
2014-11-13 20:12:55 +00:00
parent 0773a30578
commit 2f2aa7f5a8
16 changed files with 283 additions and 76 deletions

View File

@@ -57,6 +57,13 @@ public interface I2PSocketManager {
*/
public I2PSocketOptions getDefaultOptions();
/**
* Returns non-null socket.
* This method does not throw exceptions, but methods on the returned socket
* may throw exceptions if the socket or socket manager is closed.
*
* @return non-null
*/
public I2PServerSocket getServerSocket();
/**