Package net.oauth
Class ConsumerProperties
- java.lang.Object
-
- net.oauth.ConsumerProperties
-
public class ConsumerProperties extends Object
A pool of OAuthConsumers that are constructed from Properties. Each consumer has a name, which is a property of the OAuthConsumer. Other properties come from Properties whose names are prefixed with the consumer's name. For example, a consumer's credentials come from properties named [name].consumerKey and [name].consumerSecret.- Author:
- John Kristian
-
-
Constructor Summary
Constructors Constructor Description ConsumerProperties(String resourceName, ClassLoader loader)ConsumerProperties(Properties consumerProperties)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuthConsumergetConsumer(String name)Get the consumer with the given name.static PropertiesgetProperties(URL source)static URLgetResource(String name, ClassLoader loader)protected OAuthConsumernewConsumer(String name)
-
-
-
Constructor Detail
-
ConsumerProperties
public ConsumerProperties(String resourceName, ClassLoader loader) throws IOException
- Throws:
IOException
-
ConsumerProperties
public ConsumerProperties(Properties consumerProperties)
-
-
Method Detail
-
getResource
public static URL getResource(String name, ClassLoader loader) throws IOException
- Throws:
IOException
-
getProperties
public static Properties getProperties(URL source) throws IOException
- Throws:
IOException
-
getConsumer
public OAuthConsumer getConsumer(String name) throws MalformedURLException
Get the consumer with the given name.- Throws:
MalformedURLException
-
newConsumer
protected OAuthConsumer newConsumer(String name) throws MalformedURLException
- Throws:
MalformedURLException
-
-