public class ServerHelper extends ConnectorHelper<Server>
Constructor and Description |
---|
ServerHelper(Server server)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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()
Stop callback.
|
getConnectorService, getContext, getProtocols, start, update
getAttributes, getHelped, getHelpedParameters, getLogger, getMetadataService, setHelped
public ServerHelper(Server server)
server
- The client to help.public void handle(Request request, Response response)
Server.handle(Request, Response)
method.handle
in class RestletHelper<Server>
request
- The request to handle.response
- The response to update.public void setEphemeralPort(int localPort)
localPort
- The ephemeral local port.public void setEphemeralPort(java.net.ServerSocket socket)
socket
- The bound server socket.public void stop() throws java.lang.Exception
RestletHelper
stop
in class ConnectorHelper<Server>
java.lang.Exception
Copyright © 2005-2024 Restlet.