Examples of handleRequest()


Examples of org.springframework.web.servlet.resource.ResourceHttpRequestHandler.handleRequest()

    MockHttpServletRequest request = new MockHttpServletRequest();
    request.setMethod("GET");
    request.setAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE, "/testStylesheet.css");

    ResourceHttpRequestHandler handler = getHandler("/resources/**");
    handler.handleRequest(request, this.response);

    assertEquals("test stylesheet content", this.response.getContentAsString());
  }

  @Test
View Full Code Here

Examples of org.springframework.web.socket.sockjs.transport.TransportHandlingSockJsService.handleRequest()

  @Test
   public void handleTransportRequestJsonp() throws Exception {
    TransportHandlingSockJsService jsonpService = new TransportHandlingSockJsService(this.taskScheduler, this.jsonpHandler, this.jsonpSendHandler);
    String sockJsPath = sessionUrlPrefix+ "jsonp";
    setRequest("GET", sockJsPrefix + sockJsPath);
    jsonpService.handleRequest(this.request, this.response, sockJsPath, this.wsHandler);
    assertNotEquals(404, this.servletResponse.getStatus());

    resetRequestAndResponse();
    jsonpService.setAllowedOrigins(Arrays.asList("http://mydomain1.com"));
    setRequest("GET", sockJsPrefix + sockJsPath);
View Full Code Here

Examples of org.springframework.ws.client.support.interceptor.ClientInterceptor.handleRequest()

    public void testInterceptors() throws Exception {
        ClientInterceptor interceptorMock1 = createStrictMock("interceptor1", ClientInterceptor.class);
        ClientInterceptor interceptorMock2 = createStrictMock("interceptor2", ClientInterceptor.class);
        template.setInterceptors(new ClientInterceptor[]{interceptorMock1, interceptorMock2});
        expect(interceptorMock1.handleRequest(isA(MessageContext.class))).andReturn(true);
        expect(interceptorMock2.handleRequest(isA(MessageContext.class))).andReturn(true);
        expect(interceptorMock2.handleResponse(isA(MessageContext.class))).andReturn(true);
        expect(interceptorMock1.handleResponse(isA(MessageContext.class))).andReturn(true);
        interceptorMock2.afterCompletion(isA(MessageContext.class), (Exception)isNull());
        interceptorMock1.afterCompletion(isA(MessageContext.class), (Exception)isNull());
View Full Code Here

Examples of org.springframework.ws.server.EndpointInterceptor.handleRequest()

    @Test
    public void testValidateUsernameTokenPlainText() throws Exception {
        EndpointInterceptor interceptor = prepareInterceptor("UsernameToken", true, false);
        SoapMessage message = loadSoap11Message("usernameTokenPlainText-soap.xml");
        MessageContext messageContext = new DefaultMessageContext(message, getSoap11MessageFactory());
        interceptor.handleRequest(messageContext, null);
        assertValidateUsernameToken(message);

        // test clean up
        messageContext.getResponse();
        interceptor.handleResponse(messageContext, null);
View Full Code Here

Examples of org.syncany.operations.daemon.messages.api.FolderRequestHandler.handleRequest()

      try {
        if (!watchOperation.isSyncRunning() && !watchOperation.isSyncRequested()) {
          watchOperation.pause();
         
          FolderRequestHandler handler = FolderRequestHandler.createFolderRequestHandler(folderRequest, config);
          Response response = handler.handleRequest(folderRequest);
         
          if (response != null) {
            eventBus.post(response);
          }
         
View Full Code Here

Examples of springapp.web.InventoryController.handleRequest()

  public void testHandleRequestView() throws Exception {
    InventoryController controller = new InventoryController();
    SimpleProductManager spm = new SimpleProductManager();
    spm.setProductDao(new InMemoryProductDao(new ArrayList<Product>()));
    controller.setProductManager(spm);
    ModelAndView modelAndView = controller.handleRequest(null, null);
    assertEquals("hello", modelAndView.getViewName());
    assertNotNull(modelAndView.getModel());
    Map modelMap = (Map) modelAndView.getModel().get("model");
    String nowValue = (String) modelMap.get("now");
    assertNotNull(nowValue);
View Full Code Here

Examples of voldemort.server.protocol.RequestHandler.handleRequest()

            RequestHandler handler = handlerFactory.getRequestHandler(protocol);
            logger.info("Client " + socket.getRemoteSocketAddress()
                        + " connected successfully with protocol " + protocol.getCode());

            while(!isInterrupted() && !socket.isClosed() && !isClosed) {
                StreamRequestHandler srh = handler.handleRequest(inputStream, outputStream);

                if(srh != null) {
                    if(logger.isTraceEnabled())
                        logger.trace("Request is streaming");
View Full Code Here

Examples of voldemort.server.protocol.StreamRequestHandler.handleRequest()

                    try {
                        do {
                            if(logger.isTraceEnabled())
                                logger.trace("About to enter streaming request handler");

                            srhs = srh.handleRequest(inputStream, outputStream);

                            if(logger.isTraceEnabled())
                                logger.trace("Finished invocation of streaming request handler, result is "
                                             + srhs);
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.