public class ExoConnectionUtils extends Object
Modifier and Type | Field and Description |
---|---|
static org.apache.http.client.CookieStore |
cookiesStore |
static String |
EXO_CLOUD_WS_DOMAIN
eXo cloud workspace url
|
static String |
HTTP |
static org.apache.http.impl.client.DefaultHttpClient |
httpClient |
static String |
HTTPS |
static int |
LOGIN_FAILED |
static int |
LOGIN_INCOMPATIBLE |
static int |
LOGIN_INVALID |
static int |
LOGIN_SERVER_RESUMING |
static int |
LOGIN_SUCCESS |
static int |
LOGIN_UNAUTHORIZED |
static int |
LOGIN_WRONG |
static String |
MARKETO_URL |
static String |
ONLINE
=== Tenant status ===
|
static String |
SERVICE_BASE_URL
eXo cloud base service url
|
static int |
SIGNIN_CONNECTION_ERR |
static int |
SIGNIN_INVALID |
static int |
SIGNIN_NO_ACCOUNT |
static int |
SIGNIN_NO_TENANT_FOR_EMAIL
cloud can not find tenant for this email
|
static int |
SIGNIN_OK |
static int |
SIGNIN_SERVER_NAV
like SIGNUP_SERVER_NAV
|
static int |
SIGNIN_SERVER_ONLINE |
static int |
SIGNIN_SERVER_SUSPENDED |
static int |
SIGNUP_ACCOUNT_EXISTS
an account already exists for this email
|
static int |
SIGNUP_INVALID
internal server problem, strange response status code
|
static int |
SIGNUP_MAX_USERS
maximum number of users for the tenant has been reached
|
static int |
SIGNUP_OK |
static int |
SIGNUP_SERVER_NAV
can not connect server, probably down or wrong address
|
static int |
SIGNUP_WRONG_DOMAIN
domain for the email is invalid, such as gmail, yahoo ...
|
static int |
SOCKET_OPERATION_TIMEOUT |
static String |
STOPPED |
static int |
TENANT_OK |
static String |
USER_AGENT_KEY |
Constructor and Description |
---|
ExoConnectionUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
checkPlatformRespose(org.apache.http.HttpResponse response)
Checking the response status code
|
static boolean |
checkPLFVersion(org.apache.http.HttpResponse response,
String domain,
String username) |
static String[] |
checkRequestTenant(org.apache.http.HttpResponse response) |
static int |
checkSignUpResponse(org.apache.http.HttpResponse response,
String email) |
static int |
checkTimeout(String url) |
static String |
convertStreamToString(InputStream is) |
static ArrayList<String> |
getCookieList(org.apache.http.client.CookieStore cookieStore) |
static org.apache.http.HttpResponse |
getPlatformResponse(String username,
String password,
String strUrlRequest) |
static org.apache.http.HttpResponse |
getRequestResponse(String strUrlRequest) |
static String |
getUserAgent() |
static org.apache.http.impl.client.DefaultHttpClient |
initHttpClient() |
static boolean |
isNetworkAvailableExt(android.content.Context paramContext)
Check mobile network and wireless status
|
static void |
loggingOut()
Clean up connection data to log out
|
static org.apache.http.HttpResponse |
makeCloudSignUpRequest(String email)
Make a Sign up request to eXo cloud
|
static boolean |
requestAccountExistsForUser(String user,
String tenant)
Requesting if username exists within a cloud server
|
static org.apache.http.HttpResponse |
requestCreatingMarketo(String email)
Create marketo lead
|
static org.apache.http.HttpResponse |
requestTenantForEmail(String email)
Request tenant and username for an email
|
static int |
requestTenantStatus(String tenant)
Check status of tenant
|
static InputStream |
sendRequest(org.apache.http.HttpResponse response) |
static String |
sendRequestAndReturnString(org.apache.http.HttpResponse response) |
static InputStream |
sendRequestWithoutAuthen(org.apache.http.HttpResponse response) |
static void |
setCookieStore(org.apache.http.client.CookieStore cookieStore,
ArrayList<String> list) |
static void |
setUserAgent(HttpURLConnection connection) |
public static final int LOGIN_WRONG
public static final int LOGIN_SUCCESS
public static final int LOGIN_UNAUTHORIZED
public static final int LOGIN_INVALID
public static final int LOGIN_FAILED
public static final int LOGIN_INCOMPATIBLE
public static final int LOGIN_SERVER_RESUMING
public static final int SOCKET_OPERATION_TIMEOUT
public static final String USER_AGENT_KEY
public static org.apache.http.impl.client.DefaultHttpClient httpClient
public static org.apache.http.client.CookieStore cookiesStore
public static final int SIGNUP_OK
public static final int SIGNUP_INVALID
public static final int SIGNUP_WRONG_DOMAIN
public static final int SIGNUP_ACCOUNT_EXISTS
public static final int SIGNUP_SERVER_NAV
public static final int SIGNUP_MAX_USERS
public static final int SIGNIN_OK
public static final int SIGNIN_INVALID
public static final int SIGNIN_NO_ACCOUNT
public static final int SIGNIN_NO_TENANT_FOR_EMAIL
public static final int SIGNIN_SERVER_NAV
public static final int SIGNIN_SERVER_ONLINE
public static final int SIGNIN_SERVER_SUSPENDED
public static final int SIGNIN_CONNECTION_ERR
public static final int TENANT_OK
public static final String ONLINE
public static final String STOPPED
public static final String HTTP
public static final String HTTPS
public static final String EXO_CLOUD_WS_DOMAIN
public static final String SERVICE_BASE_URL
public static final String MARKETO_URL
public static boolean isNetworkAvailableExt(android.content.Context paramContext)
public static String convertStreamToString(InputStream is)
public static int checkTimeout(String url)
public static final String getUserAgent()
public static void setUserAgent(HttpURLConnection connection)
public static org.apache.http.impl.client.DefaultHttpClient initHttpClient()
public static org.apache.http.HttpResponse getRequestResponse(String strUrlRequest) throws IOException
IOException
public static InputStream sendRequest(org.apache.http.HttpResponse response)
public static org.apache.http.HttpResponse getPlatformResponse(String username, String password, String strUrlRequest) throws IOException
IOException
public static org.apache.http.HttpResponse makeCloudSignUpRequest(String email) throws IOException
email
- IOException
public static int checkSignUpResponse(org.apache.http.HttpResponse response, String email)
public static org.apache.http.HttpResponse requestTenantForEmail(String email) throws IOException
email
- IOException
public static String[] checkRequestTenant(org.apache.http.HttpResponse response)
public static boolean requestAccountExistsForUser(String user, String tenant)
user
- tenant
- public static int requestTenantStatus(String tenant)
tenant
- public static org.apache.http.HttpResponse requestCreatingMarketo(String email) throws IOException
IOException
public static int checkPlatformRespose(org.apache.http.HttpResponse response)
public static InputStream sendRequestWithoutAuthen(org.apache.http.HttpResponse response)
public static String sendRequestAndReturnString(org.apache.http.HttpResponse response)
public static boolean checkPLFVersion(org.apache.http.HttpResponse response, String domain, String username)
public static ArrayList<String> getCookieList(org.apache.http.client.CookieStore cookieStore)
public static void setCookieStore(org.apache.http.client.CookieStore cookieStore, ArrayList<String> list)
public static void loggingOut()
Copyright © 2003–2016 eXo Platform SAS. All rights reserved.