Class DefaultGiteaConnectionFactory

java.lang.Object
org.jenkinsci.plugin.gitea.client.spi.GiteaConnectionFactory
org.jenkinsci.plugin.gitea.client.impl.DefaultGiteaConnectionFactory

public class DefaultGiteaConnectionFactory extends GiteaConnectionFactory
The SPI implementation of GiteaConnectionFactory.
  • Constructor Details

    • DefaultGiteaConnectionFactory

      public DefaultGiteaConnectionFactory()
  • Method Details

    • canOpen

      public boolean canOpen(@NonNull Gitea gitea)
      SPI: confirm that this factory can open connections to the supplied builder.
      Specified by:
      canOpen in class GiteaConnectionFactory
      Parameters:
      gitea - the builder.
      Returns:
      true if connections can be opened.
    • open

      @NonNull public GiteaConnection open(@NonNull Gitea gitea) throws IOException
      SPI: open the connection to the supplied URL with the supplied authentication.
      Specified by:
      open in class GiteaConnectionFactory
      Parameters:
      gitea - the builder.
      Returns:
      the connection.
      Throws:
      IOException - if the connection could not be opened.