org.restlet.gwt
Class Client

java.lang.Object
  extended by org.restlet.gwt.Uniform
      extended by org.restlet.gwt.Restlet
          extended by org.restlet.gwt.Connector
              extended by org.restlet.gwt.Client

public class Client
extends Connector

Connector acting as a generic client. It internally uses one of the available connectors registered with the current Restlet implementation.

Author:
Jerome Louvel

Constructor Summary
Client(Context context, java.util.List<Protocol> protocols)
          Constructor.
Client(Context context, Protocol protocol)
          Constructor.
Client(java.util.List<Protocol> protocols)
          Constructor.
Client(Protocol protocol)
          Constructor.
Client(java.lang.String protocolName)
          Constructor.
 
Method Summary
 int getConnectTimeout()
          Returns the connection timeout.
 void handle(Request request, Response response, Callback callback)
          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.gwt.Connector
getProtocols, setProtocols
 
Methods inherited from class org.restlet.gwt.Restlet
getContext, isStarted, isStopped, setContext
 
Methods inherited from class org.restlet.gwt.Uniform
delete, delete, get, get, handle, head, head, options, options, post, post, post, put, put, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Client

public Client(Context context,
              java.util.List<Protocol> protocols)
Constructor.

Parameters:
context - The context.
protocols - The connector protocols.

Client

public Client(Context context,
              Protocol protocol)
Constructor.

Parameters:
context - The context.
protocol - The connector protocol.

Client

public Client(java.util.List<Protocol> protocols)
Constructor.

Parameters:
protocols - The connector protocols.

Client

public Client(Protocol protocol)
Constructor.

Parameters:
protocol - The connector protocol.

Client

public Client(java.lang.String protocolName)
Constructor.

Parameters:
protocolName - The connector protocol.
Method Detail

getConnectTimeout

public int getConnectTimeout()
Returns the connection timeout.

Returns:
The connection timeout.

handle

public void handle(Request request,
                   Response response,
                   Callback callback)
Description copied from class: Restlet
Handles a call. Subclasses overriding this method should make sure that they call super.handle(request, response) before adding their own logic.

Overrides:
handle in class Restlet
Parameters:
request - The request to handle.
response - The response to update.
callback - The callback invoked upon request completion.

setConnectTimeout

public void setConnectTimeout(int connectTimeout)
Sets the connection timeout.

Parameters:
connectTimeout - The connection timeout.

start

public void start()
           throws java.lang.Exception
Description copied from class: Restlet
Starts the Restlet.

Overrides:
start in class Restlet
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Description copied from class: Restlet
Stops the Restlet.

Overrides:
stop in class Restlet
Throws:
java.lang.Exception


Copyright © 2005-2008 Noelios Technologies.