twitter4j.conf
Class PropertyConfiguration
java.lang.Object
twitter4j.conf.ConfigurationBase
twitter4j.conf.PropertyConfiguration
- All Implemented Interfaces:
- java.io.Serializable, AuthorizationConfiguration, Configuration, twitter4j.internal.http.HttpClientConfiguration, twitter4j.internal.http.HttpClientWrapperConfiguration
public final class PropertyConfiguration
- extends ConfigurationBase
- implements java.io.Serializable
- Author:
- Yusuke Yamamoto - yusuke at mac.com
- See Also:
- Serialized Form
Method Summary |
protected boolean |
getBoolean(java.util.Properties props,
java.lang.String prefix,
java.lang.String name)
|
protected int |
getIntProperty(java.util.Properties props,
java.lang.String prefix,
java.lang.String name)
|
protected java.lang.String |
getString(java.util.Properties props,
java.lang.String prefix,
java.lang.String name)
|
private boolean |
loadProperties(java.util.Properties props,
java.io.InputStream is)
|
private boolean |
loadProperties(java.util.Properties props,
java.lang.String path)
|
private void |
normalize(java.util.Properties props)
|
private boolean |
notNull(java.util.Properties props,
java.lang.String prefix,
java.lang.String name)
|
private void |
setFieldsWithPrefix(java.util.Properties props,
java.lang.String prefix)
|
private void |
setFieldsWithTreePath(java.util.Properties props,
java.lang.String treePath)
passing "/foo/bar" as treePath will result:
1. |
Methods inherited from class twitter4j.conf.ConfigurationBase |
equals, fixURL, getAsyncNumThreads, getClientURL, getClientVersion, getDispatcherImpl, getHttpConnectionTimeout, getHttpDefaultMaxPerRoute, getHttpMaxTotalConnections, getHttpProxyHost, getHttpProxyPassword, getHttpProxyPort, getHttpProxyUser, getHttpReadTimeout, getHttpRetryCount, getHttpRetryIntervalSeconds, getHttpStreamingReadTimeout, getMediaProvider, getMediaProviderAPIKey, getMediaProviderParameters, getOAuthAccessToken, getOAuthAccessTokenSecret, getOAuthAccessTokenURL, getOAuthAuthenticationURL, getOAuthAuthorizationURL, getOAuthConsumerKey, getOAuthConsumerSecret, getOAuthRequestTokenURL, getPassword, getRequestHeaders, getRestBaseURL, getSearchBaseURL, getSiteStreamBaseURL, getStreamBaseURL, getUser, getUserAgent, getUserStreamBaseURL, hashCode, isDalvik, isDebugEnabled, isGZIPEnabled, isIncludeEntitiesEnabled, isIncludeRTsEnabled, isJSONStoreEnabled, isMBeanEnabled, isPrettyDebugEnabled, isUserStreamRepliesAllEnabled, setAsyncNumThreads, setClientURL, setClientVersion, setDebug, setDispatcherImpl, setGZIPEnabled, setHttpConnectionTimeout, setHttpDefaultMaxPerRoute, setHttpMaxTotalConnections, setHttpProxyHost, setHttpProxyPassword, setHttpProxyPort, setHttpProxyUser, setHttpReadTimeout, setHttpRetryCount, setHttpRetryIntervalSeconds, setHttpStreamingReadTimeout, setIncludeEntitiesEnbled, setIncludeRTsEnbled, setJSONStoreEnabled, setMBeanEnabled, setMediaProvider, setMediaProviderAPIKey, setMediaProviderParameters, setOAuthAccessToken, setOAuthAccessTokenSecret, setOAuthAccessTokenURL, setOAuthAuthenticationURL, setOAuthAuthorizationURL, setOAuthConsumerKey, setOAuthConsumerSecret, setOAuthRequestTokenURL, setPassword, setPrettyDebugEnabled, setRestBaseURL, setSearchBaseURL, setSiteStreamBaseURL, setStreamBaseURL, setUser, setUserAgent, setUserStreamBaseURL, setUserStreamRepliesAllEnabled, setUseSSL, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
DEBUG
public static final java.lang.String DEBUG
- See Also:
- Constant Field Values
HTTP_USER_AGENT
public static final java.lang.String HTTP_USER_AGENT
- See Also:
- Constant Field Values
USER
public static final java.lang.String USER
- See Also:
- Constant Field Values
PASSWORD
public static final java.lang.String PASSWORD
- See Also:
- Constant Field Values
HTTP_USE_SSL
public static final java.lang.String HTTP_USE_SSL
- See Also:
- Constant Field Values
HTTP_PRETTY_DEBUG
public static final java.lang.String HTTP_PRETTY_DEBUG
- See Also:
- Constant Field Values
HTTP_GZIP
public static final java.lang.String HTTP_GZIP
- See Also:
- Constant Field Values
HTTP_PROXY_HOST
public static final java.lang.String HTTP_PROXY_HOST
- See Also:
- Constant Field Values
HTTP_PROXY_HOST_FALLBACK
public static final java.lang.String HTTP_PROXY_HOST_FALLBACK
- See Also:
- Constant Field Values
HTTP_PROXY_USER
public static final java.lang.String HTTP_PROXY_USER
- See Also:
- Constant Field Values
HTTP_PROXY_PASSWORD
public static final java.lang.String HTTP_PROXY_PASSWORD
- See Also:
- Constant Field Values
HTTP_PROXY_PORT
public static final java.lang.String HTTP_PROXY_PORT
- See Also:
- Constant Field Values
HTTP_PROXY_PORT_FALLBACK
public static final java.lang.String HTTP_PROXY_PORT_FALLBACK
- See Also:
- Constant Field Values
HTTP_CONNECTION_TIMEOUT
public static final java.lang.String HTTP_CONNECTION_TIMEOUT
- See Also:
- Constant Field Values
HTTP_READ_TIMEOUT
public static final java.lang.String HTTP_READ_TIMEOUT
- See Also:
- Constant Field Values
HTTP_STREAMING_READ_TIMEOUT
public static final java.lang.String HTTP_STREAMING_READ_TIMEOUT
- See Also:
- Constant Field Values
HTTP_RETRY_COUNT
public static final java.lang.String HTTP_RETRY_COUNT
- See Also:
- Constant Field Values
HTTP_RETRY_INTERVAL_SECS
public static final java.lang.String HTTP_RETRY_INTERVAL_SECS
- See Also:
- Constant Field Values
HTTP_MAX_TOTAL_CONNECTIONS
public static final java.lang.String HTTP_MAX_TOTAL_CONNECTIONS
- See Also:
- Constant Field Values
HTTP_DEFAULT_MAX_PER_ROUTE
public static final java.lang.String HTTP_DEFAULT_MAX_PER_ROUTE
- See Also:
- Constant Field Values
OAUTH_CONSUMER_KEY
public static final java.lang.String OAUTH_CONSUMER_KEY
- See Also:
- Constant Field Values
OAUTH_CONSUMER_SECRET
public static final java.lang.String OAUTH_CONSUMER_SECRET
- See Also:
- Constant Field Values
OAUTH_ACCESS_TOKEN
public static final java.lang.String OAUTH_ACCESS_TOKEN
- See Also:
- Constant Field Values
OAUTH_ACCESS_TOKEN_SECRET
public static final java.lang.String OAUTH_ACCESS_TOKEN_SECRET
- See Also:
- Constant Field Values
OAUTH_REQUEST_TOKEN_URL
public static final java.lang.String OAUTH_REQUEST_TOKEN_URL
- See Also:
- Constant Field Values
OAUTH_AUTHORIZATION_URL
public static final java.lang.String OAUTH_AUTHORIZATION_URL
- See Also:
- Constant Field Values
OAUTH_ACCESS_TOKEN_URL
public static final java.lang.String OAUTH_ACCESS_TOKEN_URL
- See Also:
- Constant Field Values
OAUTH_AUTHENTICATION_URL
public static final java.lang.String OAUTH_AUTHENTICATION_URL
- See Also:
- Constant Field Values
REST_BASE_URL
public static final java.lang.String REST_BASE_URL
- See Also:
- Constant Field Values
SEARCH_BASE_URL
public static final java.lang.String SEARCH_BASE_URL
- See Also:
- Constant Field Values
STREAM_BASE_URL
public static final java.lang.String STREAM_BASE_URL
- See Also:
- Constant Field Values
USER_STREAM_BASE_URL
public static final java.lang.String USER_STREAM_BASE_URL
- See Also:
- Constant Field Values
SITE_STREAM_BASE_URL
public static final java.lang.String SITE_STREAM_BASE_URL
- See Also:
- Constant Field Values
ASYNC_NUM_THREADS
public static final java.lang.String ASYNC_NUM_THREADS
- See Also:
- Constant Field Values
ASYNC_DISPATCHER_IMPL
public static final java.lang.String ASYNC_DISPATCHER_IMPL
- See Also:
- Constant Field Values
INCLUDE_RTS
public static final java.lang.String INCLUDE_RTS
- See Also:
- Constant Field Values
INCLUDE_ENTITIES
public static final java.lang.String INCLUDE_ENTITIES
- See Also:
- Constant Field Values
JSON_STORE_ENABLED
public static final java.lang.String JSON_STORE_ENABLED
- See Also:
- Constant Field Values
MBEAN_ENABLED
public static final java.lang.String MBEAN_ENABLED
- See Also:
- Constant Field Values
STREAM_USER_REPLIES_ALL
public static final java.lang.String STREAM_USER_REPLIES_ALL
- See Also:
- Constant Field Values
MEDIA_PROVIDER
public static final java.lang.String MEDIA_PROVIDER
- See Also:
- Constant Field Values
MEDIA_PROVIDER_API_KEY
public static final java.lang.String MEDIA_PROVIDER_API_KEY
- See Also:
- Constant Field Values
MEDIA_PROVIDER_PARAMETERS
public static final java.lang.String MEDIA_PROVIDER_PARAMETERS
- See Also:
- Constant Field Values
CLIENT_VERSION
public static final java.lang.String CLIENT_VERSION
- See Also:
- Constant Field Values
CLIENT_URL
public static final java.lang.String CLIENT_URL
- See Also:
- Constant Field Values
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
PropertyConfiguration
public PropertyConfiguration(java.io.InputStream is)
PropertyConfiguration
public PropertyConfiguration(java.util.Properties props)
PropertyConfiguration
public PropertyConfiguration(java.util.Properties props,
java.lang.String treePath)
PropertyConfiguration
PropertyConfiguration(java.lang.String treePath)
PropertyConfiguration
PropertyConfiguration()
- Creates a root PropertyConfiguration. This constructor is equivalent to new PropertyConfiguration("/").
notNull
private boolean notNull(java.util.Properties props,
java.lang.String prefix,
java.lang.String name)
loadProperties
private boolean loadProperties(java.util.Properties props,
java.lang.String path)
loadProperties
private boolean loadProperties(java.util.Properties props,
java.io.InputStream is)
normalize
private void normalize(java.util.Properties props)
setFieldsWithTreePath
private void setFieldsWithTreePath(java.util.Properties props,
java.lang.String treePath)
- passing "/foo/bar" as treePath will result:
1. load [twitter4j.]restBaseURL
2. override the value with foo.[twitter4j.]restBaseURL
3. override the value with foo.bar.[twitter4j.]restBaseURL
- Parameters:
props
- properties to be loadedtreePath
- the path
setFieldsWithPrefix
private void setFieldsWithPrefix(java.util.Properties props,
java.lang.String prefix)
getBoolean
protected boolean getBoolean(java.util.Properties props,
java.lang.String prefix,
java.lang.String name)
getIntProperty
protected int getIntProperty(java.util.Properties props,
java.lang.String prefix,
java.lang.String name)
getString
protected java.lang.String getString(java.util.Properties props,
java.lang.String prefix,
java.lang.String name)