| java.lang.Object org.restlet.Uniform org.restlet.Restlet org.restlet.Connector org.restlet.Server
Server | public class Server extends Connector (Code) | | Connector acting as a generic server. It internally uses one of the available
connectors registered with the current Restlet implementation.
author: Jerome Louvel (contact@noelios.com) |
Constructor Summary | |
public | Server(Context context, List<Protocol> protocols, int port, Restlet target) Constructor. | public | Server(Context context, List<Protocol> protocols, String address, int port, Restlet target) Constructor. | public | Server(Context context, Protocol protocol, int port, Restlet target) Constructor. | public | Server(Context context, Protocol protocol, Restlet target) Constructor using the protocol's default port. | public | Server(Context context, Protocol protocol, String address, int port, Restlet target) Constructor. | public | Server(List<Protocol> protocols, int port, Restlet target) Constructor. | public | Server(List<Protocol> protocols, String address, int port, Restlet target) Constructor. | public | Server(Protocol protocol, int port, Restlet target) Constructor. | public | Server(Protocol protocol, Restlet target) Constructor using the protocol's default port. | public | Server(Protocol protocol, String address, Restlet target) Constructor using the protocol's default port. | public | Server(Protocol protocol, String address, int port, Restlet target) Constructor. |
Method Summary | |
public String | getAddress() Returns the optional listening IP address (local host used if null). | public int | getPort() Returns the listening port if specified. | public Restlet | getTarget() Returns the target Restlet. | public void | handle(Request request, Response response) Handles a call. | public boolean | hasTarget() Indicates if a target Restlet is set. | protected void | setAddress(String address) Sets the optional listening IP address (local host used if null). | protected void | setPort(int port) Sets the listening port if specified. | public void | setTarget(Restlet target) Sets the target Restlet. | public void | start() | public void | stop() |
Server | public Server(Context context, List<Protocol> protocols, int port, Restlet target)(Code) | | Constructor.
Parameters: context - The context. Parameters: protocols - The connector protocols. Parameters: port - The listening port. Parameters: target - The target Restlet. |
Server | public Server(Context context, List<Protocol> protocols, String address, int port, Restlet target)(Code) | | Constructor.
Parameters: context - The context. Parameters: protocols - The connector protocols. Parameters: address - The optional listening IP address (useful if multiple IPaddresses available). Parameters: port - The listening port. Parameters: target - The target Restlet. |
Server | public Server(Context context, Protocol protocol, int port, Restlet target)(Code) | | Constructor.
Parameters: context - The context. Parameters: protocol - The connector protocol. Parameters: port - The listening port. Parameters: target - The target Restlet. |
Server | public Server(Context context, Protocol protocol, Restlet target)(Code) | | Constructor using the protocol's default port.
Parameters: context - The context. Parameters: protocol - The connector protocol. Parameters: target - The target Restlet. |
Server | public Server(Context context, Protocol protocol, String address, int port, Restlet target)(Code) | | Constructor.
Parameters: context - The context. Parameters: protocol - The connector protocol. Parameters: address - The optional listening IP address (useful if multiple IPaddresses available). Parameters: port - The listening port. Parameters: target - The target Restlet. |
Server | public Server(List<Protocol> protocols, int port, Restlet target)(Code) | | Constructor.
Parameters: protocols - The connector protocols. Parameters: port - The listening port. Parameters: target - The target Restlet. |
Server | public Server(List<Protocol> protocols, String address, int port, Restlet target)(Code) | | Constructor.
Parameters: protocols - The connector protocols. Parameters: address - The optional listening IP address (useful if multiple IPaddresses available). Parameters: port - The listening port. Parameters: target - The target Restlet. |
Server | public Server(Protocol protocol, int port, Restlet target)(Code) | | Constructor.
Parameters: protocol - The connector protocol. Parameters: port - The listening port. Parameters: target - The target Restlet. |
Server | public Server(Protocol protocol, Restlet target)(Code) | | Constructor using the protocol's default port.
Parameters: protocol - The connector protocol. Parameters: target - The target Restlet. |
Server | public Server(Protocol protocol, String address, Restlet target)(Code) | | Constructor using the protocol's default port.
Parameters: protocol - The connector protocol. Parameters: address - The listening IP address (useful if multiple IP addressesavailable). Parameters: target - The target Restlet. |
Server | public Server(Protocol protocol, String address, int port, Restlet target)(Code) | | Constructor.
Parameters: protocol - The connector protocol. Parameters: address - The optional listening IP address (useful if multiple IPaddresses available). Parameters: port - The listening port. Parameters: target - The target Restlet. |
getAddress | public String getAddress()(Code) | | Returns the optional listening IP address (local host used if null).
The optional listening IP address (local host used if null). |
getPort | public int getPort()(Code) | | Returns the listening port if specified.
The listening port if specified. |
getTarget | public Restlet getTarget()(Code) | | Returns the target Restlet.
The target Restlet. |
handle | public void handle(Request request, Response response)(Code) | | Handles a call.
Parameters: request - The request to handle. Parameters: response - The response to update. |
hasTarget | public boolean hasTarget()(Code) | | Indicates if a target Restlet is set.
True if a target Restlet is set. |
setAddress | protected void setAddress(String address)(Code) | | Sets the optional listening IP address (local host used if null).
Parameters: address - The optional listening IP address (local host used if null). |
setPort | protected void setPort(int port)(Code) | | Sets the listening port if specified.
Parameters: port - The listening port if specified. |
setTarget | public void setTarget(Restlet target)(Code) | | Sets the target Restlet.
Parameters: target - The target Restlet. |
|
|