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.InetSocketAddressaddressprotected intbacklogprotected booleanisClosedprotected jSpaceMarshallermarshaller -
Constructor Summary
Constructors Constructor Description TcpServerGate(jSpaceMarshaller marshaller, java.net.InetSocketAddress address, int backlog) -
Method Summary
Modifier and Type Method Description ClientHandleraccept()voidclose()protected abstract ClientHandlergetClientHandler(java.net.Socket socket)protected abstract java.lang.StringgetConnectionCode()java.net.URIgetURI()booleanisClosed()voidopen()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:
openin interfaceServerGate- Throws:
java.io.IOException
-
accept
- Specified by:
acceptin 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:
closein interfaceServerGate- Throws:
java.io.IOException
-
getURI
public java.net.URI getURI()- Specified by:
getURIin interfaceServerGate
-
getConnectionCode
protected abstract java.lang.String getConnectionCode() -
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceServerGate
-