diff options
Diffstat (limited to 'src/com/isode/stroke/network/DummyConnectionServerFactory.java')
-rw-r--r-- | src/com/isode/stroke/network/DummyConnectionServerFactory.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/com/isode/stroke/network/DummyConnectionServerFactory.java b/src/com/isode/stroke/network/DummyConnectionServerFactory.java new file mode 100644 index 0000000..8d5c6fe --- /dev/null +++ b/src/com/isode/stroke/network/DummyConnectionServerFactory.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2014 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. + */ +/* + * Copyright (c) 2015 Tarun Gupta. + * Licensed under the simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. + */ + +package com.isode.stroke.network; + +import com.isode.stroke.eventloop.EventLoop; + +public class DummyConnectionServerFactory implements ConnectionServerFactory { + + private EventLoop eventLoop; + + public DummyConnectionServerFactory(EventLoop eventLoop) { + this.eventLoop = eventLoop; + } + + public ConnectionServer createConnectionServer(int port) { + return new DummyConnectionServer(eventLoop, port); + } + + public ConnectionServer createConnectionServer(final HostAddress hostAddress, int port) { + return new DummyConnectionServer(eventLoop, hostAddress, port); + } +}
\ No newline at end of file |