com.noelios.restlet.component
Class ComponentStatusFilter
java.lang.Object
org.restlet.Uniform
org.restlet.Restlet
org.restlet.Filter
com.noelios.restlet.StatusFilter
com.noelios.restlet.component.ComponentStatusFilter
public class ComponentStatusFilter
- extends StatusFilter
Status filter that tries to obtain ouput representation from an application.
Concurrency note: instances of this class or its subclasses can be invoked by
several threads at the same time and therefore must be thread-safe. You
should be especially careful when storing state in member variables.
- Author:
- Jerome Louvel
Methods inherited from class org.restlet.Uniform |
delete, delete, get, get, handle, head, head, options, options, post, post, put, put |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ComponentStatusFilter
public ComponentStatusFilter(Component component)
- Constructor.
- Parameters:
component
- The component.
getComponent
public Component getComponent()
- Returns the component.
- Returns:
- The component.
getRepresentation
public Representation getRepresentation(Status status,
Request request,
Response response)
- Description copied from class:
StatusFilter
- Returns a representation for the given status.
In order to customize the default representation, this method can be
overriden.
- Overrides:
getRepresentation
in class StatusFilter
- Parameters:
status
- The status to represent.request
- The request handled.response
- The response updated.
- Returns:
- The representation of the given status.
getStatus
public Status getStatus(java.lang.Throwable throwable,
Request request,
Response response)
- Description copied from class:
StatusFilter
- Returns a status for a given exception or error. By default it returns an
Status.SERVER_ERROR_INTERNAL
status including the related error
or exception and logs a severe message.
In order to customize the default behavior, this method can be overriden.
- Overrides:
getStatus
in class StatusFilter
- Parameters:
throwable
- The exception or error caught.request
- The request handled.response
- The response updated.
- Returns:
- The representation of the given status.
Copyright © 2005-2008 Noelios Technologies.