com.noelios.restlet.http
Class StreamServerHelper
java.lang.Object
org.restlet.util.Helper<T>
com.noelios.restlet.ConnectorHelper<Server>
com.noelios.restlet.ServerHelper
com.noelios.restlet.http.HttpServerHelper
com.noelios.restlet.http.StreamServerHelper
public class StreamServerHelper
- extends HttpServerHelper
HTTP server helper based on NIO blocking sockets.
- Author:
- Jerome Louvel
Method Summary |
protected java.nio.channels.ServerSocketChannel |
createServerSocket()
Create a server socket channel and bind it to the given address |
protected java.net.SocketAddress |
createSocketAddress()
Creates a socket address to listen on. |
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StreamServerHelper
public StreamServerHelper(Server server)
- Constructor.
- Parameters:
server
- The server to help.
createServerSocket
protected java.nio.channels.ServerSocketChannel createServerSocket()
throws java.io.IOException
- Create a server socket channel and bind it to the given address
- Returns:
- Bound server socket channel.
- Throws:
java.io.IOException
createSocketAddress
protected java.net.SocketAddress createSocketAddress()
throws java.io.IOException
- Creates a socket address to listen on.
- Returns:
- The created socket address.
- Throws:
java.io.IOException
start
public void start()
throws java.lang.Exception
- Overrides:
start
in class ConnectorHelper<Server>
- Throws:
java.lang.Exception
stop
public void stop()
throws java.lang.Exception
- Overrides:
stop
in class ServerHelper
- Throws:
java.lang.Exception
Copyright © 2005-2008 Noelios Technologies.