public class LibraryClient extends java.lang.Object implements LibraryService
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
endpointUrl |
protected java.util.List<java.lang.Object> |
providers |
protected T |
serviceProxy |
| Constructor and Description |
|---|
LibraryClient(java.lang.String endpointUrl) |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
create(java.lang.String baseAddress,
java.lang.Class<T> cls,
java.util.List<?> providers,
java.lang.String configLocation)
Creates a proxy
|
protected HTTPClientPolicy |
getHTTPClientPolicy() |
T |
getWebClient() |
MediaContainer |
recentlyAdded() |
MediaContainer |
root() |
MediaContainer |
sections() |
void |
setConnectionTimeout(int timeout) |
void |
setReceiveTimeout(int timeout) |
protected void |
setupAdditionalProviders()
Override this if you would like to add additional providers (like exception mappers)
jackson is added by default already.
|
MediaContainer |
tvSeasons(int key) |
MediaContainer |
tvShows(int key) |
MediaContainer |
videosAll(int key) |
protected java.util.List<java.lang.Object> providers
protected java.lang.String endpointUrl
protected T serviceProxy
@Path(value="/") public MediaContainer root()
root in interface LibraryServicepublic MediaContainer sections()
sections in interface LibraryServicepublic MediaContainer videosAll(int key)
videosAll in interface LibraryServicepublic MediaContainer recentlyAdded()
recentlyAdded in interface LibraryService@Path(value="/metadata/{key}/children")
public MediaContainer tvSeasons(int key)
tvSeasons in interface LibraryService@Path(value="/metadata/{key}/children")
public MediaContainer tvShows(int key)
tvShows in interface LibraryServiceprotected void setupAdditionalProviders()
public T getWebClient()
public void setReceiveTimeout(int timeout)
public void setConnectionTimeout(int timeout)
protected HTTPClientPolicy getHTTPClientPolicy()
public static <T> T create(java.lang.String baseAddress,
java.lang.Class<T> cls,
java.util.List<?> providers,
java.lang.String configLocation)
baseAddress - baseAddresscls - proxy class, if not interface then a CGLIB proxy will be createdproviders - list of providersconfigLocation - classpath location of the configuration resource