Package com.alibaba.citrus.service.uribroker.uri

Examples of com.alibaba.citrus.service.uribroker.uri.URIBroker.render()


        for (String name : service.getNames()) {
            URIBroker uri = service.getURIBroker(name);

            if ("link-request".equals(name)) {
                assertEquals("http://localhost/", uri.render());
            } else {
                assertEquals("http:///", uri.render());
                assertEquals("http://www.alibaba.com:9999/", uri.setServerName("www.alibaba.com").setServerPort(9999)
                                                                .render());
            }
View Full Code Here


            URIBroker uri = service.getURIBroker(name);

            if ("link-request".equals(name)) {
                assertEquals("http://localhost/", uri.render());
            } else {
                assertEquals("http:///", uri.render());
                assertEquals("http://www.alibaba.com:9999/", uri.setServerName("www.alibaba.com").setServerPort(9999)
                                                                .render());
            }
        }
    }
View Full Code Here

    @Test
    public void uriBean() {
        service = (URIBrokerServiceImpl) factory.getBean("uri_bean");

        URIBroker bean = service.getURIBroker("mybean");
        assertEquals("https://myserver/aa/bb/cc", bean.render());
    }

    @Test
    public void importAndOverride() {
        service = (URIBrokerServiceImpl) factory.getBean("import");
View Full Code Here

        u1 = u1.fork();

        assertEquals(true, u1.isAutoReset());
        assertEquals("http://localhost:8080/", u1.toString());
        assertEquals("http://localhost:8080/?test=webx3", u1.render());

        // u1.toString以后,interceptor不被执行。
        u1.toString(); // http://localhost:8080/
        URIBroker u2 = u1.fork();
View Full Code Here

        // u1.toString以后,interceptor不被执行。
        u1.toString(); // http://localhost:8080/
        URIBroker u2 = u1.fork();

        assertEquals("http://localhost:8080/", u2.toString());
        assertEquals("http://localhost:8080/?test=webx3", u2.render());
        assertEquals("http://localhost:8080/", u2.toString());
    }

    public static class MyInterceptor implements URIBrokerInterceptor {
        public void perform(URIBroker broker) {
View Full Code Here

        for (String name : service.getNames()) {
            URIBroker uri = service.getURIBroker(name);

            if ("link-request".equals(name)) {
                assertEquals("http://localhost/", uri.render());
            } else {
                assertEquals("http:///", uri.render());
                assertEquals("http://www.alibaba.com:9999/", uri.setServerName("www.alibaba.com").setServerPort(9999)
                                                                .render());
            }
View Full Code Here

            URIBroker uri = service.getURIBroker(name);

            if ("link-request".equals(name)) {
                assertEquals("http://localhost/", uri.render());
            } else {
                assertEquals("http:///", uri.render());
                assertEquals("http://www.alibaba.com:9999/", uri.setServerName("www.alibaba.com").setServerPort(9999)
                                                                .render());
            }
        }
    }
View Full Code Here

    @Test
    public void uriBean() {
        service = (URIBrokerServiceImpl) factory.getBean("uri_bean");

        URIBroker bean = service.getURIBroker("mybean");
        assertEquals("https://myserver/aa/bb/cc", bean.render());
    }

    @Test
    public void importAndOverride() {
        service = (URIBrokerServiceImpl) factory.getBean("import");
View Full Code Here

    private void redirect(PipelineContext pipelineContext, TurbineRunData rundata, String uriBroker) {
        URIBroker urlBroker = assertNotNull(uriBrokerService.getURIBroker(uriBroker),
                                            "uriBroker get from loginLink should not be null");
        urlBroker.addQueryData(redirectParmeter, getRequestUrlWithQueryString());
        rundata.setRedirectLocation(urlBroker.render());
        pipelineContext.breakPipeline(Pipeline.TOP_LABEL);
    }

    private String getRequestUrlWithQueryString() {
        StringBuffer requestUrl = request.getRequestURL();
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.