|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.Uniform
org.restlet.Restlet
org.restlet.Connector
org.restlet.Client
public class Client
Connector acting as a generic client. It internally uses one of the available connectors registered with the current Restlet implementation.
| Constructor Summary | |
|---|---|
Client(Context context,
List<Protocol> protocols)
Constructor. |
|
Client(Context context,
List<Protocol> protocols,
String helperClass)
Constructor. |
|
Client(Context context,
Protocol protocol)
Constructor. |
|
Client(List<Protocol> protocols)
Constructor. |
|
Client(Protocol protocol)
Constructor. |
|
| Method Summary | |
|---|---|
int |
getConnectTimeout()
Returns the connection timeout. |
void |
handle(Request request,
Response response)
Handles a call. |
void |
setConnectTimeout(int connectTimeout)
Sets the connection timeout. |
void |
start()
Starts the Restlet. |
void |
stop()
Stops the Restlet. |
| Methods inherited from class org.restlet.Connector |
|---|
getProtocols, setProtocols |
| Methods inherited from class org.restlet.Restlet |
|---|
getApplication, getContext, getLogger, init, isStarted, isStopped, setContext |
| Methods inherited from class org.restlet.Uniform |
|---|
delete, delete, get, get, handle, head, head, options, options, post, post, put, put |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Client(Context context,
List<Protocol> protocols)
context - The context.protocols - The connector protocols.
public Client(Context context,
List<Protocol> protocols,
String helperClass)
context - The context.protocols - The connector protocols.helperClass - Optional helper class name.
public Client(Context context,
Protocol protocol)
context - The context.protocol - The connector protocol.public Client(List<Protocol> protocols)
protocols - The connector protocols.public Client(Protocol protocol)
protocol - The connector protocol.| Method Detail |
|---|
public int getConnectTimeout()
public void handle(Request request,
Response response)
RestletRestlet.init(Request, Response) method. In next version,
Restlet.init(Request, Response) will be removed and its logic directly
added to this method instead.
Subclasses overriding this method should make sure that they call super.handle(request, response) before adding their own logic.
handle in class Restletrequest - The request to handle.response - The response to update.public void setConnectTimeout(int connectTimeout)
connectTimeout - The connection timeout.
public void start()
throws Exception
Restlet
start in class RestletException
public void stop()
throws Exception
Restlet
stop in class RestletException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||