public List < ServerRedirect > getServerMappings ( ) { ArrayList < ServerRedirect > servers = new ArrayList < ServerRedirect > ( ) ; try { JSONObject response = new JSONObject ( doGet ( BASE_SERVER , null ) ) ; JSONArray serverArray = response . getJSONArray ( "servers" ) ; for ( int i = 0 ; i < serverArray . length ( ) ; i ++ ) { JSONObject jsonServer = serverArray . getJSONObject ( i ) ; ServerRedirect server = getServerRedirectFromJSON ( jsonServer ) ; if ( server != null ) { servers . add ( server ) ; } } } catch ( Exception e ) { e . printStackTrace ( ) ; return null ; } return servers ; }
Get a list of all active server mappings defined for current profile