Interface ProtocolDetectorService


public interface ProtocolDetectorService
  • Method Summary

    Modifier and Type
    Method
    Description
    it.unimi.dsi.fastutil.objects.Object2IntMap<String>
    Returns an unmodifiable map of detected protocol versions.
    void
    Probes all registered proxied servers for their protocol version.
    Returns the protocol version of the proxied server, or -1 if unknown.
    void
    setProtocolVersion(String serverName, int protocolVersion)
    Sets the stored protocol version of a proxied server.
    int
    Uncaches and returns the previously stored protocol version of the proxied server.
  • Method Details

    • serverProtocolVersion

      ProtocolVersion serverProtocolVersion(String serverName)
      Returns the protocol version of the proxied server, or -1 if unknown.
      Parameters:
      serverName - name of the proxied server
      Returns:
      protocol version of the proxied server, or -1 if unknown
    • probeAllServers

      void probeAllServers()
      Probes all registered proxied servers for their protocol version. This is executed automatically in the interval set in the ViaVersion config.
    • setProtocolVersion

      void setProtocolVersion(String serverName, int protocolVersion)
      Sets the stored protocol version of a proxied server.
      Parameters:
      serverName - name of the proxied server
      protocolVersion - protocol version of the server
    • uncacheProtocolVersion

      int uncacheProtocolVersion(String serverName)
      Uncaches and returns the previously stored protocol version of the proxied server. Returns -1 if none was stored.
      Parameters:
      serverName - name of the proxied server
      Returns:
      previously stored protocol version of the proxied server, or -1 if none was present
    • detectedProtocolVersions

      it.unimi.dsi.fastutil.objects.Object2IntMap<String> detectedProtocolVersions()
      Returns an unmodifiable map of detected protocol versions.
      Returns:
      unmodifiable map of detected protocol versions