org.littleshoot.commom.xmpp
Class GoogleOAuth2Credentials

java.lang.Object
  extended by org.littleshoot.commom.xmpp.GoogleOAuth2Credentials
All Implemented Interfaces:
CallbackHandler, XmppCredentials

public class GoogleOAuth2Credentials
extends Object
implements XmppCredentials, CallbackHandler


Constructor Summary
GoogleOAuth2Credentials(String username, String clientID, String clientSecret, String accessToken, String refreshToken)
           
GoogleOAuth2Credentials(String username, String clientID, String clientSecret, String accessToken, String refreshToken, String resource)
           
 
Method Summary
 org.jivesoftware.smack.XMPPConnection createConnection(org.jivesoftware.smack.ConnectionConfiguration config)
           
 String getKey()
           
 String getUsername()
           
 void handle(Callback[] callbacks)
           
 void login(org.jivesoftware.smack.XMPPConnection conn)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GoogleOAuth2Credentials

public GoogleOAuth2Credentials(String username,
                               String clientID,
                               String clientSecret,
                               String accessToken,
                               String refreshToken)

GoogleOAuth2Credentials

public GoogleOAuth2Credentials(String username,
                               String clientID,
                               String clientSecret,
                               String accessToken,
                               String refreshToken,
                               String resource)
Method Detail

getUsername

public String getUsername()
Specified by:
getUsername in interface XmppCredentials

getKey

public String getKey()
Specified by:
getKey in interface XmppCredentials

createConnection

public org.jivesoftware.smack.XMPPConnection createConnection(org.jivesoftware.smack.ConnectionConfiguration config)
Specified by:
createConnection in interface XmppCredentials

login

public void login(org.jivesoftware.smack.XMPPConnection conn)
           throws org.jivesoftware.smack.XMPPException
Specified by:
login in interface XmppCredentials
Throws:
org.jivesoftware.smack.XMPPException

handle

public void handle(Callback[] callbacks)
            throws IOException,
                   UnsupportedCallbackException
Specified by:
handle in interface CallbackHandler
Throws:
IOException
UnsupportedCallbackException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014 LittleShoot. All Rights Reserved.