public interface Circuit
| Modifier and Type | Method and Description |
|---|---|
void |
appendNode(CircuitNode node) |
RelayCell |
createRelayCell(int relayCommand,
int streamId,
CircuitNode targetNode)
Create a new relay cell which is configured for delivery to the specified
circuit
targetNode with command value relayCommand
and a stream id value of streamId. |
void |
deliverControlCell(Cell cell) |
void |
deliverRelayCell(Cell cell) |
void |
destroyCircuit() |
List<Stream> |
getActiveStreams() |
int |
getCircuitId()
Returns the curcuit id value for this circuit.
|
Connection |
getConnection()
Returns the entry router
Connection object of this Circuit. |
CircuitNode |
getFinalCircuitNode()
Return the last node or 'hop' in this circuit.
|
int |
getSecondsDirty() |
boolean |
isClean() |
boolean |
isConnected()
Return
true if the circuit is presently in the connected state or
false otherwise. |
boolean |
isMarkedForClose() |
boolean |
isPending() |
void |
markForClose() |
RelayCell |
receiveRelayCell()
Returns the next relay response cell received on this circuit.
|
void |
sendRelayCell(RelayCell cell)
Encrypt and deliver the relay cell
cell. |
boolean isConnected()
true if the circuit is presently in the connected state or
false otherwise.true if the circuit is presently connected, or
false otherwise.boolean isPending()
boolean isClean()
boolean isMarkedForClose()
int getSecondsDirty()
Connection getConnection()
Connection object of this Circuit. Throws
a TorException if the circuit is not currently open.TorException - If this circuit is not currently connected.int getCircuitId()
RelayCell createRelayCell(int relayCommand, int streamId, CircuitNode targetNode)
targetNode with command value relayCommand
and a stream id value of streamId. The returned RelayCell
can then be used to populate the payload of the cell before delivering it.relayCommand - The command value to send in the relay cell header.streamId - The stream id value to send in the relay cell header.targetNode - The target circuit node to encrypt this cell for.RelayCell receiveRelayCell()
CIRCUIT_RELAY_RESPONSE_TIMEOUT milliseconds, null
is returned.null if
a timeout is reached before the next relay cell arrives.void sendRelayCell(RelayCell cell)
cell.cell - The relay cell to deliver over this circuit.CircuitNode getFinalCircuitNode()
void destroyCircuit()
void deliverRelayCell(Cell cell)
void deliverControlCell(Cell cell)
void markForClose()
void appendNode(CircuitNode node)
Copyright © 2015. All rights reserved.