Package com.github.dreamhead.moco

Examples of com.github.dreamhead.moco.RequestMatcher


        return !matcher.match(request);
    }

    @Override
    public RequestMatcher apply(final MocoConfig config) {
        RequestMatcher appliedMatcher = matcher.apply(config);
        if (appliedMatcher == this.matcher) {
            return this;
        }

        return new NotRequestMatcher(appliedMatcher);
View Full Code Here


    }

    @Override
    @SuppressWarnings("unchecked")
    public Setting<HttpResponseSetting> apply(final MocoConfig config) {
        RequestMatcher appliedMatcher = configItem(this.matcher, config);
        if (config.isFor("uri") && this.matcher == appliedMatcher) {
            appliedMatcher = new AndRequestMatcher(of(appliedMatcher, InternalApis.context((String) config.apply(""))));
        }

        HttpSetting setting = new HttpSetting(appliedMatcher);
View Full Code Here

        return this;
    }

    @Override
    public Setting<SocketResponseSetting> apply(MocoConfig config) {
        RequestMatcher appliedMatcher = configItem(this.matcher, config);
        SocketSetting setting = new SocketSetting(appliedMatcher);
        setting.handler = configItem(this.handler, config);
        setting.eventTriggers = configItems(eventTriggers, config);
        return setting;
    }
View Full Code Here

TOP

Related Classes of com.github.dreamhead.moco.RequestMatcher

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.