org.idoox.transport
Class TransportMethod

java.lang.Object
  extended byorg.idoox.transport.TransportMethod

public class TransportMethod
extends java.lang.Object

Transport methods.

Component:
Core

Field Summary
static int _DELETE
          DELETE method as integer.
static int _GET
          GET method as integer.
static int _POST
          POST method as integer.
static int _PUT
          PUT method as integer.
static java.util.Set ALL_METHODS
          Set of all transport methods.
static TransportMethod DELETE
          Deletes an existing resource with given URI.
static TransportMethod GET
          Gets data from an existing resource with given URI.
static TransportMethod POST
          Posts data to an existing resource with given URI.
static TransportMethod PUT
          Puts data to given URI.
 
Constructor Summary
protected TransportMethod(int value)
          Protected constructor.
 
Method Summary
static TransportMethod fromInt(int value)
          Returns TransportMethod instance associated with given integer value.
static TransportMethod fromString(java.lang.String value)
          Returns TransportMethod instance associated with given string value.
 java.lang.String toString()
           
 int value()
          Returns an associated integer value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_POST

public static final int _POST
POST method as integer.

See Also:
Constant Field Values

POST

public static final TransportMethod POST
Posts data to an existing resource with given URI. The connection contains an output message and an input message or null from a client point of view. If the input message is null the transport supports only one-way messages.


_GET

public static final int _GET
GET method as integer.

See Also:
Constant Field Values

GET

public static final TransportMethod GET
Gets data from an existing resource with given URI. The connection contains an input message only from a client point of view.


_PUT

public static final int _PUT
PUT method as integer.

See Also:
Constant Field Values

PUT

public static final TransportMethod PUT
Puts data to given URI. If the URI refers to an already existing resource, data is as a modified version of the one residing on the origin server. If the URI does not point to an existing resource, the origin server can create the resource with that URI. The connection contains an output message only from a client point of view.


_DELETE

public static final int _DELETE
DELETE method as integer.

See Also:
Constant Field Values

DELETE

public static final TransportMethod DELETE
Deletes an existing resource with given URI. The connection contains no messages.


ALL_METHODS

public static final java.util.Set ALL_METHODS
Set of all transport methods.

Constructor Detail

TransportMethod

protected TransportMethod(int value)
Protected constructor.

Method Detail

value

public int value()
Returns an associated integer value.

Returns:
the integer value

fromInt

public static TransportMethod fromInt(int value)
Returns TransportMethod instance associated with given integer value.

Parameters:
value - integer value
Returns:
the transport method
Throws:
java.lang.RuntimeException - when invalid value is supplied.

fromString

public static TransportMethod fromString(java.lang.String value)
Returns TransportMethod instance associated with given string value.

Parameters:
value - string value
Returns:
the transport method
Throws:
java.lang.RuntimeException - when invalid value is supplied.

toString

public java.lang.String toString()