public class ConnectionCacheImpl extends Object implements ConnectionCache, DashboardRenderable
DASHBOARD_CIRCUITS, DASHBOARD_CONNECTIONS, DASHBOARD_CONNECTIONS_VERBOSE, DASHBOARD_PREDICTED_PORTS, DASHBOARD_STREAMS| Constructor and Description |
|---|
ConnectionCacheImpl(TorConfig config,
TorInitializationTracker tracker) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
dashboardRender(DashboardRenderer renderer,
PrintWriter writer,
int flags) |
Connection |
getConnectionTo(Router router,
boolean isDirectoryConnection)
Returns a completed connection to the specified router.
|
boolean |
isClosed() |
public ConnectionCacheImpl(TorConfig config, TorInitializationTracker tracker)
public void close()
close in interface ConnectionCachepublic boolean isClosed()
isClosed in interface ConnectionCachepublic Connection getConnectionTo(Router router, boolean isDirectoryConnection) throws InterruptedException, ConnectionTimeoutException, ConnectionFailedException, ConnectionHandshakeException
ConnectionCachegetConnectionTo in interface ConnectionCacherouter - The router to which a connection is requested.isDirectoryConnection - Is this going to be used as a directory connection.InterruptedException - if thread is interrupted while waiting for connection to complete.ConnectionTimeoutException - if timeout expires before connection completes.ConnectionFailedException - if connection fails due to I/O errorConnectionHandshakeException - if connection fails because an error occurred during handshake phasepublic void dashboardRender(DashboardRenderer renderer, PrintWriter writer, int flags) throws IOException
dashboardRender in interface DashboardRenderableIOExceptionCopyright © 2015. All rights reserved.