Package org.restlet.data
Class Expectation
java.lang.Object
org.restlet.data.Expectation
- All Implemented Interfaces:
NamedValue<String>
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
ConstructorsConstructorDescriptionExpectation(String name) Constructor for directives with no value.Expectation(String name, String value) Constructor for directives with a value. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExpectationCreates a "100-continue" expectation.booleangetName()Returns the name.Returns the list of parameters.getValue()Returns the value.inthashCode()voidSets the name.voidsetParameters(List<Parameter> parameters) Sets the list of parameters.voidSets the value.toString()
-
Constructor Details
-
Expectation
Constructor for directives with no value.- Parameters:
name- The directive name.
-
Expectation
Constructor for directives with a value.- Parameters:
name- The directive name.value- The directive value.
-
-
Method Details
-
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:
-
equals
-
getName
Returns the name.- Specified by:
getNamein interfaceNamedValue<String>- Returns:
- The name.
-
getParameters
Returns the list of parameters.- Returns:
- The list of parameters.
-
getValue
Returns the value.- Specified by:
getValuein interfaceNamedValue<String>- Returns:
- The value.
-
hashCode
public int hashCode() -
setName
Sets the name.- Parameters:
name- The name.
-
setParameters
Sets the list of parameters.- Parameters:
parameters- The list of parameters.
-
setValue
Sets the value.- Specified by:
setValuein interfaceNamedValue<String>- Parameters:
value- The value.
-
toString
-