com.noelios.restlet.http
Class StreamServerHelper

java.lang.Object
  extended by org.restlet.util.Helper<T>
      extended by com.noelios.restlet.ConnectorHelper<Server>
          extended by com.noelios.restlet.ServerHelper
              extended by com.noelios.restlet.http.HttpServerHelper
                  extended by com.noelios.restlet.http.StreamServerHelper

public class StreamServerHelper
extends HttpServerHelper

HTTP server helper based on NIO blocking sockets.

Author:
Jerome Louvel

Constructor Summary
StreamServerHelper(Server server)
          Constructor.
 
Method Summary
protected  ServerSocketChannel createServerSocket()
          Create a server socket channel and bind it to the given address
protected  SocketAddress createSocketAddress()
          Creates a socket address to listen on.
 void start()
           
 void stop()
           
 
Methods inherited from class com.noelios.restlet.http.HttpServerHelper
getConverter, handle, setConverter
 
Methods inherited from class com.noelios.restlet.ServerHelper
handle, setEphemeralPort, setEphemeralPort
 
Methods inherited from class com.noelios.restlet.ConnectorHelper
getProtocols, update
 
Methods inherited from class org.restlet.util.Helper
getAttributes, getContext, getHelped, getHelpedParameters, getLogger, setHelped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamServerHelper

public StreamServerHelper(Server server)
Constructor.

Parameters:
server - The server to help.
Method Detail

createServerSocket

protected ServerSocketChannel createServerSocket()
                                          throws IOException
Create a server socket channel and bind it to the given address

Returns:
Bound server socket channel.
Throws:
IOException

createSocketAddress

protected SocketAddress createSocketAddress()
                                     throws IOException
Creates a socket address to listen on.

Returns:
The created socket address.
Throws:
IOException

start

public void start()
           throws Exception
Overrides:
start in class ConnectorHelper<Server>
Throws:
Exception

stop

public void stop()
          throws Exception
Overrides:
stop in class ServerHelper
Throws:
Exception


Copyright © 2005-2008 Noelios Technologies.