org.crsh.util
Class AbstractSocketServer
java.lang.Object
org.crsh.util.AbstractSocketServer
- All Implemented Interfaces:
- Closeable
- Direct Known Subclasses:
- RemoteServer
-
public abstract class AbstractSocketServer
- extends Object
-
- implements Closeable
-
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bindingPort
private final int bindingPort
-
.
socketServer
private ServerSocket socketServer
-
.
socket
private Socket socket
-
.
in
private InputStream in
-
.
out
private OutputStream out
-
.
port
private int port
-
.
AbstractSocketServer
public AbstractSocketServer(int bindingPort)
getBindingPort
public final int getBindingPort()
-
-
getPort
public final int getPort()
-
-
bind
public final int bind()
throws IOException
-
-
- Throws:
IOException
accept
public final void accept()
throws IOException
-
-
- Throws:
IOException
handle
protected abstract void handle(InputStream in,
OutputStream out)
throws IOException
-
-
- Throws:
IOException
close
public final void close()
-
- Specified by:
close
in interface Closeable
-
Copyright © 2014 eXo Platform SAS. All Rights Reserved.