java.lang.Object
org.jenkinsci.plugin.gitea.client.api.Gitea

public final class Gitea extends Object
Entry point to the Gitea client API for opening a GiteaConnection.
  • Field Details

    • IGNORE_UNKNOWN_PROPERTIES

      public static final boolean IGNORE_UNKNOWN_PROPERTIES
      The JsonIgnoreProperties.ignoreUnknown() to use. (For production use this should always be true, but during testing of API changes it can be changed to false so that the API can be verified as correctly implemented.
      See Also:
  • Method Details

    • server

      @NonNull public static Gitea server(@NonNull String serverUrl)
      Creates a new Gitea.
      Parameters:
      serverUrl - URL of the Gitea server.
      Returns:
      the Gitea.
    • as

      @NonNull public Gitea as(@CheckForNull GiteaAuth authentication)
      Specify the authentication to connect to the server with.
      Parameters:
      authentication - the authentication.
      Returns:
      this for method chaining.
    • serverUrl

      @NonNull public String serverUrl()
    • as

      @NonNull public GiteaAuth as()
    • classLoader

      @CheckForNull public ClassLoader classLoader()
    • classLoader

      public Gitea classLoader(@CheckForNull ClassLoader classLoader)
      Sets the ClassLoader that the SPI implementation will be resolved from.
      Parameters:
      classLoader - the ClassLoader
      Returns:
      this for method chaining.
    • open

      @NonNull public GiteaConnection open() throws IOException, InterruptedException
      Opens a GiteaConnection to the Gitea server.
      Returns:
      the connection.
      Throws:
      IOException - if the connection could not be established.
      InterruptedException - if interrupted while opening the connection.
    • jenkinsPluginClassLoader

      public Gitea jenkinsPluginClassLoader()