Class ServerHelper

Direct Known Subclasses:
HttpServerHelper, RiapServerHelper

public class ServerHelper extends ConnectorHelper<Server>
Server connector helper.
Author:
Jerome Louvel
  • Constructor Details

    • ServerHelper

      public ServerHelper(Server server)
      Constructor.
      Parameters:
      server - The client to help.
  • Method Details

    • 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 RestletHelper<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(ServerSocket socket)
      Sets the ephemeral port in the attributes map if necessary.
      Parameters:
      socket - The bound server socket.
    • stop

      public void stop() throws Exception
      Description copied from class: RestletHelper
      Stop callback.
      Overrides:
      stop in class ConnectorHelper<Server>
      Throws:
      Exception