com.noelios.restlet
Class ServerHelper

java.lang.Object
  extended by org.restlet.util.Helper<T>
      extended by com.noelios.restlet.ConnectorHelper<Server>
          extended by com.noelios.restlet.ServerHelper
Direct Known Subclasses:
HttpServerHelper

public class ServerHelper
extends ConnectorHelper<Server>

Server connector helper.

Author:
Jerome Louvel

Constructor Summary
ServerHelper(Server server)
          Constructor.
 
Method Summary
 void handle(Request request, Response response)
          Handles a call by invoking the helped Server's Server.handle(Request, Response) method.
 void setEphemeralPort(int localPort)
          Sets the ephemeral port in the attributes map if necessary.
 void setEphemeralPort(java.net.ServerSocket socket)
          Sets the ephemeral port in the attributes map if necessary.
 void stop()
           
 
Methods inherited from class com.noelios.restlet.ConnectorHelper
getProtocols, start, 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

ServerHelper

public ServerHelper(Server server)
Constructor.

Parameters:
server - The client to help.
Method Detail

handle

public void handle(Request request,
                   Response response)
Handles a call by invoking the helped Server's Server.handle(Request, Response) method.

Overrides:
handle in class Helper<Server>
Parameters:
request - The request to handle.
response - The response to update.

setEphemeralPort

public void setEphemeralPort(int localPort)
Sets the ephemeral port in the attributes map if necessary.

Parameters:
localPort - The ephemeral local port.

setEphemeralPort

public void setEphemeralPort(java.net.ServerSocket socket)
Sets the ephemeral port in the attributes map if necessary.

Parameters:
socket - The bound server socket.

stop

public void stop()
          throws java.lang.Exception
Overrides:
stop in class ConnectorHelper<Server>
Throws:
java.lang.Exception


Copyright © 2005-2008 Noelios Technologies.