Interface NetworkStatusEntry

  • All Superinterfaces:
    java.io.Serializable

    public interface NetworkStatusEntry
    extends java.io.Serializable
    Contains an entry in a network status in the version 2 or 3 directory protocol or in a bridge network status.

    A network status entry is not a descriptor type of its own but is part of a network status in the version 2 directory protocol (RelayNetworkStatus), a vote (RelayNetworkStatusVote) or flavored/unflavored consensus (@link RelayNetworkStatusConsensus}) in the version 3 directory protocol, or a bridge network status (BridgeNetworkStatus). Entries in signed directories in the version 1 directory protocol are represented by router status entries (RouterStatusEntry).

    Since:
    1.0.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getAddress()
      Return the server's primary IPv4 address in dotted-quad format.
      long getBandwidth()
      Return the bandwidth weight of this server or -1 if the status entry didn't contain a bandwidth line.
      java.lang.String getDefaultPolicy()
      Return the default policy of the port summary, which can be either "accept" or "reject", or null if the status entry didn't contain an exit policy summary.
      java.lang.String getDescriptor()
      Return the SHA-1 digest of the server descriptor, or null if the containing network status does not contain server descriptor references, like a microdesc consensus.
      int getDirPort()
      Return the TCP port where this server accepts directory-related HTTP connections.
      java.lang.String getFingerprint()
      Return a SHA-1 digest of the server's identity key, encoded as 40 upper-case hexadecimal characters.
      java.util.SortedSet<java.lang.String> getFlags()
      Return the relay flags assigned to this server, or null if the status entry didn't contain any relay flags.
      java.lang.String getMasterKeyEd25519()
      Return the server's Ed25519 master key, encoded as 43 base64 characters without padding characters, "none" if the relay doesn't have an Ed25519 identity, or null if the status entry didn't contain this information or if the status is not a vote.
      long getMeasured()
      Return the measured bandwidth or -1 if the status entry either didn't contain bandwidth information or didn't contain an indication that this information is based on measured bandwidth.
      java.util.Set<java.lang.String> getMicrodescriptorDigestsSha256Base64()
      Return the (possibly empty) set of microdescriptor digests, encoded as 43 base64 characters without padding characters, if the containing network status is a vote or microdesc consensus, or null otherwise.
      java.lang.String getNickname()
      Return the server nickname consisting of 1 to 19 alphanumeric characters.
      java.util.List<java.lang.String> getOrAddresses()
      Return additional IP addresses and TCP ports where this server accepts TLS connections for the main OR protocol, or an empty list if the network status doesn't contain any such additional addresses and ports.
      int getOrPort()
      Return the TCP port where this server accepts TLS connections for the main OR protocol.
      java.lang.String getPortList()
      Return the list of ports or port intervals of the exit port summary, or null if the status entry didn't contain an exit policy summary.
      java.util.SortedMap<java.lang.String,​java.util.SortedSet<java.lang.Long>> getProtocols()
      Return the version numbers of all protocols supported by this server, or null if the status entry does not specify supported protocol versions.
      long getPublishedMillis()
      Return the time in milliseconds since the epoch when this descriptor was published.
      java.util.SortedMap<java.lang.String,​java.lang.Double> getStats()
      Return the various statistics that an authority has computed for this relay.
      byte[] getStatusEntryBytes()
      Return the raw network status entry bytes.
      java.lang.String getSupportedConsensusMethods()
      Return the server's supported consensus methods, or null if the status entry didn't contain this information or if the status is not a vote.
      boolean getUnmeasured()
      Return whether the status entry is yet unmeasured by the bandwidth authorities; only included in consensuses using method 17 or higher.
      java.lang.String getVersion()
      Return the Tor software version, or null if the status entry didn't contain version information.
    • Method Detail

      • getStatusEntryBytes

        byte[] getStatusEntryBytes()
        Return the raw network status entry bytes.
        Since:
        1.0.0
      • getNickname

        java.lang.String getNickname()
        Return the server nickname consisting of 1 to 19 alphanumeric characters.
        Since:
        1.0.0
      • getFingerprint

        java.lang.String getFingerprint()
        Return a SHA-1 digest of the server's identity key, encoded as 40 upper-case hexadecimal characters.
        Since:
        1.0.0
      • getDescriptor

        java.lang.String getDescriptor()
        Return the SHA-1 digest of the server descriptor, or null if the containing network status does not contain server descriptor references, like a microdesc consensus.
        Since:
        1.0.0
      • getPublishedMillis

        long getPublishedMillis()
        Return the time in milliseconds since the epoch when this descriptor was published.
        Since:
        1.0.0
      • getAddress

        java.lang.String getAddress()
        Return the server's primary IPv4 address in dotted-quad format.
        Since:
        1.0.0
      • getOrPort

        int getOrPort()
        Return the TCP port where this server accepts TLS connections for the main OR protocol.
        Since:
        1.0.0
      • getDirPort

        int getDirPort()
        Return the TCP port where this server accepts directory-related HTTP connections.
        Since:
        1.0.0
      • getMicrodescriptorDigestsSha256Base64

        java.util.Set<java.lang.String> getMicrodescriptorDigestsSha256Base64()
        Return the (possibly empty) set of microdescriptor digests, encoded as 43 base64 characters without padding characters, if the containing network status is a vote or microdesc consensus, or null otherwise.
        Since:
        1.7.0
      • getOrAddresses

        java.util.List<java.lang.String> getOrAddresses()
        Return additional IP addresses and TCP ports where this server accepts TLS connections for the main OR protocol, or an empty list if the network status doesn't contain any such additional addresses and ports.
        Since:
        1.0.0
      • getFlags

        java.util.SortedSet<java.lang.String> getFlags()
        Return the relay flags assigned to this server, or null if the status entry didn't contain any relay flags.
        Since:
        1.0.0
      • getVersion

        java.lang.String getVersion()
        Return the Tor software version, or null if the status entry didn't contain version information.
        Since:
        1.0.0
      • getProtocols

        java.util.SortedMap<java.lang.String,​java.util.SortedSet<java.lang.Long>> getProtocols()
        Return the version numbers of all protocols supported by this server, or null if the status entry does not specify supported protocol versions.
        Since:
        1.6.0
      • getStats

        java.util.SortedMap<java.lang.String,​java.lang.Double> getStats()
        Return the various statistics that an authority has computed for this relay. Each stats is represented as a key + value.
        Since:
        2.20.0
      • getBandwidth

        long getBandwidth()
        Return the bandwidth weight of this server or -1 if the status entry didn't contain a bandwidth line.
        Since:
        1.0.0
      • getMeasured

        long getMeasured()
        Return the measured bandwidth or -1 if the status entry either didn't contain bandwidth information or didn't contain an indication that this information is based on measured bandwidth.
        Since:
        1.0.0
      • getUnmeasured

        boolean getUnmeasured()
        Return whether the status entry is yet unmeasured by the bandwidth authorities; only included in consensuses using method 17 or higher.
        Since:
        1.0.0
      • getDefaultPolicy

        java.lang.String getDefaultPolicy()
        Return the default policy of the port summary, which can be either "accept" or "reject", or null if the status entry didn't contain an exit policy summary.
        Since:
        1.0.0
      • getPortList

        java.lang.String getPortList()
        Return the list of ports or port intervals of the exit port summary, or null if the status entry didn't contain an exit policy summary.
        Since:
        1.0.0
      • getMasterKeyEd25519

        java.lang.String getMasterKeyEd25519()
        Return the server's Ed25519 master key, encoded as 43 base64 characters without padding characters, "none" if the relay doesn't have an Ed25519 identity, or null if the status entry didn't contain this information or if the status is not a vote.
        Since:
        1.1.0
      • getSupportedConsensusMethods

        java.lang.String getSupportedConsensusMethods()
        Return the server's supported consensus methods, or null if the status entry didn't contain this information or if the status is not a vote.
        Since:
        1.2.20