public final class Method extends Object implements Comparable<Method>
| Modifier and Type | Field and Description |
|---|---|
static Method |
ALL
Pseudo-method use to match all methods.
|
static Method |
CONNECT
Used with a proxy that can dynamically switch to being a tunnel.
|
static Method |
COPY
Deprecated.
Will be removed in next version.
|
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
Deprecated.
Will be removed in next version.
|
static Method |
MKCOL
Deprecated.
Will be removed in next version.
|
static Method |
MOVE
Deprecated.
Will be removed in next version.
|
static Method |
OPTIONS
Requests for information about the communication options available on the
request/response chain identified by the URI.
|
static Method |
PATCH
Requests that the origin server applies partial modifications contained in
the entity enclosed in the request to the resource identified by the request
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
Deprecated.
Will be removed in next version.
|
static Method |
PROPPATCH
Deprecated.
Will be removed in next version.
|
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
Deprecated.
Will be removed in next version.
|
| Constructor and Description |
|---|
Method(String name)
Constructor for unsafe and non idempotent methods.
|
Method(String name,
String description)
Constructor for unsafe and non idempotent methods.
|
Method(String name,
String description,
String uri)
Constructor for unsafe and non idempotent methods.
|
Method(String name,
String description,
String uri,
boolean safe,
boolean idempotent)
Constructor for methods that reply to requests with responses.
|
Method(String name,
String description,
String uri,
boolean safe,
boolean idempotent,
boolean replying)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Method o)
Compares this method to another.
|
boolean |
equals(Object object) |
String |
getDescription()
Returns the description.
|
String |
getName()
Returns the name.
|
String |
getUri()
Returns the URI of the specification describing the method.
|
int |
hashCode() |
boolean |
isIdempotent()
Indicates if the side-effects of several requests is the same as a single
request.
|
boolean |
isReplying()
Indicates if the method replies with a response.
|
boolean |
isSafe()
Indicates if it should have the significance of taking an action other than
retrieval.
|
static void |
register(Method method)
Adds a new Method to the list of registered methods.
|
static void |
sort(List<Method> methods)
Sorts the given list of methods by name.
|
String |
toString()
Returns the name.
|
static Method |
valueOf(String name)
Returns the method associated to a given method name.
|
public static final Method ALL
public static final Method CONNECT
@Deprecated public static final Method COPY
public static final Method DELETE
public static final Method GET
public static final Method HEAD
@Deprecated public static final Method LOCK
@Deprecated public static final Method MKCOL
@Deprecated public static final Method MOVE
public static final Method OPTIONS
public static final Method PATCH
public static final Method POST
@Deprecated public static final Method PROPFIND
@Deprecated public static final Method PROPPATCH
public static final Method PUT
public static final Method TRACE
@Deprecated public static final Method UNLOCK
public Method(String name)
name - The technical name of the method.valueOf(String)public Method(String name, String description)
name - The technical name of the method.description - The description.valueOf(String)public Method(String name, String description, String uri)
name - The technical name.description - The description.uri - The URI of the specification describing the method.valueOf(String)public Method(String name, String description, String uri, boolean safe, boolean idempotent)
name - The technical name.description - The description.uri - The URI of the specification describing the method.safe - Indicates if the method is safe.idempotent - Indicates if the method is idempotent.valueOf(String)public Method(String name, String description, String uri, boolean safe, boolean idempotent, boolean replying)
name - The technical name.description - The description.uri - The URI of the specification describing the method.safe - Indicates if the method is safe.idempotent - Indicates if the method is idempotent.replying - Indicates if the method replies with a response.valueOf(String)public static void register(Method method)
method - The method to register.public static void sort(List<Method> methods)
methods - The methods to sort.public static Method valueOf(String name)
name - The method name.public int compareTo(Method o)
compareTo in interface Comparable<Method>o - The other method.public String getDescription()
public String getName()
public String getUri()
public boolean isIdempotent()
public boolean isReplying()
public boolean isSafe()
Copyright © 2005–2025. All rights reserved.