Examples of handle()


Examples of org.apache.http.protocol.HttpRequestHandler.handle()

                if (this.handlerResolver != null) {
                    String requestURI = request.getRequestLine().getUri();
                    handler = this.handlerResolver.lookup(requestURI);
                }
                if (handler != null) {
                    handler.handle(request, response, context);
                } else {
                    response.setStatusCode(HttpStatus.SC_NOT_IMPLEMENTED);
                }

            } catch (HttpException ex) {
View Full Code Here

Examples of org.apache.jmeter.protocol.mongodb.mongo.EvalResultHandler.handle()

            MongoScriptRunner runner = new MongoScriptRunner();
            DB db = mongoDB.getDB(getDatabase(), getUsername(), getPassword());
            res.latencyEnd();
            Object result = runner.evaluate(db, data);
            EvalResultHandler handler = new EvalResultHandler();
            String resultAsString = handler.handle(result);
            res.setResponseData(resultAsString.getBytes());
        } catch (Exception ex) {
            res.setResponseCode("500"); // $NON-NLS-1$
            res.setSuccessful(false);
            res.setResponseMessage(ex.toString());
View Full Code Here

Examples of org.apache.mina.statemachine.StateMachine.handle()

        s1.addTransition(new BreakAndContinueTransition("foo"));
        s1.addTransition(new SuccessTransition("foo"));

        StateContext context = new DefaultStateContext();
        StateMachine sm = new StateMachine(new State[] { s1 }, "s1");
        sm.handle(new Event("foo", context));
        assertEquals(true, context.getAttribute("success"));
    }
   
    public void testBreakAndGotoNow() throws Exception {
        State s1 = new State("s1");
View Full Code Here

Examples of org.apache.olingo.odata2.api.ODataDebugResponseWrapperCallback.handle()

    if (context.isInDebugMode()) {
      final String debugValue = getQueryDebugValue(request.getQueryParameters());
      if (debugValue == null) {
        ODataDebugResponseWrapperCallback callback =
            context.getServiceFactory().getCallback(ODataDebugResponseWrapperCallback.class);
        return callback == null ? odataResponse : callback.handle(context, request, odataResponse, uriInfo, exception);
      } else {
        return new ODataDebugResponseWrapper(context, odataResponse, uriInfo, exception, debugValue).wrapResponse();
      }
    } else {
      return odataResponse;
View Full Code Here

Examples of org.apache.olingo.odata2.core.ODataRequestHandler.handle()

    service.getProcessor().setContext(context);
    context.setService(service);

    ODataRequestHandler requestHandler = new ODataRequestHandler(serviceFactory, service, context);

    final ODataResponse odataResponse = requestHandler.handle(request);
    final Response response = RestUtil.convertResponse(odataResponse);

    return response;
  }
View Full Code Here

Examples of org.apache.qpid.framing.AMQBody.handle()

                        final AMQBody bodyFrame = frame.getBodyFrame();

                        HeartbeatDiagnostics.received(bodyFrame instanceof HeartbeatBody);

                        bodyFrame.handle(frame.getChannel(), _protocolSession);

                        _connection.bytesReceived(_readBytes);
                    }
                    else if (message instanceof ProtocolInitiation)
                    {
View Full Code Here

Examples of org.apache.qpid.server.store.handler.ConfiguredObjectRecordHandler.handle()

                {
                    @Override
                    public Object answer(final InvocationOnMock invocation) throws Throwable
                    {
                        ConfiguredObjectRecordHandler recoverer = recovererArgumentCaptor.getValue();
                        if(recoverer.handle(_root))
                        {
                            recoverer.handle(_portEntry);
                        }
                        return null;
                    }
View Full Code Here

Examples of org.apache.qpid.server.store.handler.MessageHandler.handle()

            final StoredMessage<TestMessageMetaData> message = _store.addMessage(new TestMessageMetaData(i + 1, contentSize));
            enqueueMessage(message, "dummyQ");
        }

        MessageHandler handler = mock(MessageHandler.class);
        when(handler.handle(any(StoredMessage.class))).thenReturn(true, false);

        _store.visitMessages(handler);

        verify(handler, times(2)).handle(any(StoredMessage.class));
    }
View Full Code Here

Examples of org.apache.rahas.impl.util.SAMLCallbackHandler.handle()

              SAMLNameIdentifier nameId = null;
              if(config.getCallbackHander() != null){
                SAMLNameIdentifierCallback cb = new SAMLNameIdentifierCallback(data);
                cb.setUserId(principal.getName());
                SAMLCallbackHandler callbackHandler = config.getCallbackHander();
                callbackHandler.handle(cb);
                nameId = cb.getNameId();
              }else{
                  nameId = new SAMLNameIdentifier(
                principal.getName(), null, SAMLNameIdentifier.FORMAT_EMAIL);
              }
View Full Code Here

Examples of org.apache.spark.network.client.TransportResponseHandler.handle()

    TransportResponseHandler handler = new TransportResponseHandler(new LocalChannel());
    ChunkReceivedCallback callback = mock(ChunkReceivedCallback.class);
    handler.addFetchRequest(streamChunkId, callback);
    assertEquals(1, handler.numOutstandingRequests());

    handler.handle(new ChunkFetchSuccess(streamChunkId, new TestManagedBuffer(123)));
    verify(callback, times(1)).onSuccess(eq(0), (ManagedBuffer) any());
    assertEquals(0, handler.numOutstandingRequests());
  }

  @Test
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.