pygmy.core
Class ServerSocketEndPoint
java.lang.Object
pygmy.core.ServerSocketEndPoint
- All Implemented Interfaces:
- java.lang.Runnable, EndPoint
- Direct Known Subclasses:
- NntpEndPoint, SSLServerSocketEndPoint
public class ServerSocketEndPoint
- extends java.lang.Object
- implements EndPoint, java.lang.Runnable
This EndPoint provides normal sockets for the http protocol. It can be sublasses and overriden for protocols other
than http.
port | The port the socket should listen on. | 80 | No |
host | The ip or dns of the host adapter this socket should bind to. | None | No |
resolveHostName | If the server should do a reverse DNS on the connections so the logs will show the DNS name of the client. | false | No |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
factory
protected javax.net.ServerSocketFactory factory
socket
protected java.net.ServerSocket socket
server
protected Server server
endpointName
protected java.lang.String endpointName
resolveHostName
protected boolean resolveHostName
ServerSocketEndPoint
public ServerSocketEndPoint()
initialize
public void initialize(java.lang.String name,
Server server)
throws java.io.IOException
- Specified by:
initialize
in interface EndPoint
- Throws:
java.io.IOException
getName
public java.lang.String getName()
- Specified by:
getName
in interface EndPoint
createSocket
protected java.net.ServerSocket createSocket(int port)
throws java.io.IOException
- Throws:
java.io.IOException
start
public void start()
- Specified by:
start
in interface EndPoint
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
getProtocol
protected java.lang.String getProtocol()
createRunnable
protected java.lang.Runnable createRunnable(java.net.Socket client,
java.util.Properties config)
throws java.io.IOException
- Throws:
java.io.IOException
shutdown
public void shutdown(Server server)
- Specified by:
shutdown
in interface EndPoint