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

org.ctoolkit.restapi.client.adapter.AbstractGetExecutorAdaptee Maven / Gradle / Ivy

package org.ctoolkit.restapi.client.adapter;

import org.ctoolkit.restapi.client.adaptee.GetExecutorAdaptee;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.inject.Provider;
import java.io.IOException;
import java.util.Locale;
import java.util.Map;

/**
 * The base Google client specific implementation of the {@link GetExecutorAdaptee}.
 * It provides a default implementation of the {@link #executeGet(Object, Map, Locale)} method.
 *
 * @param  the concrete type of the client instance
 * @param  the concrete type of the resource associated with this adaptee
 * @author Aurel Medvegy
 */
public abstract class AbstractGetExecutorAdaptee
        extends AbstractGoogleClientAdaptee
        implements GetExecutorAdaptee
{
    public AbstractGetExecutorAdaptee( Provider client )
    {
        super( client );
    }

    @SuppressWarnings( "unchecked" )
    @Override
    public M executeGet( @Nonnull Object request,
                         @Nullable Map parameters,
                         @Nullable Locale locale )
            throws IOException
    {
        return ( M ) execute( request, parameters );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy