public abstract class AbstractSocketServer extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
private int |
bindingPort
.
|
private InputStream |
in
.
|
private OutputStream |
out
.
|
private int |
port
.
|
private Socket |
socket
.
|
private ServerSocket |
socketServer
.
|
Constructor and Description |
---|
AbstractSocketServer(int bindingPort) |
Modifier and Type | Method and Description |
---|---|
void |
accept() |
int |
bind() |
void |
close() |
int |
getBindingPort() |
int |
getPort() |
protected abstract void |
handle(InputStream in,
OutputStream out) |
private final int bindingPort
private ServerSocket socketServer
private InputStream in
private OutputStream out
private int port
public AbstractSocketServer(int bindingPort)
public final int getBindingPort()
public final int getPort()
public final int bind() throws IOException
IOException
public final void accept() throws IOException
IOException
protected abstract void handle(InputStream in, OutputStream out) throws IOException
IOException
public final void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2015 eXo Platform SAS. All Rights Reserved.