twitter4j
Class TwitterBase

java.lang.Object
  extended by twitter4j.TwitterBase
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
TwitterOAuthSupportBase, TwitterStream

abstract class TwitterBase
extends java.lang.Object
implements java.io.Serializable

Base class of Twitter / AsyncTwitter / TwitterStream supports Basic Authorization.

Author:
Yusuke Yamamoto - yusuke at mac.com

Field Summary
protected  Authorization auth
           
protected  Configuration conf
           
private static long serialVersionUID
           
 
Constructor Summary
TwitterBase(Configuration conf)
           
TwitterBase(Configuration conf, Authorization auth)
           
TwitterBase(Configuration conf, java.lang.String userId, java.lang.String password)
           
 
Method Summary
protected  void ensureAuthorizationEnabled()
           
protected  void ensureBasicEnabled()
           
 boolean equals(java.lang.Object o)
           
 Authorization getAuthorization()
          Returns the authorization scheme for this instance.
The returned type will be either of BasicAuthorization, OAuthAuthorization, or NullAuthorization
 int hashCode()
           
private  void initBasicAuthorization(java.lang.String screenName, java.lang.String password)
           
 boolean isBasicAuthEnabled()
          tests if the instance is authenticated by Basic
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

conf

protected final Configuration conf

auth

protected Authorization auth

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

TwitterBase

TwitterBase(Configuration conf)

TwitterBase

TwitterBase(Configuration conf,
            java.lang.String userId,
            java.lang.String password)

TwitterBase

TwitterBase(Configuration conf,
            Authorization auth)
Method Detail

initBasicAuthorization

private void initBasicAuthorization(java.lang.String screenName,
                                    java.lang.String password)

isBasicAuthEnabled

public final boolean isBasicAuthEnabled()
tests if the instance is authenticated by Basic

Returns:
returns true if the instance is authenticated by Basic

ensureAuthorizationEnabled

protected final void ensureAuthorizationEnabled()

ensureBasicEnabled

protected final void ensureBasicEnabled()

getAuthorization

public final Authorization getAuthorization()
Returns the authorization scheme for this instance.
The returned type will be either of BasicAuthorization, OAuthAuthorization, or NullAuthorization

Returns:
the authorization scheme for this instance

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

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