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

org.spincast.plugins.httpcaching.SpincastHttpCachingPluginModule Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
package org.spincast.plugins.httpcaching;

import org.spincast.core.exchange.CacheHeadersRequestContextAddon;
import org.spincast.core.exchange.RequestContext;
import org.spincast.core.guice.SpincastGuiceModuleBase;
import org.spincast.core.guice.SpincastGuiceScopes;
import org.spincast.core.websocket.WebsocketContext;

/**
 * Spincast HTTP Caching plugin module.
 */
public class SpincastHttpCachingPluginModule extends SpincastGuiceModuleBase {

    public SpincastHttpCachingPluginModule() {
        super();
    }

    public SpincastHttpCachingPluginModule(Class> requestContextImplementationClass,
                                           Class> websocketContextImplementationClass) {
        super(requestContextImplementationClass, websocketContextImplementationClass);
    }

    @Override
    protected void configure() {
        bindRequestContextAddon();
    }

    protected void bindRequestContextAddon() {

        bind(parameterizeWithRequestContext(CacheHeadersRequestContextAddon.class)).to(parameterizeWithContextInterfaces(SpincastCacheHeadersRequestContextAddon.class))
                                                                                   .in(SpincastGuiceScopes.REQUEST);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy