Examples of handle()


Examples of br.com.caelum.brutauth.auth.handlers.RuleHandler.handle()

      long permissionData) {
    for (Class<? extends SimpleBrutauthRule> permission : rules) {
      SimpleBrutauthRule rule = container.instanceFor(permission);
      RuleHandler handler = handlers.getHandler(rule);
      if(!rule.isAllowed(permissionData)){
        handler.handle();
        return false;
      }
    }
    return true;
 
View Full Code Here

Examples of br.com.caelum.stella.gateway.visa.VISAVerificacaoRetornoIntegracaoViaHttp.handle()

        one(request).getParameter("ars");will(returnValue("autorizada"));
        one(request).getParameter("tid");will(returnValue("12345678"));       
      }
    });
    VISAVerificacaoRetornoIntegracaoViaHttp retornoIntegracaoViaHttp = new VISAVerificacaoRetornoIntegracaoViaHttp(request,VISAHttpReturnBuilder.CANCELAMENTO_RETORNO_BUILDER);
    VISACancelamentoReturn cancelamentoReturn = (VISACancelamentoReturn)retornoIntegracaoViaHttp.handle();
   
   
 
 
  @Test
View Full Code Here

Examples of by.stub.handlers.strategy.StubResponseHandlingStrategy.handle()

      final StubRequest assertionStubRequest = StubRequest.creatFromHttpServletRequest(request);
      final StubResponse foundStubResponse = dataStore.findStubResponseFor(assertionStubRequest);
      final StubResponseHandlingStrategy strategyStubResponse = HandlingStrategyFactory.identifyHandlingStrategyFor(foundStubResponse);

      try {
         strategyStubResponse.handle(response, assertionStubRequest);
         ConsoleUtils.logOutgoingResponse(request, response, NAME);

      } catch (final Exception ex) {
         HandlerUtils.configureErrorResponse(response, HttpStatus.INTERNAL_SERVER_ERROR_500, ex.toString());
      }
View Full Code Here

Examples of by.stub.handlers.strategy.admin.AdminResponseHandlingStrategy.handle()

      wrapper.setHeader(HttpHeaders.PRAGMA, "no-cache"); // HTTP 1.0.
      wrapper.setDateHeader(HttpHeaders.EXPIRES, 0);

      final AdminResponseHandlingStrategy strategyStubResponse = AdminResponseHandlingStrategyFactory.getStrategy(request);
      try {
         strategyStubResponse.handle(request, wrapper, stubbedDataManager);
      } catch (final Exception ex) {
         HandlerUtils.configureErrorResponse(response, HttpStatus.INTERNAL_SERVER_ERROR_500, "Problem handling request in Admin handler: " + ex.toString());
      }

      ConsoleUtils.logOutgoingResponse(request.getRequestURI(), wrapper);
View Full Code Here

Examples of by.stub.handlers.strategy.stubs.StubResponseHandlingStrategy.handle()

      final StubResponse foundStubResponse = stubbedDataManager.findStubResponseFor(assertionStubRequest);
      final StubResponseHandlingStrategy strategyStubResponse = StubsResponseHandlingStrategyFactory.getStrategy(foundStubResponse);
      final HttpServletResponseWithGetStatus wrapper = new HttpServletResponseWithGetStatus(response);

      try {
         strategyStubResponse.handle(wrapper, assertionStubRequest);
      } catch (final Exception ex) {
         HandlerUtils.configureErrorResponse(response, HttpStatus.INTERNAL_SERVER_ERROR_500, ex.toString());
      }

      ConsoleUtils.logOutgoingResponse(assertionStubRequest.getUrl(), wrapper);
View Full Code Here

Examples of cascading.lingual.common.Target.handle()

        return getOptions().printInvalidOptionMessage( getErrPrintStream(), "no command given: missing --add, --rename, --remove, --update, --validate, --show" );

      if( !( target instanceof ProtocolTarget || target instanceof FormatTarget ) && getOptions().hasProperties() )
        return getOptions().printInvalidOptionMessage( getErrPrintStream(), "--properties may only be added to formats or protocols via --add or --update" );

      return target.handle( platformBroker );
      }
    catch( Throwable throwable )
      {
      doNotWrite = true;
      Throwables.propagate( throwable );
View Full Code Here

Examples of cleo.search.util.TermsDedup.handle()

    String[] terms;
    String[] results;
    String[] expected;
   
    terms = new String[] { };
    results = dedup.handle(source, terms);
    assertTrue(Arrays.equals(terms, results));
   
    terms = new String[] { "ibm" };
    results = dedup.handle(source, terms);
    assertTrue(Arrays.equals(terms, results));
View Full Code Here

Examples of com.adito.boot.RequestHandler.handle()

            try {
                request.setCharacterEncoding(SystemProperties.get("adito.encoding", "UTF-8"), false);
                RequestHandler handler = (RequestHandler) i.next();
                ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
                Thread.currentThread().setContextClassLoader(handler.getClass().getClassLoader());
                if (handler.handle(pathInContext, pathParams, new RequestAdapter(request), new ResponseAdapter(response))) {
                    request.setHandled(true);
                    break;
                }
                Thread.currentThread().setContextClassLoader(oldLoader);
            } catch (RequestHandlerException e) {
View Full Code Here

Examples of com.alibaba.dubbo.remoting.http.HttpHandler.handle()

        throws ServletException, IOException {
        HttpHandler handler = handlers.get(request.getLocalPort());
        if( handler == null ) {// service not found.
            response.sendError(HttpServletResponse.SC_NOT_FOUND, "Service not found.");
        } else {
            handler.handle(request, response);
        }
    }

}
View Full Code Here

Examples of com.comphenix.protocol.events.PacketOutputHandler.handle()

    // Let each handler prepare the actual output
    while (!handlers.isEmpty()) {
      PacketOutputHandler handler = handlers.poll();
     
      try {
        byte[] changed = handler.handle(event, output);
       
        // Don't break just because a plugin returned NULL
        if (changed != null) {
          output = changed;
        } else {
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.