GmailClient

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.email.IBaseGmailClient

public abstract class GmailClient implements IBaseGmailClient

Base class for Gmail client

Methods

MethodDescription
close()
dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
equals(Object arg0)
getAccessToken()Gets or sets OAuth 2.0 access token In case if refresh token is set, access token is generated automatically.
getClass()
getDefaultEmail()Gets or sets default email address
getDefaultTimeout()Gets or sets the default timeout value for ActiveSync client instances The default value is 100,000 milliseconds (100 seconds).
getInstance(String accessToken, System.Net.IWebProxy proxy, String defaultEmail)Gets instance of Gmail client
getInstance(String accessToken, String defaultEmail)Gets instance of Gmail client
getInstance(String clientId, String clientSecret, String refreshToken, System.Net.IWebProxy proxy, String defaultEmail)Gets instance of Gmail client
getInstance(String clientId, String clientSecret, String refreshToken, String defaultEmail)Gets instance of Gmail client
getProxy()Gets or sets the proxy.
getTimeout()Gets or sets the number of milliseconds to wait before the operation times out.
hashCode()
notify()
notifyAll()
refreshToken()Refresh access token
setAccessToken(String value)Gets or sets OAuth 2.0 access token In case if refresh token is set, access token is generated automatically.
setDefaultTimeout(int value)Gets or sets the default timeout value for ActiveSync client instances The default value is 100,000 milliseconds (100 seconds).
setProxy(System.Net.IWebProxy value)Gets or sets the proxy.
setTimeout(int value)Gets or sets the number of milliseconds to wait before the operation times out.
toString()
useJDKHTTP(boolean value)Sets value indicating whether JDK HTTP is used.
wait()
wait(long arg0)
wait(long arg0, int arg1)

close()

public void close()

dispose()

public void dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getAccessToken()

public String getAccessToken()

Gets or sets OAuth 2.0 access token In case if refresh token is set, access token is generated automatically.

Returns: java.lang.String

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getDefaultEmail()

public String getDefaultEmail()

Gets or sets default email address

Returns: java.lang.String

getDefaultTimeout()

public static int getDefaultTimeout()

Gets or sets the default timeout value for ActiveSync client instances The default value is 100,000 milliseconds (100 seconds).

Returns: int

getInstance(String accessToken, System.Net.IWebProxy proxy, String defaultEmail)

public static IGmailClient getInstance(String accessToken, System.Net.IWebProxy proxy, String defaultEmail)

Gets instance of Gmail client

Parameters:

ParameterTypeDescription
accessTokenjava.lang.StringOAuth 2.0 access token
proxycom.aspose.ms.System.Net.IWebProxyIWebProxy for Gmail client
defaultEmailjava.lang.StringDefault email address

Returns: IGmailClient - Returns instance of Gmail client

getInstance(String accessToken, String defaultEmail)

public static IGmailClient getInstance(String accessToken, String defaultEmail)

Gets instance of Gmail client

Parameters:

ParameterTypeDescription
accessTokenjava.lang.StringOAuth 2.0 access token
defaultEmailjava.lang.StringDefault email address

Returns: IGmailClient - Returns instance of Gmail client

getInstance(String clientId, String clientSecret, String refreshToken, System.Net.IWebProxy proxy, String defaultEmail)

public static IGmailClient getInstance(String clientId, String clientSecret, String refreshToken, System.Net.IWebProxy proxy, String defaultEmail)

Gets instance of Gmail client

Parameters:

ParameterTypeDescription
clientIdjava.lang.StringThe client ID obtained from the Google Cloud Console during application registration.
clientSecretjava.lang.StringThe client secret obtained during application registration.
refreshTokenjava.lang.StringOAuth 2.0 refresh token
proxycom.aspose.ms.System.Net.IWebProxyIWebProxy for Gmail client
defaultEmailjava.lang.StringDefault email address

Returns: IGmailClient - Returns instance of Gmail client

getInstance(String clientId, String clientSecret, String refreshToken, String defaultEmail)

public static IGmailClient getInstance(String clientId, String clientSecret, String refreshToken, String defaultEmail)

Gets instance of Gmail client

Parameters:

ParameterTypeDescription
clientIdjava.lang.StringThe client ID obtained from the Google Cloud Console during application registration.
clientSecretjava.lang.StringThe client secret obtained during application registration.
refreshTokenjava.lang.StringOAuth 2.0 refresh token
defaultEmailjava.lang.StringDefault email address

Returns: IGmailClient - Returns instance of Gmail client

getProxy()

public System.Net.IWebProxy getProxy()

Gets or sets the proxy.

Returns: com.aspose.ms.System.Net.IWebProxy

getTimeout()

public int getTimeout()

Gets or sets the number of milliseconds to wait before the operation times out. The default value is 100,000 milliseconds (100 seconds).

Returns: int

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

refreshToken()

public void refreshToken()

Refresh access token

setAccessToken(String value)

public void setAccessToken(String value)

Gets or sets OAuth 2.0 access token In case if refresh token is set, access token is generated automatically.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setDefaultTimeout(int value)

public static void setDefaultTimeout(int value)

Gets or sets the default timeout value for ActiveSync client instances The default value is 100,000 milliseconds (100 seconds).

Parameters:

ParameterTypeDescription
valueint

setProxy(System.Net.IWebProxy value)

public void setProxy(System.Net.IWebProxy value)

Gets or sets the proxy.

Parameters:

ParameterTypeDescription
valuecom.aspose.ms.System.Net.IWebProxy

setTimeout(int value)

public void setTimeout(int value)

Gets or sets the number of milliseconds to wait before the operation times out. The default value is 100,000 milliseconds (100 seconds).

Parameters:

ParameterTypeDescription
valueint

toString()

public String toString()

Returns: java.lang.String

useJDKHTTP(boolean value)

public static void useJDKHTTP(boolean value)

Sets value indicating whether JDK HTTP is used.

Parameters:

ParameterTypeDescription
valuebooleanTrue if JDK HTTP should be used.

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int