GmailClient
Inheritance: java.lang.Object
All Implemented Interfaces: com.aspose.email.IBaseGmailClient
public abstract class GmailClient implements IBaseGmailClient
Base class for Gmail client
Methods
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
arg0 | java.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:
Parameter | Type | Description |
---|---|---|
accessToken | java.lang.String | OAuth 2.0 access token |
proxy | com.aspose.ms.System.Net.IWebProxy | IWebProxy for Gmail client |
defaultEmail | java.lang.String | Default 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:
Parameter | Type | Description |
---|---|---|
accessToken | java.lang.String | OAuth 2.0 access token |
defaultEmail | java.lang.String | Default 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:
Parameter | Type | Description |
---|---|---|
clientId | java.lang.String | The client ID obtained from the Google Cloud Console during application registration. |
clientSecret | java.lang.String | The client secret obtained during application registration. |
refreshToken | java.lang.String | OAuth 2.0 refresh token |
proxy | com.aspose.ms.System.Net.IWebProxy | IWebProxy for Gmail client |
defaultEmail | java.lang.String | Default 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:
Parameter | Type | Description |
---|---|---|
clientId | java.lang.String | The client ID obtained from the Google Cloud Console during application registration. |
clientSecret | java.lang.String | The client secret obtained during application registration. |
refreshToken | java.lang.String | OAuth 2.0 refresh token |
defaultEmail | java.lang.String | Default 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:
Parameter | Type | Description |
---|---|---|
value | java.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:
Parameter | Type | Description |
---|---|---|
value | int |
setProxy(System.Net.IWebProxy value)
public void setProxy(System.Net.IWebProxy value)
Gets or sets the proxy.
Parameters:
Parameter | Type | Description |
---|---|---|
value | com.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:
Parameter | Type | Description |
---|---|---|
value | int |
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:
Parameter | Type | Description |
---|---|---|
value | boolean | True if JDK HTTP should be used. |
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |