public class SDClient extends ProtocolClient<SDProtocol>
SDProtocol client.| Modifier and Type | Class and Description |
|---|---|
static class |
SDClient.PostSchedulesMap
getSchedules(Collection) and
getSchedulesMD5(Collection) parameter: Use LinkedHashMap.values()
as argument. |
charset, jaxb, mapper| Modifier | Constructor and Description |
|---|---|
|
SDClient()
No-argument constructor.
|
|
SDClient(Path parent)
Constructor to specify local parent directory.
|
protected |
SDClient(Path parent,
HttpClientBuilder builder)
Protected constructor.
|
client, context, getCharset, getJAXBContext, getMarshaller, getObjectMapper, getUnmarshaller, handler, protocol, proxypublic SDClient()
public SDClient(Path parent)
parent - The local parent Path.protected SDClient(Path parent, HttpClientBuilder builder)
parent - The local parent Path.builder - A configured HttpClientBuilder.public void initialize(String username, String password) throws Exception
username - The user's name.password - The user's password.Exception - If the hierarchy cannot be initialized.public String getToken() throws Exception
SDProtocol.postToken(File).String if successful; null
otherwise.Exception - If an exception is encountered invoking
SDProtocol.postToken(File).public SDProtocol.GetStatusResponse getStatus() throws Exception
SDProtocol.getStatus(String).SDProtocol.GetStatusResponse.Exception - If an exception is encountered invoking
SDProtocol.getStatus(String).public SDProtocol.GetVersionResponse getVersion() throws Exception
SDProtocol.getVersion(String).SDProtocol.GetVersionResponse.Exception - If an exception is encountered invoking
SDProtocol.getVersion(String).public List<Headend> getHeadends(String country, String postalcode) throws Exception
SDProtocol.getHeadends(String,String,String).country - The country.postalcode - The postal (ZIP) code.Headends.Exception - If an exception is encountered invoking
SDProtocol.getHeadends(String,String,String).public JsonNode putLineup(String lineup) throws Exception
SDProtocol.putLineup(String,String).lineup - The line-up to add.JsonNode.Exception - If an exception is encountered invoking
SDProtocol.putLineup(String,String).public SDProtocol.GetLineupsResponse getLineups() throws Exception
SDProtocol.getLineups(String).SDProtocol.GetLineupsResponse.Exception - If an exception is encountered invoking
SDProtocol.getLineups(String).public JsonNode deleteLineup(String lineup) throws Exception
SDProtocol.deleteLineup(String,String).lineup - The line-up to delete.JsonNode.Exception - If an exception is encountered invoking
SDProtocol.deleteLineup(String,String).public Lineup getLineup(String lineup) throws Exception
SDProtocol.getLineup(String,Boolean,String).lineup - The line-up to get.Lineup.Exception - If an exception is encountered invoking
SDProtocol.getLineup(String,Boolean,String).public JsonNode postLineup(HttpEntity entity) throws Exception
SDProtocol.postLineup(String,HttpEntity) to attempt to
auto-map a discovered HDHR Prime line-up.entity - The JSON entity retrieved from the HDHR
Prime.JsonNode.Exception - If an exception is encountered invoking
SDProtocol.postLineup(String,HttpEntity).HDHRPrimeClient.getLineup()public JsonNode postLineup(String lineup, HttpEntity entity) throws Exception
SDProtocol.postLineup(String,String,HttpEntity) to attempt to
post a discovered HDHR Prime line-up to the server.lineup - The name of the line-up.entity - The JSON entity retrieved from the HDHR
Prime.JsonNode.Exception - If an exception is encountered invoking
SDProtocol.postLineup(String,String,HttpEntity).HDHRPrimeClient.getLineup()public List<Program> getPrograms(Collection<String> ids) throws Exception
SDProtocol.postPrograms(String,Collection).ids - The Collection of program IDs,List of Programs.Exception - If an exception is encountered invoking
SDProtocol.postPrograms(String,Collection).public JsonNode getProgramsDescription(Collection<String> ids) throws Exception
SDProtocol.postProgramsDescription(String,Collection).ids - The Collection of program IDs,JsonNode.Exception - If an exception is encountered invoking
SDProtocol.postProgramsDescription(String,Collection).public JsonNode getProgramsMetadata(Collection<String> ids) throws Exception
SDProtocol.postProgramsMetadata(String,Collection).ids - The Collection of program IDs,JsonNode.Exception - If an exception is encountered invoking
SDProtocol.postProgramsMetadata(String,Collection).public JsonNode getProgramMetadata(String id) throws Exception
SDProtocol.getProgramMetadata(String).id - The root ID,JsonNode.Exception - If an exception is encountered invoking
SDProtocol.getProgramMetadata(String).public List<SDProtocol.Schedules> getSchedules(Collection<?> ids) throws Exception
SDProtocol.postSchedules(String,Collection).ids - The Collection of station IDs,List of SDProtocol.Schedules.Exception - If an exception is encountered invoking
SDProtocol.postSchedules(String,Collection).public JsonNode getSchedulesMD5(Collection<?> ids) throws Exception
SDProtocol.postSchedulesMD5(String,Collection).ids - The Collection of station IDs,JsonNode.Exception - If an exception is encountered invoking
SDProtocol.postSchedulesMD5(String,Collection).public JsonNode getCelebrityMetadata(String id) throws Exception
SDProtocol.getCelebrityMetadata(String).id - The root ID,JsonNode.Exception - If an exception is encountered invoking
SDProtocol.getCelebrityMetadata(String).public HttpEntity getImage(String string) throws Exception
SDProtocol.getImage(URI) or
SDProtocol.getImage(String) (as appropriate).string - The image URI
(as String).HttpEntity.Exception - If an exception is encountered invoking
SDProtocol.getImage(URI) or
SDProtocol.getImage(String).public void process(HttpRequest request, HttpContext context) throws IOException
process in interface HttpRequestInterceptorprocess in class ProtocolClient<SDProtocol>IOExceptionpublic void process(HttpResponse response, HttpContext context) throws IOException
process in interface HttpResponseInterceptorprocess in class ProtocolClient<SDProtocol>IOExceptionCopyright © 2015–2020 Allen D. Ball. All rights reserved.