public final class UrlShortener extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
APPLICATION_JSON |
protected static String |
KEY |
protected static org.apache.log4j.Logger |
logger |
protected static String |
LONG_URL |
protected static String |
NO_HTTP_URL_SHORTENER_AVAILABLE |
Constructor and Description |
---|
UrlShortener(String scope) |
Modifier and Type | Method and Description |
---|---|
static String |
getKey() |
static String |
getParamKeyValue() |
static String |
getShortnerServerUrl() |
String |
getUriRequest() |
boolean |
isAvailable() |
static void |
main(String[] args) |
String |
shorten(String longUrl) |
String |
toString() |
protected static final String NO_HTTP_URL_SHORTENER_AVAILABLE
protected static final String APPLICATION_JSON
protected static final String LONG_URL
protected static final String KEY
protected static org.apache.log4j.Logger logger
public boolean isAvailable()
public String shorten(String longUrl) throws Exception
longUrl
- Exception
public static String getShortnerServerUrl()
public static String getKey()
public static String getParamKeyValue()
public String getUriRequest()
public static void main(String[] args)
Copyright © 2016. All Rights Reserved.