Examples of HandlerChain


Examples of com.firefly.mvc.web.HandlerChain

    response.setCharacterEncoding(encoding);

    StringBuilder uriBuilder = new StringBuilder(request.getRequestURI());
    uriBuilder.delete(0, request.getContextPath().length() + request.getServletPath().length());
    String servletURI = uriBuilder.length() <= 0 ? null : uriBuilder.toString();
    HandlerChain chain = webContext.match(request.getRequestURI(), servletURI);
    View v = null;
    try {
      v = chain.doNext(request, response, chain);
    } catch (Throwable e) {
      log.error("dispatcher error", e);
      if(!response.isCommitted()) {
        String msg = "Server internal error";
        SystemHtmlPage.responseSystemPage(request, response, webContext.getEncoding(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR, msg);
View Full Code Here

Examples of javax.jws.HandlerChain

        return clazz.isAnnotationPresent(HandlerChain.class);
    }

    public HandlerChainAnnotation getHandlerChainAnnotation(Class clazz)
    {
        HandlerChain handlerChain = (HandlerChain) clazz.getAnnotation(HandlerChain.class);
        HandlerChainAnnotation annotation = null;
        if (handlerChain != null)
        {
            annotation = new HandlerChainAnnotation(handlerChain.file(),
                                                    handlerChain.name());
        }
        return annotation;
    }
View Full Code Here

Examples of javax.jws.HandlerChain

        return buildHandlerChainFor(clz, null);
    }

    private HandlerChainAnnotation findHandlerChainAnnotation(Class<?> clz) {

        HandlerChain ann = clz.getAnnotation(HandlerChain.class);
        Class<?> declaringClass = clz;

        if (ann == null) {
            for (Class<?> iface : clz.getInterfaces()) {
                if (LOG.isLoggable(Level.FINE)) {
View Full Code Here

Examples of javax.jws.HandlerChain

        assertEquals(4, files.length);
        File handlerConfig = new File(address, "Greeter_handler.xml");
        assertTrue(handlerConfig.exists());

        Class clz = classLoader.loadClass("ws.address.Greeter");
        HandlerChain handlerChainAnno = AnnotationUtil.getPrivClassAnnotation(clz, HandlerChain.class);
        assertEquals("Greeter_handler.xml", handlerChainAnno.file());
        assertNotNull("Handler chain xml generate fail!", classLoader
                      .findResource("ws/address/Greeter_handler.xml"));
    }
View Full Code Here

Examples of javax.jws.HandlerChain

                                    provider.serviceName());

      portInfo = new PortInfoImpl(bindingType.value(), portName, serviceName);
    }

    HandlerChain handlerChain =
      (HandlerChain) _class.getAnnotation(HandlerChain.class);

    if (handlerChain != null) {
      if (portInfo != null) {
        HandlerResolver handlerResolver =
View Full Code Here

Examples of javax.jws.HandlerChain

      PortInfoImpl portInfo = new PortInfoImpl(bindingId, portName,
                                               _serviceName, endpointAddress);

      // Check for @HandlerChain on the service API
      if (_handlerResolver == null) {
        HandlerChain handlerChain =
          (HandlerChain) api.getAnnotation(HandlerChain.class);

        if (handlerChain != null)
          _handlerResolver = JAXWSUtil.createHandlerResolver(api, handlerChain);
      }

      // Check for @HandlerChain on the Service
      if (_handlerResolver == null) {
        HandlerChain handlerChain =
          (HandlerChain) _serviceClass.getAnnotation(HandlerChain.class);

        if (handlerChain != null)
          _handlerResolver = JAXWSUtil.createHandlerResolver(api, handlerChain);
      }
View Full Code Here

Examples of javax.jws.HandlerChain

        assertEquals(Arrays.asList(address.listFiles()).toString(), 6, files.length);
        File handlerConfig = new File(address, "Greeter_handler.xml");
        assertTrue(handlerConfig.exists());

        Class<?> clz = classLoader.loadClass("ws.address.Greeter");
        HandlerChain handlerChainAnno = AnnotationUtil.getPrivClassAnnotation(clz, HandlerChain.class);
        assertEquals("Greeter_handler.xml", handlerChainAnno.file());
        assertNotNull("Handler chain xml generate fail!", classLoader
            .getResource("ws/address/Greeter_handler.xml"));
    }
View Full Code Here

Examples of javax.jws.HandlerChain

        List<Field> fieldswithHandlerChain = classFinder.findAnnotatedFields(HandlerChain.class);


        // Method-level annotation
        for ( Method method : methodswithHandlerChain ) {
            HandlerChain handlerChain = method.getAnnotation(HandlerChain.class);
            if ( handlerChain != null ) {
                addHandlerChain(annotatedApp, handlerChain, null, method, null);
            }
        }

        // Field-level annotation
        for ( Field field : fieldswithHandlerChain ) {
            HandlerChain handlerChain = field.getAnnotation(HandlerChain.class);
            if ( handlerChain != null ) {
                addHandlerChain(annotatedApp, handlerChain, null, null, field);
            }
        }
View Full Code Here

Examples of javax.jws.HandlerChain

            }
        }

        // handler-chains
        if (!serviceRef.isSetHandlerChains()) {
            HandlerChain handlerChain = null;
            Class annotatedClass = null;
            if (method != null) {
                handlerChain = method.getAnnotation(HandlerChain.class);
                annotatedClass = method.getDeclaringClass();
            } else if (field != null) {
View Full Code Here

Examples of javax.jws.HandlerChain

     * @param composite        - <code>TMFAnnotationComposite</code>
     * @param annotatedElement - <code>AnnotatedElement</code>
     */
    public static void attachHandlerChainAnnotation(TMFAnnotationComposite composite,
                                                    AnnotatedElement annotatedElement) {
        HandlerChain handlerChain = (HandlerChain)ConverterUtils.getAnnotation(
                HandlerChain.class, annotatedElement);
        if (handlerChain != null) {
            HandlerChainAnnot hcAnnot = ConverterUtils.createHandlerChainAnnot(
                    handlerChain);
            composite.setHandlerChainAnnot(hcAnnot);
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.