Interface ReceivePackFactory<C>

  • Type Parameters:
    C - type of connection
    All Known Implementing Classes:
    DefaultReceivePackFactory

    public interface ReceivePackFactory<C>
    Create and configure ReceivePack service instance.
    • Field Detail

      • DISABLED

        static final ReceivePackFactory<?> DISABLED
        A factory disabling the ReceivePack service for all repositories
    • Method Detail

      • create

        ReceivePack create​(C req,
                           Repository db)
                    throws ServiceNotEnabledException,
                           ServiceNotAuthorizedException
        Create and configure a new ReceivePack instance for a repository.
        Parameters:
        req - current request, in case information from the request may help configure the ReceivePack instance.
        db - the repository the receive would write into.
        Returns:
        the newly configured ReceivePack instance, must not be null.
        Throws:
        ServiceNotEnabledException - this factory refuses to create the instance because it is not allowed on the target repository, by any user.
        ServiceNotAuthorizedException - this factory refuses to create the instance for this HTTP request and repository, such as due to a permission error.