All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.dreamhead.moco.handler.AbstractResponseHandler Maven / Gradle / Ivy

Go to download

Moco is an easy setup stub framework, mainly focusing on testing and integration.

There is a newer version: 1.5.0
Show newest version
package com.github.dreamhead.moco.handler;

import com.github.dreamhead.moco.MocoConfig;
import com.github.dreamhead.moco.ResponseHandler;

public abstract class AbstractResponseHandler implements ResponseHandler {
    public ResponseHandler doApply(final MocoConfig config) {
        return this;
    }

    @Override
    @SuppressWarnings("unchecked")
    public final ResponseHandler apply(final MocoConfig config) {
        if (config.isFor(MocoConfig.RESPONSE_ID)) {
            return (ResponseHandler) config.apply(this);
        }

        return doApply(config);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy