Package | Description |
---|---|
org.restlet |
Core classes of the API.
|
org.restlet.data |
Information exchanged by components.
|
org.restlet.engine.application |
Supports Restlet applications.
|
org.restlet.engine.component |
Supports Restlet components.
|
org.restlet.engine.converter |
Supports the converter service.
|
org.restlet.engine.http |
Supports HTTP connectors.
|
org.restlet.engine.http.connector |
New advanced internal HTTP connector.
|
org.restlet.engine.http.header |
Supports HTTP header parsing and formatting.
|
org.restlet.engine.http.io |
Supports HTTP input and output.
|
org.restlet.engine.io |
Supports input and output work.
|
org.restlet.engine.local |
Supports local connectors and resources.
|
org.restlet.engine.resource |
Supports resources.
|
org.restlet.engine.util |
General utilities.
|
org.restlet.ext.jackson |
Integration with Jackson 1.4.
|
org.restlet.representation |
Common representation data elements.
|
org.restlet.resource |
Client and server resource classes.
|
org.restlet.routing |
Classes related to call routing.
|
org.restlet.service |
Services used by applications and components.
|
org.restlet.util |
Various utility classes.
|
Modifier and Type | Method and Description |
---|---|
Representation |
Message.getEntity()
Returns the entity representation.
|
Modifier and Type | Method and Description |
---|---|
void |
Message.setEntity(Representation entity)
Sets the entity representation.
|
Constructor and Description |
---|
Component(Representation xmlConfigRepresentation)
Constructor with the representation of the XML configuration file.
|
Message(Representation entity)
Constructor.
|
Request(Method method,
Reference resourceRef,
Representation entity)
Constructor.
|
Request(Method method,
String resourceUri,
Representation entity)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Representation |
ReferenceList.getTextRepresentation()
Returns a representation of the list in the "text/uri-list" format.
|
Representation |
ReferenceList.getWebRepresentation()
Returns a representation of the list in "text/html" format.
|
Representation |
Form.getWebRepresentation()
Returns the form as a Web representation
(MediaType.APPLICATION_WWW_FORM).
|
Representation |
Form.getWebRepresentation(CharacterSet characterSet)
Returns the form as a Web representation
(MediaType.APPLICATION_WWW_FORM).
|
Constructor and Description |
---|
Form(Representation webForm)
Constructor.
|
ReferenceList(Representation uriList)
Constructor from a "text/uri-list" representation.
|
Modifier and Type | Class and Description |
---|---|
class |
DecodeRepresentation
Representation that decodes a wrapped representation if its encoding is
supported.
|
class |
EncodeRepresentation
Content that encodes a wrapped content.
|
class |
RangeRepresentation
Representation that exposes only a range of the content of a wrapped
representation.
|
Modifier and Type | Method and Description |
---|---|
Representation |
Decoder.decode(Representation representation)
Decodes a given representation if its encodings are supported by NRE.
|
Representation |
Encoder.encode(ClientInfo client,
Representation representation)
Encodes a given representation if an encoding is supported by the client.
|
protected Representation |
StatusFilter.getDefaultRepresentation(Status status,
Request request,
Response response)
Returns a representation for the given status.
In order to customize the default representation, this method can be overridden. |
protected Representation |
StatusFilter.getRepresentation(Status status,
Request request,
Response response)
Returns a representation for the given status.
In order to customize the default representation, this method can be overridden. |
Modifier and Type | Method and Description |
---|---|
boolean |
Decoder.canDecode(Representation representation)
Indicates if a representation can be decoded.
|
boolean |
Encoder.canEncode(Representation representation)
Indicates if a representation can be encoded.
|
Representation |
Decoder.decode(Representation representation)
Decodes a given representation if its encodings are supported by NRE.
|
Representation |
Encoder.encode(ClientInfo client,
Representation representation)
Encodes a given representation if an encoding is supported by the client.
|
Constructor and Description |
---|
DecodeRepresentation(Representation wrappedRepresentation)
Constructor.
|
EncodeRepresentation(Encoding encoding,
Representation wrappedRepresentation)
Constructor.
|
RangeRepresentation(Representation wrappedRepresentation)
Constructor.
|
RangeRepresentation(Representation wrappedRepresentation,
Range range)
Constructor.
|
Constructor and Description |
---|
ComponentXmlParser(Component component,
Representation xmlConfiguration)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Representation |
DefaultConverter.toRepresentation(Object source,
Variant target,
UniformResource resource) |
abstract Representation |
ConverterHelper.toRepresentation(Object source,
Variant target,
UniformResource resource)
Converts a regular Java object into a Representation.
|
Modifier and Type | Method and Description |
---|---|
static <T> ConverterHelper |
ConverterUtils.getBestHelper(Representation source,
Class<T> target,
UniformResource resource)
Returns the best converter helper matching the given parameters.
|
<T> float |
DefaultConverter.score(Representation source,
Class<T> target,
UniformResource resource) |
abstract <T> float |
ConverterHelper.score(Representation source,
Class<T> target,
UniformResource resource)
Scores the affinity of this helper with the source class.
|
<T> T |
DefaultConverter.toObject(Representation source,
Class<T> target,
UniformResource resource) |
abstract <T> T |
ConverterHelper.toObject(Representation source,
Class<T> target,
UniformResource resource)
Converts a Representation into a regular Java object.
|
Modifier and Type | Method and Description |
---|---|
Representation |
HttpRequest.getEntity()
Returns the representation provided by the client.
|
protected Representation |
Call.getRepresentation(InputStream stream)
Returns the representation wrapping the given stream.
|
protected Representation |
Call.getRepresentation(ReadableByteChannel channel)
Returns the representation wrapping the given channel.
|
Representation |
ServerCall.getRequestEntity()
Returns the request entity if available.
|
Representation |
ClientCall.getResponseEntity(Response response)
Returns the response entity if available.
|
Modifier and Type | Method and Description |
---|---|
void |
HttpRequest.setEntity(Representation entity) |
protected void |
ServerCall.writeResponseBody(Representation entity,
WritableByteChannel responseEntityChannel,
OutputStream responseEntityStream)
Effectively writes the response body.
|
Modifier and Type | Method and Description |
---|---|
Representation |
Connection.createInboundEntity(Series<Parameter> headers)
Returns the inbound message entity if available.
|
protected Representation |
Connection.getRepresentation(InputStream stream)
Returns the representation wrapping the given stream.
|
protected Representation |
Connection.getRepresentation(ReadableByteChannel channel)
Returns the representation wrapping the given channel.
|
Modifier and Type | Method and Description |
---|---|
protected void |
Connection.addEntityHeaders(Representation entity,
Series<Parameter> headers)
Adds the entity headers for the given response.
|
protected ConnectedRequest |
ServerConnection.createRequest(Context context,
ServerConnection connection,
String methodName,
String resourceUri,
String version,
Series<Parameter> headers,
Representation entity,
boolean confidential,
Principal userPrincipal)
Creates a new request.
|
protected boolean |
Connection.shouldBeChunked(Representation entity)
Indicates if the entity should be chunked because its length is unknown.
|
protected void |
Connection.writeMessageBody(Representation entity,
WritableByteChannel entityChannel,
OutputStream entityStream)
Effectively writes the message body.
|
Constructor and Description |
---|
ConnectedRequest(Context context,
ServerConnection connection,
Method method,
String resourceUri,
String version,
Series<Parameter> headers,
Representation entity,
boolean confidential,
Principal userPrincipal)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static Representation |
HeaderUtils.extractEntityHeaders(Iterable<Parameter> headers,
Representation representation)
Extracts entity headers and updates a given representation or create an
empty one when at least one entity header is present.
|
Modifier and Type | Method and Description |
---|---|
static void |
HeaderUtils.addEntityHeaders(Representation entity,
Series<Parameter> headers)
Adds the entity headers based on the
Representation to the
Series . |
static void |
HeaderUtils.addNotModifiedEntityHeaders(Representation entity,
Series<Parameter> headers)
Adds the entity headers based on the
Representation to the
Series when a 304 (Not Modified) status is returned. |
static Representation |
HeaderUtils.extractEntityHeaders(Iterable<Parameter> headers,
Representation representation)
Extracts entity headers and updates a given representation or create an
empty one when at least one entity header is present.
|
static void |
RangeReader.update(String value,
Representation representation)
Parse the Content-Range header value and update the given representation.
|
Modifier and Type | Class and Description |
---|---|
class |
ClosingRepresentation
Wrapper representation to close the associated socket when the representation
is released.
|
Constructor and Description |
---|
ClosingRepresentation(Representation wrappedRepresentation,
Socket socket,
Logger logger)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static long |
BioUtils.getAvailableSize(Representation representation)
Returns the size effectively available.
|
static ReadableByteChannel |
NioUtils.getChannel(Representation representation)
Returns a readable byte channel based on the given representation's
content and its write(WritableByteChannel) method.
|
static InputStream |
BioUtils.getStream(Representation representation)
Returns an input stream based on the given representation's content and
its write(OutputStream) method.
|
static String |
BioUtils.getText(Representation representation)
Converts the representation to a string value.
|
Modifier and Type | Class and Description |
---|---|
class |
ZipEntryRepresentation
An entry in a Zip/JAR file.
|
Modifier and Type | Method and Description |
---|---|
Representation |
DirectoryServerResource.delete() |
protected Representation |
DirectoryServerResource.get() |
abstract Representation |
Entity.getRepresentation(MediaType defaultMediaType,
int timeToLive)
Returns a representation of this local entity.
|
Representation |
ZipEntryEntity.getRepresentation(MediaType defaultMediaType,
int timeToLive) |
Representation |
FileEntity.getRepresentation(MediaType defaultMediaType,
int timeToLive) |
Representation |
DirectoryServerResource.handle() |
Representation |
DirectoryServerResource.put(Representation entity) |
Modifier and Type | Method and Description |
---|---|
Representation |
DirectoryServerResource.put(Representation entity) |
Modifier and Type | Method and Description |
---|---|
static AnnotationInfo |
AnnotationUtils.getAnnotation(List<AnnotationInfo> annotations,
Method restletMethod,
Representation entity,
MetadataService metadataService,
ConverterService converterService)
Returns the first annotation descriptor matching the given Restlet
method.
|
boolean |
AnnotationInfo.isCompatible(Method restletMethod,
Representation requestEntity,
MetadataService metadataService,
ConverterService converterService)
Indicates if the annotated method described is compatible with the given
parameters.
|
boolean |
AnnotationInfo.isCompatibleRequestEntity(Representation requestEntity,
MetadataService metadataService,
ConverterService converterService)
Indicates if the given request entity is compatible with the annotated
method described.
|
Modifier and Type | Method and Description |
---|---|
static Parameter |
FormUtils.getFirstParameter(Representation post,
String name)
Reads the first parameter with the given name.
|
static Object |
FormUtils.getParameter(Representation form,
String name)
Reads the parameters with the given name.
If multiple values are found, a list is returned created. |
static void |
FormUtils.getParameters(Representation post,
Map<String,Object> parameters)
Reads the parameters whose name is a key in the given map.
If a matching parameter is found, its value is put in the map. If multiple values are found, a list is created and set in the map. |
static void |
FormUtils.parse(Form form,
Representation post)
Parses a post into a given form.
|
Constructor and Description |
---|
FormReader(Representation representation)
Constructor.
In case the representation does not define a character set, the UTF-8 character set is used. |
Modifier and Type | Class and Description |
---|---|
class |
JacksonRepresentation<T>
Representation based on the Jackson library.
|
Modifier and Type | Method and Description |
---|---|
Representation |
JacksonConverter.toRepresentation(Object source,
Variant target,
UniformResource resource) |
Modifier and Type | Method and Description |
---|---|
protected <T> JacksonRepresentation<T> |
JacksonConverter.create(Representation source,
Class<T> objectClass)
Creates the unmarshaling
JacksonRepresentation . |
<T> float |
JacksonConverter.score(Representation source,
Class<T> target,
UniformResource resource) |
<T> T |
JacksonConverter.toObject(Representation source,
Class<T> target,
UniformResource resource) |
Constructor and Description |
---|
JacksonRepresentation(Representation representation,
Class<T> objectClass)
Constructor.
|
Modifier and Type | Class and Description |
---|---|
class |
AppendableRepresentation
Represents an appendable sequence of characters.
|
class |
ChannelRepresentation
Representation based on a NIO byte channel.
|
class |
CharacterRepresentation
Representation based on a BIO character stream.
|
class |
DigesterRepresentation
Representation capable of computing a digest.
|
class |
DigestRepresentation
Deprecated.
See
DigesterRepresentation instead. |
class |
EmptyRepresentation
Empty representation with no content.
|
class |
FileRepresentation
Representation based on a static file.
|
class |
InputRepresentation
Transient representation based on a BIO input stream.
|
class |
ObjectRepresentation<T extends Serializable>
Representation based on a serializable Java object.
|
class |
OutputRepresentation
Representation based on a BIO output stream.
|
class |
ReadableRepresentation
Transient representation based on a readable NIO byte channel.
|
class |
ReaderRepresentation
Transient representation based on a BIO characters reader.
|
class |
StreamRepresentation
Representation based on a BIO stream.
|
class |
StringRepresentation
Represents an Unicode string that can be converted to any character set
supported by Java.
|
class |
WritableRepresentation
Representation based on a writable NIO byte channel.
|
class |
WriterRepresentation
Representation based on a BIO characters writer.
|
Modifier and Type | Method and Description |
---|---|
static Representation |
Representation.createEmpty()
Deprecated.
Use
EmptyRepresentation instead. |
Constructor and Description |
---|
DigesterRepresentation(Representation wrappedRepresentation)
Constructor.
By default, the instance relies on the Digest.ALGORITHM_MD5
digest algorithm. |
DigesterRepresentation(Representation wrappedRepresentation,
String algorithm)
Constructor.
|
DigestRepresentation(Representation wrappedRepresentation)
Deprecated.
Constructor.
By default, the instance relies on the Digest.ALGORITHM_MD5
digest algorithm. |
DigestRepresentation(Representation wrappedRepresentation,
String algorithm)
Deprecated.
Constructor.
|
ObjectRepresentation(Representation serializedRepresentation)
Constructor reading the object from a serialized representation.
|
Modifier and Type | Method and Description |
---|---|
protected Representation |
ServerResource.delete()
Deletes the resource and all its representations.
|
Representation |
ClientResource.delete()
Deletes the target resource and all its representations.
|
Representation |
ClientResource.delete(MediaType mediaType)
Deletes the target resource and all its representations.
|
protected Representation |
ServerResource.delete(Variant variant)
Deletes the resource and all its representations.
|
protected Representation |
ServerResource.describeVariants()
Describes the available variants to help client-side content negotiation.
|
protected Representation |
ServerResource.doConditionalHandle()
Handles a call by first verifying the optional request conditions and
continue the processing if possible.
|
protected Representation |
ServerResource.doHandle()
Effectively handles a call without content negotiation of the response
entity.
|
protected Representation |
ServerResource.doHandle(Variant variant)
Effectively handles a call with content negotiation of the response
entity.
|
protected Representation |
ServerResource.doNegotiatedHandle()
Effectively handles a call with content negotiation of the response
entity.
|
protected Representation |
ServerResource.get()
Returns a full representation.
|
Representation |
ClientResource.get()
Represents the resource using content negotiation to select the best
variant based on the client preferences.
|
Representation |
ClientResource.get(MediaType mediaType)
Represents the resource using a given media type.
|
protected Representation |
ServerResource.get(Variant variant)
Returns a full representation for a given variant.
|
Representation |
Directory.getIndexRepresentation(Variant variant,
ReferenceList indexContent)
Returns an actual index representation for a given variant.
|
Representation |
UniformResource.getRequestEntity()
Returns the request entity representation.
|
Representation |
UniformResource.getResponseEntity()
Returns the response entity representation.
|
Representation |
ServerResource.handle()
Handles any call to this resource.
|
Representation |
ClientResource.handle()
Handles the call by invoking the next handler.
|
abstract Representation |
UniformResource.handle()
Handles the call composed of the current context, request and response.
|
protected Representation |
ServerResource.head()
Returns a representation whose metadata will be returned to the client.
|
Representation |
ClientResource.head()
Represents the resource using content negotiation to select the best
variant based on the client preferences.
|
Representation |
ClientResource.head(MediaType mediaType)
Represents the resource using a given media type.
|
protected Representation |
ServerResource.head(Variant variant)
Returns a representation whose metadata will be returned to the client.
|
protected Representation |
ServerResource.options()
Indicates the communication options available for this resource.
|
Representation |
ClientResource.options()
Describes the resource using content negotiation to select the best
variant based on the client preferences.
|
Representation |
ClientResource.options(MediaType mediaType)
Describes the resource using a given media type.
|
protected Representation |
ServerResource.options(Variant variant)
Indicates the communication options available for this resource.
|
Representation |
ClientResource.post(Object entity)
Posts an object entity.
|
Representation |
ClientResource.post(Object entity,
MediaType mediaType)
Posts an object entity.
|
protected Representation |
ServerResource.post(Representation entity)
Posts a representation to the resource at the target URI reference.
|
Representation |
ClientResource.post(Representation entity)
Posts a representation.
|
protected Representation |
ServerResource.post(Representation entity,
Variant variant)
Posts a representation to the resource at the target URI reference.
|
Representation |
ClientResource.put(Object entity)
Puts an object entity.
|
Representation |
ClientResource.put(Object entity,
MediaType mediaType)
Puts an object entity.
|
protected Representation |
ServerResource.put(Representation entity)
Creates or updates a resource with the given representation as new state
to be stored.
|
Representation |
ClientResource.put(Representation entity)
Creates or updates a resource with the given representation as new state
to be stored.
|
protected Representation |
ServerResource.put(Representation representation,
Variant variant)
Creates or updates a resource with the given representation as new state
to be stored.
|
Representation |
Resource.represent()
Deprecated.
Returns the preferred representation according to the client preferences
specified in the request.
|
Representation |
Resource.represent(Variant variant)
Deprecated.
Returns a full representation for a given variant previously returned via
the getVariants() method.
|
protected Representation |
UniformResource.toRepresentation(Object source,
Variant target)
Converts an object into a representation based on client preferences.
|
Modifier and Type | Method and Description |
---|---|
void |
Resource.acceptRepresentation(Representation entity)
Deprecated.
Accepts and processes a representation posted to the resource.
|
protected Representation |
ServerResource.post(Representation entity)
Posts a representation to the resource at the target URI reference.
|
Representation |
ClientResource.post(Representation entity)
Posts a representation.
|
protected Representation |
ServerResource.post(Representation entity,
Variant variant)
Posts a representation to the resource at the target URI reference.
|
protected Representation |
ServerResource.put(Representation entity)
Creates or updates a resource with the given representation as new state
to be stored.
|
Representation |
ClientResource.put(Representation entity)
Creates or updates a resource with the given representation as new state
to be stored.
|
protected Representation |
ServerResource.put(Representation representation,
Variant variant)
Creates or updates a resource with the given representation as new state
to be stored.
|
void |
Resource.storeRepresentation(Representation entity)
Deprecated.
Stores a representation put to the resource and replaces all existing
representations of the resource.
|
protected <T> T |
UniformResource.toObject(Representation source,
Class<T> target)
Converts a representation into a Java object.
|
Modifier and Type | Method and Description |
---|---|
protected Representation |
Redirector.rewrite(Representation initialEntity)
Optionally rewrites the response entity returned in the
Redirector.MODE_SERVER_INBOUND and Redirector.MODE_SERVER_OUTBOUND modes. |
Modifier and Type | Method and Description |
---|---|
protected Representation |
Redirector.rewrite(Representation initialEntity)
Optionally rewrites the response entity returned in the
Redirector.MODE_SERVER_INBOUND and Redirector.MODE_SERVER_OUTBOUND modes. |
Modifier and Type | Method and Description |
---|---|
Representation |
StatusService.getRepresentation(Status status,
Request request,
Response response)
Returns a representation for the given status.
In order to customize the default representation, this method can be overridden. |
Representation |
ConverterService.toRepresentation(Object source)
Converts a regular Java object into a Representation.
|
Representation |
ConverterService.toRepresentation(Object source,
Variant target,
UniformResource resource)
Converts a regular Java object into a Representation.
|
Modifier and Type | Method and Description |
---|---|
void |
ConnectorService.afterSend(Representation entity)
Call-back method invoked by the client or server connectors just after
sending the response to the target component.
|
void |
ConnectorService.beforeSend(Representation entity)
Call-back method invoked by the client or server connectors just before
sending the response to the target component.
|
Object |
ConverterService.toObject(Representation source)
Converts a Representation into a regular Java object.
|
<T> T |
ConverterService.toObject(Representation source,
Class<T> target,
UniformResource resource)
Converts a Representation into a regular Java object.
|
Modifier and Type | Class and Description |
---|---|
class |
WrapperRepresentation
Representation wrapper.
|
Modifier and Type | Method and Description |
---|---|
Representation |
WrapperRequest.getEntity()
Returns the entity representation.
|
Representation |
WrapperResponse.getEntity()
Returns the entity representation.
|
Representation |
WrapperRepresentation.getWrappedRepresentation()
Returns the wrapped representation.
|
Modifier and Type | Method and Description |
---|---|
void |
WrapperRequest.setEntity(Representation entity)
Sets the entity representation.
|
void |
WrapperResponse.setEntity(Representation entity)
Sets the entity representation.
|
Constructor and Description |
---|
WrapperRepresentation(Representation wrappedRepresentation)
Constructor.
|
Copyright © 2005–2016. All rights reserved.