Class SimpleHttpServer

java.lang.Object
org.eclipse.jgit.junit.http.SimpleHttpServer

public class SimpleHttpServer extends Object
Simple http server for testing http access to Git repositories. Authentication with hardcoded credentials user:agitter password:letmein.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SimpleHttpServer(org.eclipse.jgit.lib.Repository repository)
    Constructor for SimpleHttpServer.
    SimpleHttpServer(org.eclipse.jgit.lib.Repository repository, boolean withSsl)
    Constructor for SimpleHttpServer.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.eclipse.jgit.transport.URIish
    Get the secureUri.
    org.eclipse.jgit.transport.URIish
    Get the uri.
    void
    Start the server
    void
    Stop the server.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SimpleHttpServer

      public SimpleHttpServer(org.eclipse.jgit.lib.Repository repository)
      Constructor for SimpleHttpServer.
      Parameters:
      repository - the repository
    • SimpleHttpServer

      public SimpleHttpServer(org.eclipse.jgit.lib.Repository repository, boolean withSsl)
      Constructor for SimpleHttpServer.
      Parameters:
      repository - the repository
      withSsl - whether to encrypt the communication
  • Method Details

    • start

      public void start() throws Exception
      Start the server
      Throws:
      Exception - if an error occurred
    • stop

      public void stop() throws Exception
      Stop the server.
      Throws:
      Exception - if an error occurred
    • getUri

      public org.eclipse.jgit.transport.URIish getUri()
      Get the uri.
      Returns:
      the uri
    • getSecureUri

      public org.eclipse.jgit.transport.URIish getSecureUri()
      Get the secureUri.
      Returns:
      the secure uri