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

com.peterphi.std.guice.restclient.RestClientFactory Maven / Gradle / Ivy

package com.peterphi.std.guice.restclient;

import com.google.inject.ImplementedBy;
import com.peterphi.std.guice.restclient.resteasy.impl.ResteasyClientFactoryImpl;

/**
 * A factory that builds dynamic proxy clients (using JAX-RS RESTful client interfaces) for services, abstracting away the method
 * through which client endpoints, credentials, etc. are acquired
 */
@ImplementedBy(ResteasyClientFactoryImpl.class)
public interface RestClientFactory
{
	/**
	 * Create or retrieve a client for the service interface provided
* This method only works where a single service for this interface has been configured. For more complex situations, use * getClient(iface, name) * * @param iface * * @return */ public T getClient(final Class iface); /** * Create or retrieve a client for the service interface, with the underlying REST service identified by name * * @param iface * @param name * the service name * * @return */ public T getClient(final Class iface, String name); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy