TorCircuit (SelekTOR Java Documentation)
Date: 2018-05-25

client

## Class TorCircuit

- java.lang.Object
- - client.TorCircuit

-     public final class TorCircuit
      extends java.lang.Object

  Author:
    Alistair Neil

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `FINGER`
    `static int` | `NICKNAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TorCircuit()` Constructor
    `TorCircuit(java.lang.String circuit)` Constructor, Create circuit object with given circuit

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getBuildFlags()` Get current circuits build flags
    `java.lang.String` | `getCircuit()` Get circuit
    `java.lang.String` | `getExit(int type)` Get Exitnode
    `java.lang.String` | `getExitHop()` Get current circuits exit node
    `static java.lang.String` | `getFromNodeHop(java.lang.String nodeinfo, int type)` Get fingerprint of given node Nodeinfo is in the format of fingerprint~name or fingerprint=name
    `java.lang.String` | `getGuard(int type)` Get Guardnode finger or nick
    `java.lang.String` | `getGuardHop()` Get current circuits guard or entry node
    `java.lang.String` | `getHops()` Get circuit hops
    `java.lang.String` | `getID()` Get current circuit ID
    `java.lang.String` | `getMiddleHop()` Get current circuits middle node if any, returns exit node for a two hop circuit
    `java.lang.String` | `getMiddleMan(int type)` Get Middleman
    `java.lang.String` | `getPurpose()` Get current circuits purpose
    `java.lang.String` | `getStatus()` Get current circuit status
    `java.lang.String` | `getTimestamp()` Get current circuits timestamp
    `void` | `setCircuit(java.lang.String circuit)` Set circuit to supplied circuit
    `void` | `setHops(java.lang.String hops)` Set hops

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### FINGER

          public static final int FINGER

      See Also:
        Constant Field Values

    - #### NICKNAME

          public static final int NICKNAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TorCircuit

          public TorCircuit()

      Constructor

    - #### TorCircuit

          public TorCircuit(java.lang.String circuit)

      Constructor, Create circuit object with given circuit
      Parameters:
        `circuit` -

  - ### Method Detail

    - #### setCircuit

          public void setCircuit(java.lang.String circuit)

      Set circuit to supplied circuit
      Parameters:
        `circuit` -

    - #### getCircuit

          public java.lang.String getCircuit()

      Get circuit
      Returns:
        circuit as string

    - #### setHops

          public void setHops(java.lang.String hops)

      Set hops
      Parameters:
        `hops` -

    - #### getID

          public java.lang.String getID()

      Get current circuit ID
      Returns:
        ID as string

    - #### getStatus

          public java.lang.String getStatus()

      Get current circuit status
      Returns:
        status as string

    - #### getBuildFlags

          public java.lang.String getBuildFlags()

      Get current circuits build flags
      Returns:
        build flags as string

    - #### getPurpose

          public java.lang.String getPurpose()

      Get current circuits purpose
      Returns:
        purpose as string

    - #### getTimestamp

          public java.lang.String getTimestamp()

      Get current circuits timestamp
      Returns:
        timestamp as string

    - #### getHops

          public java.lang.String getHops()

      Get circuit hops
      Returns:
        circuit hops as string

    - #### getGuardHop

          public java.lang.String getGuardHop()

      Get current circuits guard or entry node
      Returns:
        guard node as string

    - #### getMiddleHop

          public java.lang.String getMiddleHop()

      Get current circuits middle node if any, returns exit node for a two hop circuit
      Returns:
        middleman node as string

    - #### getExitHop

          public java.lang.String getExitHop()

      Get current circuits exit node
      Returns:
        exit node as string

    - #### getGuard

          public java.lang.String getGuard(int type)

      Get Guardnode finger or nick
      Parameters:
        `type` - 0 = finger, 1 = nick
      Returns:
        fingerprint as string

    - #### getMiddleMan

          public java.lang.String getMiddleMan(int type)

      Get Middleman
      Parameters:
        `type` - 0 = finger, 1 = nick
      Returns:
        fingerprint as string

    - #### getExit

          public java.lang.String getExit(int type)

      Get Exitnode
      Parameters:
        `type` - 0 = finger, 1 = nick
      Returns:
        fingerprint as string

    - #### getFromNodeHop

          public static java.lang.String getFromNodeHop(java.lang.String nodeinfo,
                                                        int type)

      Get fingerprint of given node Nodeinfo is in the format of fingerprint~name or fingerprint=name
      Parameters:
        `nodeinfo` -
        `type` - 0 = finger, 1 = nickname
      Returns:
        fingerprint as string