Simplify interpreter

This commit is contained in:
René Pfeuffer
2019-03-05 17:57:38 +01:00
parent a16bb0d0af
commit a1e43ee571
3 changed files with 11 additions and 13 deletions

View File

@@ -1,13 +1,8 @@
package sonia.scm.protocolcommand;
import sonia.scm.plugin.ExtensionPoint;
@ExtensionPoint
public interface CommandInterpreter {
boolean canHandle(String command);
CommandParser getParser();
String[] getParsedArgs();
ScmCommandProtocol getProtocolHandler();
}

View File

@@ -0,0 +1,10 @@
package sonia.scm.protocolcommand;
import sonia.scm.plugin.ExtensionPoint;
import java.util.Optional;
@ExtensionPoint
public interface CommandInterpreterFactory {
Optional<CommandInterpreter> canHandle(String command);
}

View File

@@ -1,7 +0,0 @@
package sonia.scm.protocolcommand;
public interface CommandParser {
String[] parse(String command);
}