org.restlet.data
Class Method

java.lang.Object
  extended by org.restlet.data.Metadata
      extended by org.restlet.data.Method

public final class Method
extends Metadata

Method to execute when handling a call.

Author:
Jerome Louvel

Field Summary
static Method CONNECT
          Used with a proxy that can dynamically switch to being a tunnel.
static Method COPY
          Creates a duplicate of the source resource, identified by the Request-URI, in the destination resource, identified by the URI in the Destination header.
static Method DELETE
          Requests that the origin server deletes the resource identified by the request URI.
static Method GET
          Retrieves whatever information (in the form of an entity) that is identified by the request URI.
static Method HEAD
          Identical to GET except that the server must not return a message body in the response but only the message header.
static Method LOCK
          Used to take out a lock of any access type on the resource identified by the request URI.
static Method MKCOL
          MKCOL creates a new collection resource at the location specified by the Request URI.
static Method MOVE
          Logical equivalent of a copy, followed by consistency maintenance processing, followed by a delete of the source where all three actions are performed atomically.
static Method OPTIONS
          Requests for information about the communication options available on the request/response chain identified by the URI.
static Method POST
          Requests that the origin server accepts the entity enclosed in the request as a new subordinate of the resource identified by the request URI.
static Method PROPFIND
          Retrieves properties defined on the resource identified by the request URI.
static Method PROPPATCH
          Processes instructions specified in the request body to set and/or remove properties defined on the resource identified by the request URI.
static Method PUT
          Requests that the enclosed entity be stored under the supplied request URI.
static Method TRACE
          Used to invoke a remote, application-layer loop-back of the request message.
static Method UNLOCK
          Removes the lock identified by the lock token from the request URI, and all other resources included in the lock.
 
Constructor Summary
Method(String name)
          Constructor.
Method(String name, String description)
          Constructor.
Method(String name, String description, String uri)
          Constructor.
 
Method Summary
 boolean equals(Object object)
          
 String getUri()
          Returns the URI of the specification describing the method.
 int hashCode()
          
 void setUri(String uri)
           
static Method valueOf(String name)
          Returns the method associated to a given method name.
 
Methods inherited from class org.restlet.data.Metadata
getDescription, getName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CONNECT

public static final Method CONNECT
Used with a proxy that can dynamically switch to being a tunnel.

See Also:
HTTP RFC - 9.9 CONNECT

COPY

public static final Method COPY
Creates a duplicate of the source resource, identified by the Request-URI, in the destination resource, identified by the URI in the Destination header.

See Also:
WEBDAV RFC - 8.8 COPY Method

DELETE

public static final Method DELETE
Requests that the origin server deletes the resource identified by the request URI.

See Also:
HTTP RFC - 9.7 DELETE

GET

public static final Method GET
Retrieves whatever information (in the form of an entity) that is identified by the request URI.

See Also:
HTTP RFC - 9.3 GET

HEAD

public static final Method HEAD
Identical to GET except that the server must not return a message body in the response but only the message header.

See Also:
HTTP RFC - 9.4 GET

LOCK

public static final Method LOCK
Used to take out a lock of any access type on the resource identified by the request URI.

See Also:
WEBDAV RFC - 8.10 LOCK Method

MKCOL

public static final Method MKCOL
MKCOL creates a new collection resource at the location specified by the Request URI.

See Also:
WEBDAV RFC - 8.3 MKCOL Method

MOVE

public static final Method MOVE
Logical equivalent of a copy, followed by consistency maintenance processing, followed by a delete of the source where all three actions are performed atomically.

See Also:
WEBDAV RFC - 8.3 MKCOL Method

OPTIONS

public static final Method OPTIONS
Requests for information about the communication options available on the request/response chain identified by the URI.

See Also:
HTTP RFC - 9.2 OPTIONS

POST

public static final Method POST
Requests that the origin server accepts the entity enclosed in the request as a new subordinate of the resource identified by the request URI.

See Also:
HTTP RFC - 9.5 POST

PROPFIND

public static final Method PROPFIND
Retrieves properties defined on the resource identified by the request URI.

See Also:
WEBDAV RFC - 8.1 PROPFIND

PROPPATCH

public static final Method PROPPATCH
Processes instructions specified in the request body to set and/or remove properties defined on the resource identified by the request URI.

See Also:
WEBDAV RFC - 8.2 PROPPATCH

PUT

public static final Method PUT
Requests that the enclosed entity be stored under the supplied request URI.

See Also:

TRACE

public static final Method TRACE
Used to invoke a remote, application-layer loop-back of the request message.

See Also:
HTTP RFC - 9.8 TRACE

UNLOCK

public static final Method UNLOCK
Removes the lock identified by the lock token from the request URI, and all other resources included in the lock.

See Also:
WEBDAV RFC - 8.11 UNLOCK Method
Constructor Detail

Method

public Method(String name)
Constructor.

Parameters:
name - The technical name of the method.
See Also:
valueOf(String)

Method

public Method(String name,
              String description)
Constructor.

Parameters:
name - The technical name of the method.
description - The description.
See Also:
valueOf(String)

Method

public Method(String name,
              String description,
              String uri)
Constructor.

Parameters:
name - The technical name.
description - The description.
uri - The URI of the specification describing the method.
See Also:
valueOf(String)
Method Detail

valueOf

public static Method valueOf(String name)
Returns the method associated to a given method name. If an existing constant exists then it is returned, otherwise a new instance is created.

Parameters:
name - The method name.
Returns:
The associated method.

equals

public boolean equals(Object object)

Overrides:
equals in class Metadata

getUri

public String getUri()
Returns the URI of the specification describing the method.

Returns:
The URI of the specification describing the method.

hashCode

public int hashCode()

Overrides:
hashCode in class Metadata

setUri

public void setUri(String uri)


Copyright © 2005-2008 Noelios Technologies.