Examples of handle()


Examples of org.restlet.Restlet.handle()

                    + request.getMethod());
        }
       
        Restlet target = routes.get(request.getMethod());
        if (target != null) {
            target.handle(request, response);
        } else {
            if (LOG.isDebugEnabled()) {
                LOG.debug("No route for request method: " + request.getMethod());
            }
            response.setStatus(Status.CLIENT_ERROR_NOT_FOUND);
View Full Code Here

Examples of org.restlet.Uniform.handle()

                        try {
                            updateResponse(response,
                                    new Status(httpCall.getStatusCode(), null,
                                            httpCall.getReasonPhrase(), null),
                                    httpCall);
                            userCallback.handle(request, response);
                        } catch (Exception e) {
                            // Unexpected exception occurred
                            if ((response.getStatus() == null)
                                    || !response.getStatus().isError()) {
                                response.setStatus(
View Full Code Here

Examples of org.restlet.client.Uniform.handle()

                                    new Status(httpCall.getStatusCode(), null,
                                            httpCall.getReasonPhrase(), null),
                                    httpCall);

                            if (userCallback != null) {
                                userCallback.handle(request, response);
                            }
                        } catch (Throwable t) {
                            getLogger()
                                    .log(Level.WARNING,
                                            "Unexpected error or exception inside the user call back",
View Full Code Here

Examples of org.restlet.resource.ClientResource.handle()

                                        .getFirstValue(parameter.getName()),
                                        parameter.getType()));
                    }
                }

                result = resource.handle();
                this.latestRequest = resource.getRequest();
                this.latestResponse = resource.getResponse();

                if (resource.getStatus().isError()) {
                    throw new ResourceException(resource.getStatus());
View Full Code Here

Examples of org.restlet.routing.Filter.handle()

        filter.start();
        assertTrue(filter.isStarted());
        assertFalse(filter.isStopped());
        final Request request = getRequest();
        final Response response = getResponse(request);
        filter.handle(request, response);
        assertTrue(filter.hasNext());
        filter.setNext((Restlet) null);
        assertFalse(filter.hasNext());
    }
View Full Code Here

Examples of org.restlet.routing.Redirector.handle()

            Redirector dispatcher = new Redirector(getContext(), callback,
                    Redirector.MODE_CLIENT_TEMPORARY);

            // //TODO maybe move it to use Principal.
            getContext().getAttributes().put("id", id); // same app
            dispatcher.handle(request, response);
            response.getCookieSettings().remove(INTERNAL_SERVER_COOKIE);
        } else {
            JSONObject obj = new JSONObject();
            try {
                obj.put("id", id);
View Full Code Here

Examples of org.restlet.routing.Validator.handle()

        // Prepare the validator to test
        Validator validator = new Validator();
        validator.setNext(new TraceRestlet(null));
        validator.validatePresence("a");
        validator.handle(rq, rs);

        // Test if the absence of "a" is detected
        assertEquals(Status.CLIENT_ERROR_BAD_REQUEST, rs.getStatus());

        // Test if the presence of "a" is ignored
View Full Code Here

Examples of org.saiku.olap.query.QueryProperties.QueryProperty.handle()

      this.properties.putAll(props);
      for (Object key : props.keySet()) {
        String key2 = (String) key;
        String value = props.getProperty((String) key);
        QueryProperty prop = QueryPropertyFactory.getProperty(key2, value, this);
        prop.handle();
      }
    }
  }

  @NotNull
View Full Code Here

Examples of org.simpleframework.http.resource.Resource.handle()

            oneOf(response).setCode(404);
            allowing(response).getOutputStream(); will(returnValue(new ByteArrayOutputStream()));
            ignoring(response);
        }});
       
        resource.handle(request, response);
        context.assertIsSatisfied();
    }
   
    @Test public void
    resolvesLandscapeList() {
View Full Code Here

Examples of org.springframework.batch.core.job.flow.State.handle()

    while (isFlowContinued(state, status, stepExecution)) {
      stateName = state.getName();

      try {
        logger.debug("Handling state="+stateName);
        status = state.handle(executor);
        stepExecution = executor.getStepExecution();
      }
      catch (FlowExecutionException e) {
        executor.close(new FlowExecution(stateName, status));
        throw e;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.