Class DebuggingEventHandler

  • All Implemented Interfaces:
    EventHandler

    public class DebuggingEventHandler
    extends java.lang.Object
    implements EventHandler
    • Constructor Summary

      Constructors 
      Constructor Description
      DebuggingEventHandler​(java.io.PrintWriter p)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void bandwidthUsed​(long read, long written)
      Invoked once per second.
      void circuitStatus​(java.lang.String status, java.lang.String circID, java.lang.String path)
      Invoked when a circuit's status has changed.
      void controlConnectionClosed()
      Invoked when Tor closes the control connection.
      void message​(java.lang.String type, java.lang.String msg)
      Invoked when Tor logs a message.
      void newDescriptors​(java.util.List<java.lang.String> orList)
      Invoked whenever Tor learns about new ORs.
      void orConnStatus​(java.lang.String status, java.lang.String orName)
      Invoked when the status of a connection to an OR has changed.
      void streamStatus​(java.lang.String status, java.lang.String streamID, java.lang.String target)
      Invoked when a stream's status has changed.
      void unrecognized​(java.lang.String type, java.lang.String msg)
      Invoked when an unspecified message is received.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DebuggingEventHandler

        public DebuggingEventHandler​(java.io.PrintWriter p)
    • Method Detail

      • circuitStatus

        public void circuitStatus​(java.lang.String status,
                                  java.lang.String circID,
                                  java.lang.String path)
        Description copied from interface: EventHandler
        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)
        circID is the alphanumeric identifier of the affected circuit, and path is a comma-separated list of alphanumeric ServerIDs.
        Specified by:
        circuitStatus in interface EventHandler
      • streamStatus

        public void streamStatus​(java.lang.String status,
                                 java.lang.String streamID,
                                 java.lang.String target)
        Description copied from interface: EventHandler
        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.
        streamID is the alphanumeric identifier of the affected stream, and its target is specified as address:port.
        Specified by:
        streamStatus in interface EventHandler
      • orConnStatus

        public void orConnStatus​(java.lang.String status,
                                 java.lang.String orName)
        Description copied from interface: EventHandler
        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.
        Specified by:
        orConnStatus in interface EventHandler
      • bandwidthUsed

        public void bandwidthUsed​(long read,
                                  long written)
        Description copied from interface: EventHandler
        Invoked once per second. read and written are the number of bytes read and written, respectively, in the last second.
        Specified by:
        bandwidthUsed in interface EventHandler
      • newDescriptors

        public void newDescriptors​(java.util.List<java.lang.String> orList)
        Description copied from interface: EventHandler
        Invoked whenever Tor learns about new ORs. The orList object contains the alphanumeric ServerIDs associated with the new ORs.
        Specified by:
        newDescriptors in interface EventHandler
      • message

        public void message​(java.lang.String type,
                            java.lang.String msg)
        Description copied from interface: EventHandler
        Invoked when Tor logs a message. severity is one of ["DEBUG" | "INFO" | "NOTICE" | "WARN" | "ERR"], and msg is the message string.
        Specified by:
        message in interface EventHandler
      • unrecognized

        public void unrecognized​(java.lang.String type,
                                 java.lang.String msg)
        Description copied from interface: EventHandler
        Invoked when an unspecified message is received. is the message type, and is the message string.
        Specified by:
        unrecognized in interface EventHandler