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  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 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 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.