Package org.restlet.engine.connector
Class ServerHelper
- Direct Known Subclasses:
HttpServerHelper,RiapServerHelper
Server connector helper.
- Author:
- Jerome Louvel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidHandles a call by invoking the helped Server'sServer.handle(Request, Response)method.voidsetEphemeralPort(int localPort) Sets the ephemeral port in the attributes map if necessary.voidsetEphemeralPort(ServerSocket socket) Sets the ephemeral port in the attributes map if necessary.voidstop()Stop callback.Methods inherited from class org.restlet.engine.connector.ConnectorHelper
getConnectorService, getContext, getProtocols, start, updateMethods inherited from class org.restlet.engine.RestletHelper
getAttributes, getHelped, getHelpedParameters, getLogger, getMetadataService, setHelped
-
Constructor Details
-
ServerHelper
Constructor.- Parameters:
server- The client to help.
-
-
Method Details
-
handle
Handles a call by invoking the helped Server'sServer.handle(Request, Response)method.- Overrides:
handlein classRestletHelper<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
Sets the ephemeral port in the attributes map if necessary.- Parameters:
socket- The bound server socket.
-
stop
Description copied from class:RestletHelperStop callback.- Overrides:
stopin classConnectorHelper<Server>- Throws:
Exception
-