public class CircuitManagerImpl extends Object implements CircuitManager, DashboardRenderable
DIRECTORY_PURPOSE_CERTIFICATES, DIRECTORY_PURPOSE_CONSENSUS, DIRECTORY_PURPOSE_DESCRIPTORSDASHBOARD_CIRCUITS, DASHBOARD_CONNECTIONS, DASHBOARD_CONNECTIONS_VERBOSE, DASHBOARD_PREDICTED_PORTS, DASHBOARD_STREAMS| Constructor and Description |
|---|
CircuitManagerImpl(TorConfig config,
DirectoryDownloaderImpl directoryDownloader,
Directory directory,
ConnectionCache connectionCache,
TorInitializationTracker initializationTracker) |
| Modifier and Type | Method and Description |
|---|---|
ExitCircuit |
createNewExitCircuit(Router exitRouter) |
void |
dashboardRender(DashboardRenderer renderer,
PrintWriter writer,
int flags) |
InternalCircuit |
getCleanInternalCircuit() |
List<StreamExitRequest> |
getPendingExitStreams() |
DirectoryCircuit |
openDirectoryCircuit() |
DirectoryCircuit |
openDirectoryCircuitTo(List<Router> path) |
Stream |
openDirectoryStream() |
Stream |
openDirectoryStream(int purpose) |
ExitCircuit |
openExitCircuitTo(List<Router> path) |
Stream |
openExitStreamTo(IPv4Address address,
int port)
Attempt to open an exit stream to the destination specified by
address and
port. |
Stream |
openExitStreamTo(String hostname,
int port)
Attempt to open an exit stream to the specified destination
hostname and
port. |
InternalCircuit |
openInternalCircuitTo(List<Router> path) |
void |
startBuildingCircuits()
Begin automatically building new circuits in the background.
|
void |
stopBuildingCircuits(boolean killCircuits) |
public CircuitManagerImpl(TorConfig config, DirectoryDownloaderImpl directoryDownloader, Directory directory, ConnectionCache connectionCache, TorInitializationTracker initializationTracker)
public void startBuildingCircuits()
CircuitManagerstartBuildingCircuits in interface CircuitManagerpublic void stopBuildingCircuits(boolean killCircuits)
stopBuildingCircuits in interface CircuitManagerpublic ExitCircuit createNewExitCircuit(Router exitRouter)
public Stream openExitStreamTo(String hostname, int port) throws InterruptedException, TimeoutException, OpenFailedException
CircuitManagerhostname and
port.openExitStreamTo in interface CircuitManagerhostname - The name of the host to open an exit connection to.port - The port to open an exit connection to.InterruptedExceptionTimeoutExceptionOpenFailedExceptionpublic Stream openExitStreamTo(IPv4Address address, int port) throws InterruptedException, TimeoutException, OpenFailedException
CircuitManageraddress and
port.openExitStreamTo in interface CircuitManageraddress - The address to open an exit connection to.port - The port to open an exit connection to.InterruptedExceptionTimeoutExceptionOpenFailedExceptionpublic List<StreamExitRequest> getPendingExitStreams()
public Stream openDirectoryStream() throws OpenFailedException, InterruptedException, TimeoutException
openDirectoryStream in interface CircuitManagerOpenFailedExceptionInterruptedExceptionTimeoutExceptionpublic Stream openDirectoryStream(int purpose) throws OpenFailedException, InterruptedException
openDirectoryStream in interface CircuitManagerOpenFailedExceptionInterruptedExceptionpublic DirectoryCircuit openDirectoryCircuit() throws OpenFailedException
openDirectoryCircuit in interface CircuitManagerOpenFailedExceptionpublic void dashboardRender(DashboardRenderer renderer, PrintWriter writer, int flags) throws IOException
dashboardRender in interface DashboardRenderableIOExceptionpublic InternalCircuit getCleanInternalCircuit() throws InterruptedException
getCleanInternalCircuit in interface CircuitManagerInterruptedExceptionpublic DirectoryCircuit openDirectoryCircuitTo(List<Router> path) throws OpenFailedException
openDirectoryCircuitTo in interface CircuitManagerOpenFailedExceptionpublic ExitCircuit openExitCircuitTo(List<Router> path) throws OpenFailedException
openExitCircuitTo in interface CircuitManagerOpenFailedExceptionpublic InternalCircuit openInternalCircuitTo(List<Router> path) throws OpenFailedException
openInternalCircuitTo in interface CircuitManagerOpenFailedExceptionCopyright © 2015. All rights reserved.