Search in sources :

Example 1 with ContentResource

use of com.github.dreamhead.moco.resource.ContentResource in project moco by dreamhead.

the class ContentHandler method apply.

@Override
public ResponseHandler apply(final MocoConfig config) {
    ResponseHandler handler = super.apply(config);
    if (handler != this) {
        return handler;
    }
    Resource appliedReosurce = this.resource.apply(config);
    if (appliedReosurce != this.resource) {
        return new ContentHandler((ContentResource) appliedReosurce);
    }
    return this;
}
Also used : ResponseHandler(com.github.dreamhead.moco.ResponseHandler) Resource(com.github.dreamhead.moco.resource.Resource) ContentResource(com.github.dreamhead.moco.resource.ContentResource)

Aggregations

ResponseHandler (com.github.dreamhead.moco.ResponseHandler)1 ContentResource (com.github.dreamhead.moco.resource.ContentResource)1 Resource (com.github.dreamhead.moco.resource.Resource)1