Package net.freehaven.tor.control
Interface EventHandler
-
- All Known Implementing Classes:
DebuggingEventHandler,NullEventHandler
public interface EventHandlerAbstract interface whose methods are invoked when Tor sends us an event.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbandwidthUsed(long read, long written)Invoked once per second.voidcircuitStatus(java.lang.String status, java.lang.String circID, java.lang.String path)Invoked when a circuit's status has changed.voidcontrolConnectionClosed()Invoked when Tor closes the control connection.voidmessage(java.lang.String severity, java.lang.String msg)Invoked when Tor logs a message.voidnewDescriptors(java.util.List<java.lang.String> orList)Invoked whenever Tor learns about new ORs.voidorConnStatus(java.lang.String status, java.lang.String orName)Invoked when the status of a connection to an OR has changed.voidstreamStatus(java.lang.String status, java.lang.String streamID, java.lang.String target)Invoked when a stream's status has changed.voidunrecognized(java.lang.String type, java.lang.String msg)Invoked when an unspecified message is received.
-
-
-
Method Detail
-
circuitStatus
void circuitStatus(java.lang.String status, java.lang.String circID, java.lang.String path)Invoked when a circuit's status has changed. Possible values for status are:- "LAUNCHED" : circuit ID assigned to new circuit
- "BUILT" : all hops finished, can now accept streams
- "EXTENDED" : one more hop has been completed
- "FAILED" : circuit closed (was not built)
- "CLOSED" : circuit closed (was built)
-
streamStatus
void streamStatus(java.lang.String status, java.lang.String streamID, java.lang.String target)Invoked when a stream's status has changed. Possible values for status are:- "NEW" : New request to connect
- "NEWRESOLVE" : New request to resolve an address
- "SENTCONNECT" : Sent a connect cell along a circuit
- "SENTRESOLVE" : Sent a resolve cell along a circuit
- "SUCCEEDED" : Received a reply; stream established
- "FAILED" : Stream failed and not retriable.
- "CLOSED" : Stream closed
- "DETACHED" : Detached from circuit; still retriable.
-
orConnStatus
void orConnStatus(java.lang.String status, java.lang.String orName)Invoked when the status of a connection to an OR has changed. Possible values for status are ["LAUNCHED" | "CONNECTED" | "FAILED" | "CLOSED"]. orName is the alphanumeric identifier of the OR affected.
-
bandwidthUsed
void bandwidthUsed(long read, long written)Invoked once per second. read and written are the number of bytes read and written, respectively, in the last second.
-
newDescriptors
void newDescriptors(java.util.List<java.lang.String> orList)
Invoked whenever Tor learns about new ORs. The orList object contains the alphanumeric ServerIDs associated with the new ORs.
-
message
void message(java.lang.String severity, java.lang.String msg)Invoked when Tor logs a message. severity is one of ["DEBUG" | "INFO" | "NOTICE" | "WARN" | "ERR"], and msg is the message string.
-
unrecognized
void unrecognized(java.lang.String type, java.lang.String msg)Invoked when an unspecified message is received.is the message type, and is the message string.
-
controlConnectionClosed
void controlConnectionClosed()
Invoked when Tor closes the control connection.
-
-