Package com.alibaba.citrus.service.uribroker.interceptor

Examples of com.alibaba.citrus.service.uribroker.interceptor.URIBrokerPathInterceptor


        uri = (GenericURIBroker) service.getURIBroker("linkWithPathInterceptor");

        assertEquals("http://www.mydomain.com/abc/def", uri.render());

        // 添加另一个interceptor
        uri.addInterceptor(new URIBrokerPathInterceptor() {
            public void perform(URIBroker broker) {
                broker.setServerName("www.mydomain1.com");
            }

            public String perform(URIBroker broker, String path) {
View Full Code Here


        broker.reset();
        broker.addQueryData("x", 1);
        broker.setURIType(URIType.relative);
        broker.setBaseURI("http://taobao.com/");
        broker.setServerURI("http://taobao.com/aaa/bbb/ccc");
        broker.addInterceptor(new URIBrokerPathInterceptor() {
            public void perform(URIBroker broker) {
                broker.addQueryData("y", 2);
                broker.setReference("ref2");
            }
View Full Code Here

    }

    private void processPathInterceptors(final boolean withLeadingSlash) {
        GenericURIBroker broker = new GenericURIBroker();

        i3 = new URIBrokerPathInterceptor() {
            public void perform(URIBroker broker) {
            }

            public String perform(URIBroker broker, String path) {
                if (withLeadingSlash) {
View Full Code Here

        broker.setServerURI("http://www.taobao.com/aaa/bbb/ccc.jsp");
        assertEquals("aaa/bbb/ccc.jsp?test=value", broker.toString());

        broker.setBaseURI("http://www.taobao.com");
        broker.setServerURI("http://www.taobao.com/aaa/bbb/ccc.jsp");
        broker.addInterceptor(new URIBrokerPathInterceptor() {
            public void perform(URIBroker broker) {
            }

            public String perform(URIBroker broker, String path) {
                return "aa/bb/cc";
View Full Code Here

        uri = (GenericURIBroker) service.getURIBroker("linkWithPathInterceptor");

        assertEquals("http://www.mydomain.com/abc/def", uri.render());

        // 添加另一个interceptor
        uri.addInterceptor(new URIBrokerPathInterceptor() {
            public void perform(URIBroker broker) {
                broker.setServerName("www.mydomain1.com");
            }

            public String perform(URIBroker broker, String path) {
View Full Code Here

     */
    protected String processPathInterceptors(String path) {
        if (hasInterceptors()) {
            for (Map.Entry<URIBrokerInterceptor, Integer> entry : getInterceptorStates().entrySet()) {
                if (entry.getKey() instanceof URIBrokerPathInterceptor) {
                    URIBrokerPathInterceptor interceptor = (URIBrokerPathInterceptor) entry.getKey();
                    Integer value = entry.getValue();

                    if (value != null && value.intValue() == 1) {
                        path = interceptor.perform(this, path);
                    }
                }
            }
        }

View Full Code Here

     */
    protected String processPathInterceptors(String path) {
        if (hasInterceptors()) {
            for (Map.Entry<URIBrokerInterceptor, Integer> entry : getInterceptorStates().entrySet()) {
                if (entry.getKey() instanceof URIBrokerPathInterceptor) {
                    URIBrokerPathInterceptor interceptor = (URIBrokerPathInterceptor) entry.getKey();
                    Integer value = entry.getValue();

                    if (value != null && value.intValue() == 1) {
                        path = interceptor.perform(this, path);
                    }
                }
            }
        }

View Full Code Here

     */
    protected String processPathInterceptors(String path) {
        if (hasInterceptors()) {
            for (Map.Entry<URIBrokerInterceptor, Integer> entry : getInterceptorStates().entrySet()) {
                if (entry.getKey() instanceof URIBrokerPathInterceptor) {
                    URIBrokerPathInterceptor interceptor = (URIBrokerPathInterceptor) entry.getKey();
                    Integer value = entry.getValue();

                    if (value != null && value.intValue() == 1) {
                        path = interceptor.perform(this, path);
                    }
                }
            }
        }

View Full Code Here

TOP

Related Classes of com.alibaba.citrus.service.uribroker.interceptor.URIBrokerPathInterceptor

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.