summaryrefslogtreecommitdiffstats
path: root/simple/simple-http/src/test/java/org/simpleframework/http/core/MockController.java
diff options
context:
space:
mode:
Diffstat (limited to 'simple/simple-http/src/test/java/org/simpleframework/http/core/MockController.java')
-rw-r--r--simple/simple-http/src/test/java/org/simpleframework/http/core/MockController.java55
1 files changed, 55 insertions, 0 deletions
diff --git a/simple/simple-http/src/test/java/org/simpleframework/http/core/MockController.java b/simple/simple-http/src/test/java/org/simpleframework/http/core/MockController.java
new file mode 100644
index 0000000..b631803
--- /dev/null
+++ b/simple/simple-http/src/test/java/org/simpleframework/http/core/MockController.java
@@ -0,0 +1,55 @@
+package org.simpleframework.http.core;
+
+import java.io.IOException;
+
+import org.simpleframework.transport.Channel;
+
+public class MockController implements Controller {
+
+ private boolean ready;
+ private boolean sleep;
+ private boolean start;
+ private boolean initiated;
+ private boolean stop;
+
+ public void start(Channel channel) throws IOException {
+ initiated = true;
+ }
+
+ public void ready(Collector collector) throws IOException {
+ ready = true;
+ }
+
+ public void select(Collector collector) throws IOException {
+ sleep = true;
+ }
+
+ public void start(Collector collector) throws IOException {
+ start = true;
+ }
+
+ public void stop() throws IOException {
+ stop = true;
+ }
+
+ public boolean isStopped() {
+ return stop;
+ }
+
+ public boolean isInitiated() {
+ return initiated;
+ }
+
+ public boolean isReady() {
+ return ready;
+ }
+
+ public boolean isSleep() {
+ return sleep;
+ }
+
+ public boolean isStart() {
+ return start;
+ }
+
+}