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

com.afkl.generic.mashery.MasheryClientBuilder Maven / Gradle / Ivy

There is a newer version: 1.0.12
Show newest version
package com.afkl.generic.mashery;

import java.util.Map;

/**
 * Builder class for the Mashery Client.
 * This allows for cleaner construction of the Mashery client.
 *
 */
public class MasheryClientBuilder {

	String host;
	String protocol;
	int port;
	String apiKey;
	String apiSecret;
	Map tokenRequestParameters;

	public static MasheryClientBuilder masheryClient() {
		return new MasheryClientBuilder();
	}

	public MasheryClientBuilder withHost(String host) {
		this.host = host;
		return this;
	}

	public MasheryClientBuilder withProtocol(String protocol) {
		this.protocol = protocol;
		return this;
	}

	public MasheryClientBuilder withPort(int port) {
		this.port = port;
		return this;
	}

	public MasheryClientBuilder withApiKey(String apiKey) {
		this.apiKey = apiKey;
		return this;
	}

	public MasheryClientBuilder withApiSecret(String apiSecret) {
		this.apiSecret = apiSecret;
		return this;
	}

	public MasheryClientBuilder withTokenRequestParams(Map params) {
		this.tokenRequestParameters = params;
		return this;
	}

	public MasheryClient build() {
		return new MasheryClient(this);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy