retrofit
Class ChangeableServer

java.lang.Object
  extended by retrofit.Server
      extended by retrofit.ChangeableServer

public class ChangeableServer
extends Server

A Server whose URL and name can be changed at runtime.


Field Summary
 
Fields inherited from class retrofit.Server
DEFAULT_NAME
 
Constructor Summary
ChangeableServer(String url)
          Create a changeable server with the provided URL and default name.
ChangeableServer(String url, String name)
          Create a changeable server with the provided URL and name.
 
Method Summary
 String getName()
          A name for differentiating between multiple API URLs.
 String getUrl()
          The base API URL.
 void update(String url)
          Update the URL returned by getUrl().
 void update(String url, String name)
          Update the URL and name returned by getUrl() and getName(), respectively.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeableServer

public ChangeableServer(String url)
Create a changeable server with the provided URL and default name.


ChangeableServer

public ChangeableServer(String url,
                        String name)
Create a changeable server with the provided URL and name.

Method Detail

update

public void update(String url)
Update the URL returned by getUrl().


update

public void update(String url,
                   String name)
Update the URL and name returned by getUrl() and getName(), respectively.


getUrl

public String getUrl()
Description copied from class: Server
The base API URL.

Overrides:
getUrl in class Server

getName

public String getName()
Description copied from class: Server
A name for differentiating between multiple API URLs.

Overrides:
getName in class Server


Copyright © 2013 Square, Inc.. All Rights Reserved.