ProtocolWriter : modèle pour règles protocoles d'écriture
This commit is contained in:
parent
a883918363
commit
8201d3db91
@ -0,0 +1,23 @@
|
||||
package lightcontainer.protocol;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public abstract class ProtocolWriter {
|
||||
|
||||
private final Pattern rulePattern;
|
||||
|
||||
protected ProtocolWriter(String pattern) {
|
||||
this.rulePattern = Pattern.compile(pattern);
|
||||
}
|
||||
|
||||
public String execute(String data) {
|
||||
Matcher ruleMatcher = this.rulePattern.matcher(data);
|
||||
|
||||
if (ruleMatcher.matches()) {
|
||||
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user