org.restlet
Class Uniform

java.lang.Object
  extended by org.restlet.Uniform
Direct Known Subclasses:
Restlet

public abstract class Uniform
extends java.lang.Object

Base class exposing the uniform REST interface. "The central feature that distinguishes the REST architectural style from other network-based styles is its emphasis on a uniform interface between components. By applying the software engineering principle of generality to the component interface, the overall system architecture is simplified and the visibility of interactions is improved. Implementations are decoupled from the services they provide, which encourages independent evolvability." Roy T. Fielding

Concurrency note: instances of this class or its subclasses can be invoked by several threads at the same time and therefore must be thread-safe. You should be especially careful when storing state in member variables.

Author:
Jerome Louvel
See Also:
Source dissertation

Constructor Summary
Uniform()
           
 
Method Summary
 Response delete(Reference resourceRef)
          Deletes the identified resource.
 Response delete(java.lang.String resourceUri)
          Deletes the identified resource.
 Response get(Reference resourceRef)
          Gets the identified resource.
 Response get(java.lang.String resourceUri)
          Gets the identified resource.
 Response handle(Request request)
          Handles a call.
abstract  void handle(Request request, Response response)
          Handles a call.
 Response head(Reference resourceRef)
          Gets the identified resource without its representation's content.
 Response head(java.lang.String resourceUri)
          Gets the identified resource without its representation's content.
 Response options(Reference resourceRef)
          Gets the options for the identified resource.
 Response options(java.lang.String resourceUri)
          Gets the options for the identified resource.
 Response post(Reference resourceRef, Representation entity)
          Posts a representation to the identified resource.
 Response post(java.lang.String resourceUri, Representation entity)
          Posts a representation to the identified resource.
 Response put(Reference resourceRef, Representation entity)
          Puts a representation in the identified resource.
 Response put(java.lang.String resourceUri, Representation entity)
          Puts a representation in the identified resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Uniform

public Uniform()
Method Detail

delete

public final Response delete(Reference resourceRef)
Deletes the identified resource.

Parameters:
resourceRef - The reference of the resource to delete.
Returns:
The response.

delete

public final Response delete(java.lang.String resourceUri)
Deletes the identified resource.

Parameters:
resourceUri - The URI of the resource to delete.
Returns:
The response.

get

public final Response get(Reference resourceRef)
Gets the identified resource.

Parameters:
resourceRef - The reference of the resource to get.
Returns:
The response.

get

public final Response get(java.lang.String resourceUri)
Gets the identified resource.

Parameters:
resourceUri - The URI of the resource to get.
Returns:
The response.

handle

public final Response handle(Request request)
Handles a call.

Parameters:
request - The request to handle.
Returns:
The returned response.

handle

public abstract void handle(Request request,
                            Response response)
Handles a call.

Parameters:
request - The request to handle.
response - The response to update.

head

public final Response head(Reference resourceRef)
Gets the identified resource without its representation's content.

Parameters:
resourceRef - The reference of the resource to get.
Returns:
The response.

head

public final Response head(java.lang.String resourceUri)
Gets the identified resource without its representation's content.

Parameters:
resourceUri - The URI of the resource to get.
Returns:
The response.

options

public final Response options(Reference resourceRef)
Gets the options for the identified resource.

Parameters:
resourceRef - The reference of the resource to get.
Returns:
The response.

options

public final Response options(java.lang.String resourceUri)
Gets the options for the identified resource.

Parameters:
resourceUri - The URI of the resource to get.
Returns:
The response.

post

public final Response post(Reference resourceRef,
                           Representation entity)
Posts a representation to the identified resource.

Parameters:
resourceRef - The reference of the resource to post to.
entity - The entity to post.
Returns:
The response.

post

public final Response post(java.lang.String resourceUri,
                           Representation entity)
Posts a representation to the identified resource.

Parameters:
resourceUri - The URI of the resource to post to.
entity - The entity to post.
Returns:
The response.

put

public final Response put(Reference resourceRef,
                          Representation entity)
Puts a representation in the identified resource.

Parameters:
resourceRef - The reference of the resource to modify.
entity - The entity to put.
Returns:
The response.

put

public final Response put(java.lang.String resourceUri,
                          Representation entity)
Puts a representation in the identified resource.

Parameters:
resourceUri - The URI of the resource to modify.
entity - The entity to put.
Returns:
The response.


Copyright © 2005-2008 Noelios Technologies.