twitter4j.conf
Class ConfigurationBase

java.lang.Object
  extended by twitter4j.conf.ConfigurationBase
All Implemented Interfaces:
java.io.Serializable, Configuration, AuthorizationConfiguration, twitter4j.internal.http.HttpClientConfiguration, twitter4j.internal.http.HttpClientWrapperConfiguration
Direct Known Subclasses:
PropertyConfiguration

 class ConfigurationBase
extends java.lang.Object
implements Configuration, java.io.Serializable

Configuration base class with default settings.

Author:
Yusuke Yamamoto - yusuke at mac.com

Field Summary
private  int asyncNumThreads
           
private  java.lang.String clientURL
           
private  java.lang.String clientVersion
           
static java.lang.String DALVIK
           
private  boolean debug
           
private  int httpConnectionTimeout
           
private  java.lang.String httpProxyHost
           
private  java.lang.String httpProxyPassword
           
private  int httpProxyPort
           
private  java.lang.String httpProxyUser
           
private  int httpReadTimeout
           
private  int httpRetryCount
           
private  int httpRetryIntervalSeconds
           
private  int httpStreamingReadTimeout
           
private  boolean IS_DALVIK
           
private  java.lang.String oAuthAccessToken
           
private  java.lang.String oAuthAccessTokenSecret
           
private  java.lang.String oAuthAccessTokenURL
           
private  java.lang.String oAuthAuthenticationURL
           
private  java.lang.String oAuthAuthorizationURL
           
private  java.lang.String oAuthConsumerKey
           
private  java.lang.String oAuthConsumerSecret
           
private  java.lang.String oAuthRequestTokenURL
           
private  java.lang.String password
           
(package private)  java.util.Map<java.lang.String,java.lang.String> requestHeaders
           
private  java.lang.String restBaseURL
           
private  java.lang.String searchBaseURL
           
private static long serialVersionUID
           
private  java.lang.String source
           
private  java.lang.String streamBaseURL
           
private  java.lang.String user
           
private  java.lang.String userAgent
           
private  boolean useSSL
           
 
Constructor Summary
protected ConfigurationBase()
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
(package private) static java.lang.String fixURL(boolean useSSL, java.lang.String url)
           
 int getAsyncNumThreads()
           
 java.lang.String getClientURL()
           
 java.lang.String getClientVersion()
           
 int getHttpConnectionTimeout()
           
 java.lang.String getHttpProxyHost()
           
 java.lang.String getHttpProxyPassword()
           
 int getHttpProxyPort()
           
 java.lang.String getHttpProxyUser()
           
 int getHttpReadTimeout()
           
 int getHttpRetryCount()
           
 int getHttpRetryIntervalSeconds()
           
 int getHttpStreamingReadTimeout()
           
 java.lang.String getOAuthAccessToken()
           
 java.lang.String getOAuthAccessTokenSecret()
           
 java.lang.String getOAuthAccessTokenURL()
           
 java.lang.String getOAuthAuthenticationURL()
           
 java.lang.String getOAuthAuthorizationURL()
           
 java.lang.String getOAuthConsumerKey()
           
 java.lang.String getOAuthConsumerSecret()
           
 java.lang.String getOAuthRequestTokenURL()
           
 java.lang.String getPassword()
           
 java.util.Map<java.lang.String,java.lang.String> getRequestHeaders()
           
 java.lang.String getRestBaseURL()
           
 java.lang.String getSearchBaseURL()
           
 java.lang.String getSource()
           
 java.lang.String getStreamBaseURL()
           
 java.lang.String getUser()
           
 java.lang.String getUserAgent()
           
private  void initRequestHeaders()
           
 boolean isDalvik()
           
 boolean isDebugEnabled()
           
protected  void setAsyncNumThreads(int asyncNumThreads)
           
protected  void setClientURL(java.lang.String clientURL)
           
protected  void setClientVersion(java.lang.String clientVersion)
           
protected  void setDebug(boolean debug)
           
protected  void setHttpConnectionTimeout(int connectionTimeout)
           
protected  void setHttpProxyHost(java.lang.String proxyHost)
           
protected  void setHttpProxyPassword(java.lang.String proxyPassword)
           
protected  void setHttpProxyPort(int proxyPort)
           
protected  void setHttpProxyUser(java.lang.String proxyUser)
           
protected  void setHttpReadTimeout(int readTimeout)
           
protected  void setHttpRetryCount(int retryCount)
           
protected  void setHttpRetryIntervalSeconds(int retryIntervalSeconds)
           
protected  void setHttpStreamingReadTimeout(int httpStreamingReadTimeout)
           
protected  void setOAuthAccessToken(java.lang.String oAuthAccessToken)
           
protected  void setOAuthAccessTokenSecret(java.lang.String oAuthAccessTokenSecret)
           
protected  void setOAuthAccessTokenURL(java.lang.String oAuthAccessTokenURL)
           
protected  void setOAuthAuthenticationURL(java.lang.String oAuthAuthenticationURL)
           
protected  void setOAuthAuthorizationURL(java.lang.String oAuthAuthorizationURL)
           
protected  void setOAuthConsumerKey(java.lang.String oAuthConsumerKey)
           
protected  void setOAuthConsumerSecret(java.lang.String oAuthConsumerSecret)
           
protected  void setOAuthRequestTokenURL(java.lang.String oAuthRequestTokenURL)
           
protected  void setPassword(java.lang.String password)
           
protected  void setRestBaseURL(java.lang.String restBaseURL)
           
protected  void setSearchBaseURL(java.lang.String searchBaseURL)
           
protected  void setSource(java.lang.String source)
           
protected  void setStreamBaseURL(java.lang.String streamBaseURL)
           
protected  void setUser(java.lang.String user)
           
protected  void setUserAgent(java.lang.String userAgent)
           
protected  void setUseSSL(boolean useSSL)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

private boolean debug

source

private java.lang.String source

userAgent

private java.lang.String userAgent

user

private java.lang.String user

password

private java.lang.String password

useSSL

private boolean useSSL

httpProxyHost

private java.lang.String httpProxyHost

httpProxyUser

private java.lang.String httpProxyUser

httpProxyPassword

private java.lang.String httpProxyPassword

httpProxyPort

private int httpProxyPort

httpConnectionTimeout

private int httpConnectionTimeout

httpReadTimeout

private int httpReadTimeout

httpStreamingReadTimeout

private int httpStreamingReadTimeout

httpRetryCount

private int httpRetryCount

httpRetryIntervalSeconds

private int httpRetryIntervalSeconds

oAuthConsumerKey

private java.lang.String oAuthConsumerKey

oAuthConsumerSecret

private java.lang.String oAuthConsumerSecret

oAuthAccessToken

private java.lang.String oAuthAccessToken

oAuthAccessTokenSecret

private java.lang.String oAuthAccessTokenSecret

oAuthRequestTokenURL

private java.lang.String oAuthRequestTokenURL

oAuthAuthorizationURL

private java.lang.String oAuthAuthorizationURL

oAuthAccessTokenURL

private java.lang.String oAuthAccessTokenURL

oAuthAuthenticationURL

private java.lang.String oAuthAuthenticationURL

restBaseURL

private java.lang.String restBaseURL

searchBaseURL

private java.lang.String searchBaseURL

streamBaseURL

private java.lang.String streamBaseURL

asyncNumThreads

private int asyncNumThreads

clientVersion

private java.lang.String clientVersion

clientURL

private java.lang.String clientURL

DALVIK

public static final java.lang.String DALVIK
See Also:
Constant Field Values

IS_DALVIK

private boolean IS_DALVIK

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

requestHeaders

java.util.Map<java.lang.String,java.lang.String> requestHeaders
Constructor Detail

ConfigurationBase

protected ConfigurationBase()
Method Detail

isDalvik

public final boolean isDalvik()
Specified by:
isDalvik in interface Configuration

isDebugEnabled

public final boolean isDebugEnabled()
Specified by:
isDebugEnabled in interface Configuration

setDebug

protected final void setDebug(boolean debug)

getUserAgent

public final java.lang.String getUserAgent()
Specified by:
getUserAgent in interface Configuration

setUserAgent

protected final void setUserAgent(java.lang.String userAgent)

getSource

public final java.lang.String getSource()
Specified by:
getSource in interface Configuration

setSource

protected final void setSource(java.lang.String source)

getUser

public final java.lang.String getUser()
Specified by:
getUser in interface Configuration
Specified by:
getUser in interface AuthorizationConfiguration

setUser

protected final void setUser(java.lang.String user)

getPassword

public final java.lang.String getPassword()
Specified by:
getPassword in interface Configuration
Specified by:
getPassword in interface AuthorizationConfiguration

setPassword

protected final void setPassword(java.lang.String password)

setUseSSL

protected final void setUseSSL(boolean useSSL)

initRequestHeaders

private void initRequestHeaders()

getRequestHeaders

public java.util.Map<java.lang.String,java.lang.String> getRequestHeaders()
Specified by:
getRequestHeaders in interface Configuration
Specified by:
getRequestHeaders in interface twitter4j.internal.http.HttpClientWrapperConfiguration
Returns:
request headers

getHttpProxyHost

public final java.lang.String getHttpProxyHost()
Specified by:
getHttpProxyHost in interface Configuration
Specified by:
getHttpProxyHost in interface twitter4j.internal.http.HttpClientConfiguration

setHttpProxyHost

protected final void setHttpProxyHost(java.lang.String proxyHost)

getHttpProxyUser

public final java.lang.String getHttpProxyUser()
Specified by:
getHttpProxyUser in interface Configuration
Specified by:
getHttpProxyUser in interface twitter4j.internal.http.HttpClientConfiguration

setHttpProxyUser

protected final void setHttpProxyUser(java.lang.String proxyUser)

getHttpProxyPassword

public final java.lang.String getHttpProxyPassword()
Specified by:
getHttpProxyPassword in interface Configuration
Specified by:
getHttpProxyPassword in interface twitter4j.internal.http.HttpClientConfiguration

setHttpProxyPassword

protected final void setHttpProxyPassword(java.lang.String proxyPassword)

getHttpProxyPort

public final int getHttpProxyPort()
Specified by:
getHttpProxyPort in interface Configuration
Specified by:
getHttpProxyPort in interface twitter4j.internal.http.HttpClientConfiguration

setHttpProxyPort

protected final void setHttpProxyPort(int proxyPort)

getHttpConnectionTimeout

public final int getHttpConnectionTimeout()
Specified by:
getHttpConnectionTimeout in interface Configuration
Specified by:
getHttpConnectionTimeout in interface twitter4j.internal.http.HttpClientConfiguration

setHttpConnectionTimeout

protected final void setHttpConnectionTimeout(int connectionTimeout)

getHttpReadTimeout

public final int getHttpReadTimeout()
Specified by:
getHttpReadTimeout in interface Configuration
Specified by:
getHttpReadTimeout in interface twitter4j.internal.http.HttpClientConfiguration

setHttpReadTimeout

protected final void setHttpReadTimeout(int readTimeout)

getHttpStreamingReadTimeout

public int getHttpStreamingReadTimeout()
Specified by:
getHttpStreamingReadTimeout in interface Configuration

setHttpStreamingReadTimeout

protected final void setHttpStreamingReadTimeout(int httpStreamingReadTimeout)

getHttpRetryCount

public final int getHttpRetryCount()
Specified by:
getHttpRetryCount in interface Configuration
Specified by:
getHttpRetryCount in interface twitter4j.internal.http.HttpClientConfiguration

setHttpRetryCount

protected final void setHttpRetryCount(int retryCount)

getHttpRetryIntervalSeconds

public final int getHttpRetryIntervalSeconds()
Specified by:
getHttpRetryIntervalSeconds in interface Configuration
Specified by:
getHttpRetryIntervalSeconds in interface twitter4j.internal.http.HttpClientConfiguration

setHttpRetryIntervalSeconds

protected final void setHttpRetryIntervalSeconds(int retryIntervalSeconds)

getOAuthConsumerKey

public final java.lang.String getOAuthConsumerKey()
Specified by:
getOAuthConsumerKey in interface Configuration
Specified by:
getOAuthConsumerKey in interface AuthorizationConfiguration

setOAuthConsumerKey

protected final void setOAuthConsumerKey(java.lang.String oAuthConsumerKey)

getOAuthConsumerSecret

public final java.lang.String getOAuthConsumerSecret()
Specified by:
getOAuthConsumerSecret in interface Configuration
Specified by:
getOAuthConsumerSecret in interface AuthorizationConfiguration

setOAuthConsumerSecret

protected final void setOAuthConsumerSecret(java.lang.String oAuthConsumerSecret)

getOAuthAccessToken

public java.lang.String getOAuthAccessToken()
Specified by:
getOAuthAccessToken in interface Configuration
Specified by:
getOAuthAccessToken in interface AuthorizationConfiguration

setOAuthAccessToken

protected final void setOAuthAccessToken(java.lang.String oAuthAccessToken)

getOAuthAccessTokenSecret

public java.lang.String getOAuthAccessTokenSecret()
Specified by:
getOAuthAccessTokenSecret in interface Configuration
Specified by:
getOAuthAccessTokenSecret in interface AuthorizationConfiguration

setOAuthAccessTokenSecret

protected final void setOAuthAccessTokenSecret(java.lang.String oAuthAccessTokenSecret)

getAsyncNumThreads

public final int getAsyncNumThreads()
Specified by:
getAsyncNumThreads in interface Configuration

setAsyncNumThreads

protected final void setAsyncNumThreads(int asyncNumThreads)

getClientVersion

public final java.lang.String getClientVersion()
Specified by:
getClientVersion in interface Configuration

setClientVersion

protected final void setClientVersion(java.lang.String clientVersion)

getClientURL

public final java.lang.String getClientURL()
Specified by:
getClientURL in interface Configuration

setClientURL

protected final void setClientURL(java.lang.String clientURL)

getRestBaseURL

public java.lang.String getRestBaseURL()
Specified by:
getRestBaseURL in interface Configuration

setRestBaseURL

protected final void setRestBaseURL(java.lang.String restBaseURL)

getSearchBaseURL

public java.lang.String getSearchBaseURL()
Specified by:
getSearchBaseURL in interface Configuration

setSearchBaseURL

protected final void setSearchBaseURL(java.lang.String searchBaseURL)

getStreamBaseURL

public java.lang.String getStreamBaseURL()
Specified by:
getStreamBaseURL in interface Configuration

setStreamBaseURL

protected final void setStreamBaseURL(java.lang.String streamBaseURL)

getOAuthRequestTokenURL

public java.lang.String getOAuthRequestTokenURL()
Specified by:
getOAuthRequestTokenURL in interface Configuration

setOAuthRequestTokenURL

protected final void setOAuthRequestTokenURL(java.lang.String oAuthRequestTokenURL)

getOAuthAuthorizationURL

public java.lang.String getOAuthAuthorizationURL()
Specified by:
getOAuthAuthorizationURL in interface Configuration

setOAuthAuthorizationURL

protected final void setOAuthAuthorizationURL(java.lang.String oAuthAuthorizationURL)

getOAuthAccessTokenURL

public java.lang.String getOAuthAccessTokenURL()
Specified by:
getOAuthAccessTokenURL in interface Configuration

setOAuthAccessTokenURL

protected final void setOAuthAccessTokenURL(java.lang.String oAuthAccessTokenURL)

getOAuthAuthenticationURL

public java.lang.String getOAuthAuthenticationURL()
Specified by:
getOAuthAuthenticationURL in interface Configuration

setOAuthAuthenticationURL

protected final void setOAuthAuthenticationURL(java.lang.String oAuthAuthenticationURL)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

fixURL

static java.lang.String fixURL(boolean useSSL,
                               java.lang.String url)