diff options
author | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-04-05 16:36:03 +0200 |
---|---|---|
committer | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-04-05 16:36:03 +0200 |
commit | cfdde6b86b243cf412c1bb90e4e39de882d1c2e8 (patch) | |
tree | e45921a3d4b308c4bfc2f1f9499b0b95bf31ca8e /src/main/java/com/orbekk/protobuf/RequestHandler.java | |
parent | eb16cf212c75c81b8714308c7848887447aee33f (diff) |
Better server design.
Proper handling of asynchronous requests on the server.
Diffstat (limited to 'src/main/java/com/orbekk/protobuf/RequestHandler.java')
-rw-r--r-- | src/main/java/com/orbekk/protobuf/RequestHandler.java | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/main/java/com/orbekk/protobuf/RequestHandler.java b/src/main/java/com/orbekk/protobuf/RequestHandler.java deleted file mode 100644 index 0232a2c..0000000 --- a/src/main/java/com/orbekk/protobuf/RequestHandler.java +++ /dev/null @@ -1,32 +0,0 @@ -import java.util.concurrent.BlockingQueue; - -/** - * TODO: Move services to this class. - */ - -public class RequestHandler extends Thread { - private volatile boolean isStopped = false; - private final BlockingQueue<Data.Request> input; - private final BlockingQueue<Data.Response> output; - - public RequestHandler(BlockingQueue<Data.Request> input, - BlockingQueue<Data.Response> output) { - this.input = input; - this.output = output; - } - - private void handleRequest() { - - } - - @Override public void run() { - while (!isStopped) { - handleRequest(); - } - } - - @Override public void interrupt() { - super.interrupt(); - isStopped = true; - } -} |