Package com.bj58.spat.gaea.client.communication.socket

Examples of com.bj58.spat.gaea.client.communication.socket.CSocketChannelTest


        int order = orderObject == null ? 100
                : (Integer)orderObject;   // xxx: maybe throw exception.

        PreInterceptor preInterceptor = (preA == null ? null : getArgo().getInstance(preA.value()));
        PostInterceptor postInterceptor = (postA == null ? null : getArgo().getInstance(postA.value()));

        return new InterceptorInfo(ann, order, preInterceptor, postInterceptor);
    }
View Full Code Here


        return interceptorInfoList;
    }

    private InterceptorInfo findInterceptorInfo(Annotation ann) {
        PreInterceptorAnnotation preA = AnnotationUtils.findAnnotation(ann.getClass(), PreInterceptorAnnotation.class);
        PostInterceptorAnnotation postA = AnnotationUtils.findAnnotation(ann.getClass(), PostInterceptorAnnotation.class);
        if (preA == null && postA == null)
            return null;

        Object orderObject = AnnotationUtils.getValue(ann, "order");

        int order = orderObject == null ? 100
                : (Integer)orderObject;   // xxx: maybe throw exception.

        PreInterceptor preInterceptor = (preA == null ? null : getArgo().getInstance(preA.value()));
        PostInterceptor postInterceptor = (postA == null ? null : getArgo().getInstance(postA.value()));

        return new InterceptorInfo(ann, order, preInterceptor, postInterceptor);
    }
View Full Code Here

    List<PreInterceptor> getPreInterceptorList( List<InterceptorInfo> interceptorInfoList) {

        ImmutableList.Builder<PreInterceptor> builder = ImmutableList.builder();

        for(InterceptorInfo interceptorInfo : interceptorInfoList) {
            PreInterceptor preInterceptor = interceptorInfo.getPreInterceptor();
            if (preInterceptor != null)
                builder.add(preInterceptor);
        }

        return builder.build();
View Full Code Here

        Object orderObject = AnnotationUtils.getValue(ann, "order");

        int order = orderObject == null ? 100
                : (Integer)orderObject;   // xxx: maybe throw exception.

        PreInterceptor preInterceptor = (preA == null ? null : getArgo().getInstance(preA.value()));
        PostInterceptor postInterceptor = (postA == null ? null : getArgo().getInstance(postA.value()));

        return new InterceptorInfo(ann, order, preInterceptor, postInterceptor);
    }
View Full Code Here

        return interceptorInfoList;
    }

    private InterceptorInfo findInterceptorInfo(Annotation ann) {
        PreInterceptorAnnotation preA = AnnotationUtils.findAnnotation(ann.getClass(), PreInterceptorAnnotation.class);
        PostInterceptorAnnotation postA = AnnotationUtils.findAnnotation(ann.getClass(), PostInterceptorAnnotation.class);
        if (preA == null && postA == null)
            return null;

        Object orderObject = AnnotationUtils.getValue(ann, "order");

        int order = orderObject == null ? 100
                : (Integer)orderObject;   // xxx: maybe throw exception.

        PreInterceptor preInterceptor = (preA == null ? null : getArgo().getInstance(preA.value()));
        PostInterceptor postInterceptor = (postA == null ? null : getArgo().getInstance(postA.value()));

        return new InterceptorInfo(ann, order, preInterceptor, postInterceptor);
    }
View Full Code Here

            folder = new File(url.toURI());
        } catch (URISyntaxException e) {
            Throwables.propagate(e);
        }

    return new DefaultGroupConvention(conventionAnnotation, folder);

  }
View Full Code Here

    }

    @Override
    public Logger getLogger(String name) {

        Logger logger = null;

        synchronized (this) {
            logger = loggerMap.get(name);
            if (logger != null)
                return logger;
View Full Code Here

    }

    @Override
    public void service(HttpServletRequest request, HttpServletResponse response) {

        ArgoRequest argoRequest = new ArgoRequest(request, config);

        try {
            BeatContext beatContext = bindBeatContext(argoRequest, response);

            route(beatContext);
View Full Code Here

*/
public class PathMatcherTest {

    @Test
    public void test() {
        PathMatcher pathMatcher = new AntPathMatcher();

        String pattern = "/{a}/{b}/{c}";

        String sample = "/aa/bb/cc";

        Assert.assertTrue(pathMatcher.match(pattern, sample));

    }
View Full Code Here

    }


    @Test
    public void testPathMatch(){
        PathMatcher pathMatcher = new AntPathMatcher();
        String registeredPath = "/me/hello/{name}";
        String url = "/me/hello/renjun";
        Assert.assertTrue(pathMatcher.match(registeredPath, url));

        Map<String, String> values = pathMatcher.extractUriTemplateVariables(registeredPath, url);
        Assert.assertEquals(1, values.size());
        Assert.assertEquals("renjun", values.get("name"));

        System.out.println("OK testpathMatch");
View Full Code Here

TOP

Related Classes of com.bj58.spat.gaea.client.communication.socket.CSocketChannelTest

Copyright © 2018 www.massapicom. 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.