org.restlet.data
Class Expectation

java.lang.Object
  extended by org.restlet.util.Couple<String,String>
      extended by org.restlet.data.Parameter
          extended by org.restlet.data.Expectation
All Implemented Interfaces:
Comparable<Parameter>

public final class Expectation
extends Parameter

Particular server behavior that is required by a client. Note that when used with HTTP connectors, this class maps to the "Expect" header.

Author:
Jerome Louvel

Constructor Summary
Expectation(String name)
          Constructor for directives with no value.
Expectation(String name, String value)
          Constructor for directives with a value.
 
Method Summary
static Expectation continueResponse()
          Creates a "100-continue" expectation.
 boolean equals(Object other)
           
 List<Parameter> getParameters()
          Returns the list of parameters.
 void setParameters(List<Parameter> parameters)
          Sets the list of parameters.
 
Methods inherited from class org.restlet.data.Parameter
compareTo, create, encode, encode, getName, getValue, setName, setValue
 
Methods inherited from class org.restlet.util.Couple
getFirst, getSecond, hashCode, setFirst, setSecond, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Expectation

public Expectation(String name)
Constructor for directives with no value.

Parameters:
name - The directive name.

Expectation

public Expectation(String name,
                   String value)
Constructor for directives with a value.

Parameters:
name - The directive name.
value - The directive value.
Method Detail

continueResponse

public static Expectation continueResponse()
Creates a "100-continue" expectation. If a client will wait for a 100 (Continue) provisional response before sending the request body, it MUST send this expectation. A client MUST NOT send this expectation if it does not intend to send a request entity.

Returns:
A new "100-continue" expectation.
See Also:
HTTP 1.1 - Expect header

equals

public boolean equals(Object other)
Overrides:
equals in class Couple<String,String>

getParameters

public List<Parameter> getParameters()
Returns the list of parameters.

Returns:
The list of parameters.

setParameters

public void setParameters(List<Parameter> parameters)
Sets the list of parameters.

Parameters:
parameters - The list of parameters.


Copyright © 2005-2011 Noelios Technologies.