001    package org.apache.jcs.auxiliary.remote.behavior;
002    
003    import java.io.IOException;
004    import java.io.Serializable;
005    
006    import org.apache.jcs.auxiliary.remote.value.RemoteCacheRequest;
007    import org.apache.jcs.auxiliary.remote.value.RemoteCacheResponse;
008    
009    /**
010     * In the future, this can be used as a generic dispatcher abstraction.
011     * <p>
012     * At the time of creation, only the http remote cache uses it. The RMI remote could be converted to
013     * use it as well.
014     */
015    public interface IRemoteCacheDispatcher
016    {
017        /**
018         * All requests will go through this method. The dispatcher implementation will send the request
019         * remotely.
020         * <p>
021         * @param remoteCacheRequest
022         * @return RemoteCacheResponse
023         * @throws IOException
024         */
025        <K extends Serializable, V extends Serializable, T>
026            RemoteCacheResponse<T> dispatchRequest( RemoteCacheRequest<K, V> remoteCacheRequest )
027                throws IOException;
028    }