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

com.strandls.alchemy.rest.client.stubgenerator.ProxyImplementation.st Maven / Gradle / Ivy

Go to download

A rest client auto generator with stubs and proxy code mimicking your webservices. Can be used to build java clients for rest webservices or unit / integration tests for webservices.

The newest version!
// Template to generate delegating proxy implmentations of stubs.

ProxyImplementation(package, stubName, proxyName ) ::= <<


package ;


import javax.inject.Inject;
import javax.inject.Singleton;

import com.strandls.alchemy.rest.client.AlchemyRestClientFactory;

import lombok.Delegate;

/**
 * Proxy implementation for {@link }.
 */
@Singleton
public class  implements  {
    /**
     * The proxy implementation.
     */
    @Delegate
    private final  implementation;

    /**
     * Create the proxy instance
     */
    @Inject
    public (final AlchemyRestClientFactory clientFactory) {
        try {
            // generate real proxy implemetation.
            implementation = clientFactory.getInstance(.class);
        } catch (final Exception e) {
            throw new RuntimeException(e);
        }
    }

}

>>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy