Created
September 12, 2014 13:52
-
-
Save Joisar/b6d645c14f9b329e5fa1 to your computer and use it in GitHub Desktop.
Server config pattern :
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class URLS { | |
public static final SERVER_CONFIGS.Server CURRENT_SERVER = SERVER_CONFIGS.Server.QA; | |
private static class SERVER_CONFIGS | |
{ | |
private static final String LIVE_URL = "http://services.joisar.com/svc/"; | |
private static final String QA_URL = "http://qaservices.joisar.com/svc/"; | |
private static enum Server { | |
LIVE(LIVE_URL), QA(QA_URL); | |
private String server_url; | |
private Server(String server_url) { | |
this.server_url = server_url; | |
} | |
private String getServerUrl() { | |
return this.server_url; | |
} | |
} | |
} | |
public static final String BASE_URL = CURRENT_SERVER.getServerUrl(); | |
public static final String IS_REGISTERED = BASE_URL+"IsRegistered"; | |
public static final String MOBILE_LOGIN = BASE_URL+"MobileLogin"; | |
public static final String UPLOAD_VIDEO = BASE_URL+"UploadVideo"; | |
public static final String UPDATE_UPLOAD_STATUS = BASE_URL+"UpdateUploadStatus"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment