diff --git a/app/src/main/java/lightcontainer/protocol/rules/HelloRule.java b/app/src/main/java/lightcontainer/protocol/rules/reader/HelloRule.java similarity index 93% rename from app/src/main/java/lightcontainer/protocol/rules/HelloRule.java rename to app/src/main/java/lightcontainer/protocol/rules/reader/HelloRule.java index 30acdb9..a39019b 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/HelloRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/reader/HelloRule.java @@ -1,4 +1,4 @@ -package lightcontainer.protocol.rules; +package lightcontainer.protocol.rules.reader; import lightcontainer.protocol.ProtocolReader; diff --git a/app/src/main/java/lightcontainer/protocol/rules/writer/SignoutRule.java b/app/src/main/java/lightcontainer/protocol/rules/writer/SignoutRule.java new file mode 100644 index 0000000..ff42d2c --- /dev/null +++ b/app/src/main/java/lightcontainer/protocol/rules/writer/SignoutRule.java @@ -0,0 +1,14 @@ +package lightcontainer.protocol.rules.writer; + +import lightcontainer.protocol.ProtocolWriter; + +public class SignoutRule extends ProtocolWriter { + + private static final String PATTERN = "^SIGNOUT\r\n$"; + + public static final String NAME = "SIGNOUT"; + + public SignoutRule() { + super(NAME, PATTERN); + } +} diff --git a/app/src/test/java/lightcontainer/protocol/rules/HelloRuleTest.java b/app/src/test/java/lightcontainer/protocol/rules/HelloRuleTest.java index 8305c90..55517f4 100644 --- a/app/src/test/java/lightcontainer/protocol/rules/HelloRuleTest.java +++ b/app/src/test/java/lightcontainer/protocol/rules/HelloRuleTest.java @@ -1,6 +1,7 @@ package lightcontainer.protocol.rules; import lightcontainer.protocol.ProtocolReader; +import lightcontainer.protocol.rules.reader.HelloRule; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*;