Package org.jspace.gate
Class TcpServerGate
java.lang.Object
org.jspace.gate.TcpServerGate
- All Implemented Interfaces:
ServerGate
- Direct Known Subclasses:
ConnServerGate
,KeepServerGate
public abstract class TcpServerGate extends java.lang.Object implements ServerGate
-
Field Summary
Fields Modifier and Type Field Description protected java.net.InetSocketAddress
address
protected int
backlog
protected boolean
isClosed
protected jSpaceMarshaller
marshaller
-
Constructor Summary
Constructors Constructor Description TcpServerGate(jSpaceMarshaller marshaller, java.net.InetSocketAddress address, int backlog)
-
Method Summary
Modifier and Type Method Description ClientHandler
accept()
void
close()
protected abstract ClientHandler
getClientHandler(java.net.Socket socket)
protected abstract java.lang.String
getConnectionCode()
java.net.URI
getURI()
boolean
isClosed()
void
open()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
marshaller
-
address
protected final java.net.InetSocketAddress address -
backlog
protected final int backlog -
isClosed
protected boolean isClosed
-
-
Constructor Details
-
TcpServerGate
-
-
Method Details
-
open
public void open() throws java.io.IOException- Specified by:
open
in interfaceServerGate
- Throws:
java.io.IOException
-
accept
- Specified by:
accept
in interfaceServerGate
- Throws:
java.io.IOException
-
getClientHandler
protected abstract ClientHandler getClientHandler(java.net.Socket socket) throws java.io.IOException- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
close
in interfaceServerGate
- Throws:
java.io.IOException
-
getURI
public java.net.URI getURI()- Specified by:
getURI
in interfaceServerGate
-
getConnectionCode
protected abstract java.lang.String getConnectionCode() -
isClosed
public boolean isClosed()- Specified by:
isClosed
in interfaceServerGate
-