Package org.restlet.client.data

Examples of org.restlet.client.data.Status


     *
     * @param code
     *            The specification code of the encapsulated status.
     */
    public ResourceException(int code) {
        this(new Status(code));
    }
View Full Code Here


     * @param uri
     *            The URI of the specification describing the method.
     */
    public ResourceException(int code, String name, String description,
            String uri) {
        this(new Status(code, name, description, uri));
    }
View Full Code Here

     * @param cause
     *            The wrapped cause error or exception.
     */
    public ResourceException(int code, String name, String description,
            String uri, Throwable cause) {
        this(new Status(code, cause, name, description, uri), cause);
    }
View Full Code Here

     *            The specification code of the encapsulated status.
     * @param cause
     *            The wrapped cause error or exception.
     */
    public ResourceException(int code, Throwable cause) {
        this(new Status(code, cause), cause);
    }
View Full Code Here

     *            The status to copy.
     * @param description
     *            The description of the encapsulated status.
     */
    public ResourceException(Status status, String description) {
        this(new Status(status, description));
    }
View Full Code Here

     *            The description of the encapsulated status.
     * @param cause
     *            The wrapped cause error or exception.
     */
    public ResourceException(Status status, String description, Throwable cause) {
        this(new Status(status, cause, description), cause);
    }
View Full Code Here

     *
     * @param cause
     *            The wrapped cause error or exception.
     */
    public ResourceException(Throwable cause) {
        this(new Status(Status.SERVER_ERROR_INTERNAL, cause), cause);
    }
View Full Code Here

                // Send the request to the client
                httpCall.sendRequest(request, response, new Uniform() {
                    public void handle(Request request, Response response) {
                        try {
                            updateResponse(response,
                                    new Status(httpCall.getStatusCode(), null,
                                            httpCall.getReasonPhrase(), null),
                                    httpCall);
                            userCallback.handle(request, response);
                        } catch (Exception e) {
                            // Unexpected exception occurred
View Full Code Here

     *            The response updated.
     * @return The representation of the given status.
     */
    public Status getStatus(Throwable throwable, Request request,
            Response response) {
        Status result = null;

        if (throwable instanceof ResourceException) {
            ResourceException re = (ResourceException) throwable;

            if (re.getCause() != null) {
                // What is most interesting is the embedded cause
                result = new Status(re.getStatus(), re.getCause());
            } else {
                result = re.getStatus();
            }
        } else {
            result = new Status(Status.SERVER_ERROR_INTERNAL, throwable);
        }

        return result;
    }
View Full Code Here

     *            The status to set (code and reason phrase).
     * @param description
     *            The longer status description.
     */
    public void setStatus(Status status, String description) {
        setStatus(new Status(status, description));
    }
View Full Code Here

TOP

Related Classes of org.restlet.client.data.Status

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.