Package | Description |
---|---|
org.restlet |
Core classes of the API.
|
org.restlet.data |
Information exchanged by components.
|
org.restlet.engine |
Implementation of Restlet API.
|
org.restlet.engine.application |
Supports Restlet applications.
|
org.restlet.engine.component |
Supports Restlet components.
|
org.restlet.engine.http |
Supports HTTP connectors.
|
org.restlet.engine.http.adapter |
Adapters between low-level HTTP calls and high-level Restlet Request and
Response objects.
|
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.security |
Supports HTTP security.
|
org.restlet.engine.local |
Supports local connectors and resources.
|
org.restlet.engine.log |
Supports the log service.
|
org.restlet.engine.riap |
Supports RIAP (Restlet Internal Access Protocol) connectors.
|
org.restlet.engine.security |
Supports security.
|
org.restlet.engine.util |
General utilities.
|
org.restlet.ext.netty.internal | |
org.restlet.ext.simple.internal | |
org.restlet.resource |
Client and server resource classes.
|
org.restlet.routing |
Classes related to call routing.
|
org.restlet.security |
Classes related to security.
|
org.restlet.service |
Services used by applications and components.
|
org.restlet.util |
Various utility classes.
|
Modifier and Type | Method and Description |
---|---|
static Response |
Response.getCurrent()
Returns the response associated to the current thread.
|
Response |
Client.handle(Request request)
Handles a call.
|
Modifier and Type | Method and Description |
---|---|
void |
Request.commit(Response response)
Asks the server connector to immediately commit the given response
associated to this request, making it ready to be sent back to the
client.
|
void |
Client.handle(Request request,
Response response) |
void |
Application.handle(Request request,
Response response) |
void |
Server.handle(Request request,
Response response) |
void |
Restlet.handle(Request request,
Response response)
Handles a call.
|
void |
Component.handle(Request request,
Response response) |
void |
Uniform.handle(Request request,
Response response)
Handles a uniform call.
|
void |
Client.handle(Request request,
Response response,
Uniform onResponseCallback)
Handles a call.
|
static void |
Response.setCurrent(Response response)
Sets the response associated with the current thread.
|
Constructor and Description |
---|
ChallengeResponse(ChallengeRequest challengeRequest,
Response response,
java.lang.String identifier,
char[] baseSecret)
Constructor.
|
ChallengeResponse(ChallengeRequest challengeRequest,
Response response,
java.lang.String identifier,
char[] baseSecret,
java.lang.String baseSecretAlgorithm)
Constructor.
|
ChallengeResponse(ChallengeRequest challengeRequest,
Response response,
java.lang.String identifier,
java.lang.String baseSecret)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
TemplateDispatcher.doHandle(Request request,
Response response)
Actually handles the call.
|
void |
TemplateDispatcher.handle(Request request,
Response response)
Handles the call after resolving any URI template on the request's target
resource reference.
|
void |
ServerHelper.handle(Request request,
Response response)
Handles a call by invoking the helped Server's
Server.handle(Request, Response) method. |
void |
ChainHelper.handle(Request request,
Response response) |
void |
RestletHelper.handle(Request request,
Response response)
Handles a call.
|
Modifier and Type | Method and Description |
---|---|
void |
Decoder.afterHandle(Request request,
Response response)
Allows filtering after its handling by the target Restlet.
|
protected void |
RangeFilter.afterHandle(Request request,
Response response) |
void |
Encoder.afterHandle(Request request,
Response response)
Allows filtering after its handling by the target Restlet.
|
void |
StatusFilter.afterHandle(Request request,
Response response)
Allows filtering after its handling by the target Restlet.
|
int |
Decoder.beforeHandle(Request request,
Response response)
Allows filtering before its handling by the target Restlet.
|
int |
TunnelFilter.beforeHandle(Request request,
Response response) |
int |
Encoder.beforeHandle(Request request,
Response response)
Allows filtering before its handling by the target Restlet.
|
protected int |
StatusFilter.doHandle(Request request,
Response response)
Handles the call by distributing it to the next Restlet.
|
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. |
protected Status |
StatusFilter.getStatus(java.lang.Throwable throwable,
Request request,
Response response)
Returns a status for a given exception or error.
|
void |
ApplicationHelper.handle(Request request,
Response response)
In addition to the default behavior, it saves the current application
instance into the current thread.
|
Modifier and Type | Method and Description |
---|---|
protected int |
HostRoute.beforeHandle(Request request,
Response response)
Allows filtering before processing by the next Restlet.
|
void |
ChildClientDispatcher.doHandle(Request request,
Response response)
Transmits the call to the parent component except if the call is internal
as denoted by the
Protocol.RIAP protocol and targets this child
application. |
protected void |
ComponentClientDispatcher.doHandle(Request request,
Response response) |
protected void |
ComponentServerDispatcher.doHandle(Request request,
Response response) |
Restlet |
ClientRouter.getNext(Request request,
Response response) |
float |
HostRoute.score(Request request,
Response response)
Returns the score for a given call (between 0 and 1.0).
|
float |
ClientRoute.score(Request request,
Response response)
Returns the score for a given call (between 0 and 1.0).
|
Modifier and Type | Class and Description |
---|---|
class |
HttpResponse
Response wrapper for server HTTP calls.
|
Modifier and Type | Method and Description |
---|---|
static void |
HttpResponse.addHeader(Response response,
java.lang.String headerName,
java.lang.String headerValue)
Adds a new header to the given request.
|
Representation |
ClientCall.getResponseEntity(Response response)
Returns the response entity if available.
|
void |
HttpClientHelper.handle(Request request,
Response response) |
void |
ClientCall.sendRequest(Request request,
Response response,
Uniform callback)
Sends the request to the client.
|
void |
ServerCall.sendResponse(Response response)
Sends the response back to the client.
|
boolean |
ServerCall.shouldResponseBeChunked(Response response)
Indicates if the response should be chunked because its length is
unknown.
|
protected void |
ServerCall.writeResponseHead(Response response)
Writes the response status line and headers.
|
protected void |
ServerCall.writeResponseHead(Response response,
java.io.OutputStream headStream)
Writes the response head to the given output stream.
|
Modifier and Type | Method and Description |
---|---|
void |
ClientAdapter.commit(ClientCall httpCall,
Request request,
Response response)
Commits the changes to a handled HTTP client call back into the original
uniform call.
|
protected void |
ClientAdapter.readResponseHeaders(ClientCall httpCall,
Response response)
Reads the response headers of a handled HTTP client call to update the
original uniform call.
|
void |
ClientAdapter.updateResponse(Response response,
Status status,
ClientCall httpCall)
Updates the response with information from the lower-level HTTP client
call.
|
Modifier and Type | Method and Description |
---|---|
protected Response |
BaseHelper.createResponse(Request request)
Creates the response object.
|
Modifier and Type | Method and Description |
---|---|
java.util.Queue<Response> |
Connection.getInboundMessages()
Returns the queue of inbound messages.
|
protected java.util.Queue<Response> |
BaseHelper.getInboundMessages()
Returns the queue of inbound messages pending for handling.
|
java.util.Queue<Response> |
Connection.getOutboundMessages()
Returns the queue of outbound messages.
|
protected java.util.Queue<Response> |
BaseHelper.getOutboundMessages()
Returns the queue of outbound messages pending for handling.
|
Modifier and Type | Method and Description |
---|---|
protected void |
ServerConnection.addResponseHeaders(Response response,
Series<Parameter> headers)
Adds the response headers.
|
void |
ConnectedRequest.commit(Response response) |
void |
ServerConnection.commit(Response response)
Asks the server connector to immediately commit the given response
associated to this request, making it ready to be sent back to the
client.
|
protected void |
ClientConnection.copyResponseTransportHeaders(Series<Parameter> headers,
Response response)
Copies headers into a response.
|
void |
BaseClientHelper.handle(Request request,
Response response) |
void |
BaseServerHelper.handle(Request request,
Response response)
Handles a call by invoking the helped Server's
Server.handle(Request, Response) method. |
void |
BaseClientHelper.handleInbound(Response response) |
abstract void |
BaseHelper.handleInbound(Response response)
Handles an inbound message.
|
void |
BaseServerHelper.handleInbound(Response response) |
void |
BaseClientHelper.handleOutbound(Response response) |
abstract void |
BaseHelper.handleOutbound(Response response)
Handles an outbound message.
|
void |
BaseServerHelper.handleOutbound(Response response) |
protected abstract void |
Connection.writeMessage(Response message)
Write the given message on the socket.
|
protected void |
ClientConnection.writeMessage(Response response)
Write the given response on the socket.
|
protected void |
ServerConnection.writeMessage(Response response)
Write the given response on the socket.
|
protected void |
Connection.writeMessage(Response message,
Series<Parameter> headers)
Writes the message and its headers.
|
protected void |
Connection.writeMessageHead(Response message,
java.io.OutputStream headStream,
Series<Parameter> headers)
Writes the message head to the given output stream.
|
protected void |
Connection.writeMessageHead(Response message,
Series<Parameter> headers)
Writes the message head.
|
protected abstract void |
Connection.writeMessageHeadLine(Response message,
java.io.OutputStream headStream)
Writes the message head line to the given output stream.
|
protected void |
ClientConnection.writeMessageHeadLine(Response message,
java.io.OutputStream headStream) |
protected void |
ServerConnection.writeMessageHeadLine(Response response,
java.io.OutputStream headStream) |
Modifier and Type | Method and Description |
---|---|
static void |
HeaderUtils.addResponseHeaders(Response response,
Series<Parameter> headers)
|
static void |
HeaderUtils.copyResponseTransportHeaders(Series<Parameter> headers,
Response response)
Copies headers into a response.
|
Modifier and Type | Method and Description |
---|---|
void |
HttpBasicHelper.formatRawRequest(ChallengeWriter cw,
ChallengeRequest challenge,
Response response,
Series<Parameter> httpHeaders) |
void |
HttpBasicHelper.parseRequest(ChallengeRequest challenge,
Response response,
Series<Parameter> httpHeaders) |
Modifier and Type | Method and Description |
---|---|
protected Response |
DirectoryServerResource.getRepresentation(java.lang.String resourceUri,
MediaType acceptedMediaType)
Returns a representation of the resource at the target URI.
|
Modifier and Type | Method and Description |
---|---|
void |
LocalClientHelper.handle(Request request,
Response response)
Handles a call.
|
protected void |
ClapClientHelper.handleClassLoader(Request request,
Response response,
java.lang.ClassLoader classLoader)
Handles a call with a given class loader.
|
protected void |
EntityClientHelper.handleEntityGet(Request request,
Response response,
Entity entity)
Handles a GET call.
|
protected void |
FileClientHelper.handleFile(Request request,
Response response,
java.lang.String decodedPath) |
protected void |
FileClientHelper.handleFileDelete(Response response,
java.io.File file)
Handles a DELETE call for the FILE protocol.
|
protected void |
FileClientHelper.handleFilePut(Request request,
Response response,
java.lang.String path,
java.io.File file)
Handles a PUT call for the FILE protocol.
|
protected void |
ZipClientHelper.handleGet(Request request,
Response response,
java.io.File file,
java.lang.String entryName,
MetadataService metadataService)
Handles a GET call.
|
protected void |
ZipClientHelper.handleLocal(Request request,
Response response,
java.lang.String decodedPath)
Handles a call for a local entity.
|
protected void |
EntityClientHelper.handleLocal(Request request,
Response response,
java.lang.String decodedPath) |
protected void |
FileClientHelper.handleLocal(Request request,
Response response,
java.lang.String decodedPath) |
protected void |
ClapClientHelper.handleLocal(Request request,
Response response,
java.lang.String decodedPath) |
protected abstract void |
LocalClientHelper.handleLocal(Request request,
Response response,
java.lang.String decodedPath)
Handles a local call.
|
protected void |
ZipClientHelper.handlePut(Request request,
Response response,
java.io.File file,
java.lang.String entryName)
Handles a PUT call.
|
Modifier and Type | Method and Description |
---|---|
protected void |
LogFilter.afterHandle(Request request,
Response response)
Allows filtering after processing by the next Restlet.
|
protected int |
LogFilter.beforeHandle(Request request,
Response response)
Allows filtering before processing by the next Restlet.
|
protected java.lang.String |
LogFilter.format(Request request,
Response response)
Format a log entry.
|
protected java.lang.String |
LogFilter.formatDefault(Request request,
Response response,
int duration)
Format a log entry using the default format.
|
Modifier and Type | Method and Description |
---|---|
void |
RiapClientHelper.handle(Request request,
Response response)
Handles a call.
|
Modifier and Type | Method and Description |
---|---|
static void |
AuthenticatorUtils.challenge(Response response,
boolean stale,
Guard guard)
Deprecated.
See new org.restlet.security package.
|
void |
AuthenticatorHelper.challenge(Response response,
boolean stale,
Guard guard)
Deprecated.
See new org.restlet.security package.
|
void |
AuthenticatorHelper.formatRawRequest(ChallengeWriter cw,
ChallengeRequest challenge,
Response response,
Series<Parameter> httpHeaders)
Formats a challenge request as raw credentials.
|
static java.lang.String |
AuthenticatorUtils.formatRequest(ChallengeRequest challenge,
Response response,
Series<Parameter> httpHeaders)
Formats a challenge request as a HTTP header value.
|
java.lang.String |
AuthenticatorHelper.formatRequest(ChallengeRequest challenge,
Response response,
Series<Parameter> httpHeaders)
Formats a challenge request as a HTTP header value.
|
char[] |
AuthenticatorHelper.formatSecret(ChallengeResponse challengeResponse,
Request request,
Response response,
java.lang.String identifier,
char[] baseSecret,
java.lang.String baseSecretAlgorithm)
Formats the secret of a challenge response.
|
void |
AuthenticatorHelper.parseRequest(ChallengeRequest challenge,
Response response,
Series<Parameter> httpHeaders)
Parses an authenticate header into a challenge request.
|
static java.util.List<ChallengeRequest> |
AuthenticatorUtils.parseRequest(Response response,
java.lang.String header,
Series<Parameter> httpHeaders)
Parses an authenticate header into a list of challenge request.
|
static void |
AuthenticatorUtils.update(ChallengeResponse challengeResponse,
Request request,
Response response)
Updates a ChallengeResponse object according to given request and
response.
|
Constructor and Description |
---|
CallResolver(Request request,
Response response)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Response |
NettyServerCall.getRestletResponse()
Returns the Restlet response.
|
Modifier and Type | Method and Description |
---|---|
void |
NettyServerCall.sendResponse(Response response) |
void |
NettyServerCall.setRestletResponse(Response restletResponse)
Sets the Restlet response.
|
void |
NettyServerCall.writeResponseHead(Response restletResponse) |
Modifier and Type | Method and Description |
---|---|
void |
SimpleCall.writeResponseHead(Response restletResponse) |
Modifier and Type | Method and Description |
---|---|
protected Response |
ClientResource.createResponse(Request request)
Creates a new response for the given request.
|
Response |
Handler.getResponse()
Deprecated.
Returns the response.
|
Response |
UniformResource.getResponse()
Returns the handled response.
|
Modifier and Type | Method and Description |
---|---|
ServerResource |
Finder.create(java.lang.Class<? extends ServerResource> targetClass,
Request request,
Response response)
Creates a new instance of a given
ServerResource subclass. |
ServerResource |
Finder.create(Request request,
Response response)
Creates a new instance of the
ServerResource subclass designated
by the "targetClass" property. |
protected Handler |
Finder.createTarget(java.lang.Class<? extends Handler> targetClass,
Request request,
Response response)
Deprecated.
Use
Finder.create(Request, Response) instead. |
protected Handler |
Finder.createTarget(Request request,
Response response)
Deprecated.
Use
Finder.create(Request, Response) instead. |
ServerResource |
Finder.find(Request request,
Response response)
Finds the target
ServerResource if available. |
Handler |
Finder.findTarget(Request request,
Response response)
Deprecated.
Use
Finder.find(Request, Response) instead. |
void |
Directory.handle(Request request,
Response response) |
void |
Finder.handle(Request request,
Response response)
Handles a call.
|
void |
Handler.init(Context context,
Request request,
Response response)
Deprecated.
Initialize the resource with its context.
|
void |
Resource.init(Context context,
Request request,
Response response)
Deprecated.
Initialize the resource with its context.
|
void |
UniformResource.init(Context context,
Request request,
Response response)
Initialization method setting the environment of the current resource
instance.
|
void |
Handler.setResponse(Response response)
Deprecated.
Sets the response to update.
|
void |
UniformResource.setResponse(Response response)
Sets the handled response.
|
Constructor and Description |
---|
ClientResource(Context context,
Request request,
Response response)
Constructor.
|
ClientResource(Request request,
Response response)
Constructor.
|
Handler(Context context,
Request request,
Response response)
Deprecated.
Normal constructor.
|
Resource(Context context,
Request request,
Response response)
Deprecated.
Normal constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
Filter.afterHandle(Request request,
Response response)
Allows filtering after processing by the next Restlet.
|
protected int |
Validator.beforeHandle(Request request,
Response response)
Allows filtering before its handling by the target Restlet.
|
protected int |
Route.beforeHandle(Request request,
Response response)
Deprecated.
Allows filtering before its handling by the target Restlet.
|
protected int |
Extractor.beforeHandle(Request request,
Response response)
Allows filtering before its handling by the target Restlet.
|
protected int |
Filter.beforeHandle(Request request,
Response response)
Allows filtering before processing by the next Restlet.
|
protected int |
TemplateRoute.beforeHandle(Request request,
Response response)
Allows filtering before its handling by the target Restlet.
|
protected int |
Filter.doHandle(Request request,
Response response)
Handles the call by distributing it to the next Restlet.
|
protected void |
Router.doHandle(Restlet next,
Request request,
Response response)
|
java.lang.String |
Template.format(Request request,
Response response)
Creates a formatted string based on the given request and response.
|
protected Route |
Router.getCustom(Request request,
Response response)
Returns the matched route according to a custom algorithm.
|
Restlet |
Router.getNext(Request request,
Response response)
Returns the next Restlet if available.
|
protected Reference |
Redirector.getTargetRef(Request request,
Response response)
Returns the target reference to redirect to.
|
void |
Router.handle(Request request,
Response response)
Handles a call by invoking the next Restlet if it is available.
|
void |
Redirector.handle(Request request,
Response response)
Handles a call by redirecting using the selected redirection mode.
|
void |
Filter.handle(Request request,
Response response)
Handles a call by first invoking the beforeHandle() method for
pre-filtering, then distributing the call to the next Restlet via the
doHandle() method.
|
protected void |
Redirector.inboundServerRedirect(Reference targetRef,
Request request,
Response response)
Redirects a given call to a target reference.
|
protected void |
Redirector.outboundServerRedirect(Reference targetRef,
Request request,
Response response)
Redirects a given call to a target reference.
|
protected void |
Redirector.redirectDispatcher(Reference targetRef,
Request request,
Response response)
Deprecated.
|
float |
TemplateRoute.score(Request request,
Response response)
Returns the score for a given call (between 0 and 1.0).
|
protected void |
Redirector.serverRedirect(Restlet next,
Reference targetRef,
Request request,
Response response)
Redirects a given call on the server-side to a next Restlet with a given
target reference.
|
Modifier and Type | Method and Description |
---|---|
void |
Guard.accept(Request request,
Response response)
Deprecated.
Accepts the call.
|
protected boolean |
ChallengeAuthenticator.authenticate(Request request,
Response response)
Authenticates the call, relying on the verifier to check the credentials
provided (in general an identifier + secret couple).
|
protected abstract boolean |
Authenticator.authenticate(Request request,
Response response)
Attempts to authenticate the subject sending the request.
|
protected int |
Authenticator.authenticated(Request request,
Response response)
Invoked upon successful authentication.
|
boolean |
RoleAuthorizer.authorize(Request request,
Response response)
Authorizes the request only if its subject is in one of the authorized
roles and in none of the forbidden ones.
|
boolean |
MethodAuthorizer.authorize(Request request,
Response response)
Authorizes the request only if its method is one of the authorized
methods.
|
protected abstract boolean |
Authorizer.authorize(Request request,
Response response)
Attempts to authorize the request.
|
protected int |
Authorizer.authorized(Request request,
Response response)
Invoked upon successful authorization.
|
protected int |
Authenticator.beforeHandle(Request request,
Response response)
Handles the authentication by first invoking the
Authenticator.authenticate(Request, Response) method. |
protected int |
Authorizer.beforeHandle(Request request,
Response response) |
void |
ChallengeAuthenticator.challenge(Response response,
boolean stale)
Challenges the client by adding a challenge request to the response and
by setting the status to
Status.CLIENT_ERROR_UNAUTHORIZED . |
void |
Guard.challenge(Response response,
boolean stale)
Deprecated.
Challenges the client by adding a challenge request to the response and
by setting the status to CLIENT_ERROR_UNAUTHORIZED.
|
int |
Guard.doHandle(Request request,
Response response)
Deprecated.
Handles the call by distributing it to the next Restlet.
|
void |
ChallengeAuthenticator.forbid(Response response)
Rejects the call due to a failed authentication or authorization.
|
void |
Guard.forbid(Response response)
Deprecated.
Rejects the call due to a failed authentication or authorization.
|
protected java.lang.String |
SecretVerifier.getIdentifier(Request request,
Response response)
Returns the user identifier.
|
protected char[] |
SecretVerifier.getSecret(Request request,
Response response)
Returns the secret provided by the user.
|
protected int |
Authenticator.unauthenticated(Request request,
Response response)
Invoked upon failed authentication.
|
protected int |
Authorizer.unauthorized(Request request,
Response response)
Invoked upon failed authorization.
|
int |
Verifier.verify(Request request,
Response response)
Attempts to verify the credentials provided by the client user sending
the request.
|
int |
SecretVerifier.verify(Request request,
Response response)
Verifies that the proposed secret is correct for the specified request.
|
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. |
Status |
StatusService.getStatus(java.lang.Throwable throwable,
Request request,
Response response)
Returns a status for a given exception or error.
|
Modifier and Type | Class and Description |
---|---|
class |
WrapperResponse
Request wrapper.
|
Modifier and Type | Method and Description |
---|---|
protected Response |
WrapperResponse.getWrappedResponse()
Returns the wrapped response.
|
Modifier and Type | Method and Description |
---|---|
void |
WrapperRequest.commit(Response response) |
static Resolver<?> |
Resolver.createResolver(Request request,
Response response)
Creates a resolver that is based on a call (request, response couple).
|
Route |
RouteList.getBest(Request request,
Response response,
float requiredScore)
Returns the best route match for a given call.
|
Route |
RouteList.getFirst(Request request,
Response response,
float requiredScore)
Returns the first route match for a given call.
|
Route |
RouteList.getLast(Request request,
Response response,
float requiredScore)
Returns the last route match for a given call.
|
Route |
RouteList.getNext(Request request,
Response response,
float requiredScore)
Returns a next route match in a round robin mode for a given call.
|
Route |
RouteList.getRandom(Request request,
Response response,
float requiredScore)
Returns a random route match for a given call.
|
void |
WrapperRestlet.handle(Request request,
Response response) |
Constructor and Description |
---|
WrapperResponse(Response wrappedResponse)
Constructor.
|
Copyright © 2005-2012. All Rights Reserved.