Expose ScmCommandProtocol as extension point

This is necessary so that multiple providers (git, hg, ...) can
implement this. The using class has to find the matching implementation.
This commit is contained in:
René Pfeuffer
2019-03-05 14:20:31 +01:00
parent ebb21ee308
commit dd71fb4c3b
3 changed files with 18 additions and 7 deletions

View File

@@ -1,8 +1,13 @@
package sonia.scm.protocolcommand;
import sonia.scm.plugin.ExtensionPoint;
import java.io.IOException;
public interface ScmSshProtocol {
@ExtensionPoint
public interface ScmCommandProtocol {
boolean canHandle(RepositoryContext repositoryContext);
void handle(CommandContext context, RepositoryContext repositoryContext) throws IOException;