public abstract class LastChangeParser extends SAXParser
Validates against a schema if the SAXParser.getSchemaSources() method
doesn't return null.
Note: This is broken on most devices and with most services out in the wild. In fact, you might want to use polling the service with actions, to get its status, instead of GENA. Polling can be expensive on low-power control points, however.
| Modifier and Type | Class and Description |
|---|---|
static class |
LastChangeParser.CONSTANTS |
SAXParser.Handler<I>, SAXParser.SimpleErrorHandlerXML_SCHEMA_NAMESPACE, XML_SCHEMA_RESOURCE| Constructor and Description |
|---|
LastChangeParser() |
| Modifier and Type | Method and Description |
|---|---|
protected Document |
buildDOM(Event event) |
protected EventedValue<?> |
createValue(String name,
Map.Entry<String,String>[] attributes) |
String |
generate(Event event) |
protected void |
generateEventedValue(EventedValue<?> eventedValue,
Document descriptor,
Element parentElement) |
protected void |
generateInstanceIDs(Event event,
Document descriptor,
Element rootElement) |
protected void |
generateRoot(Event event,
Document descriptor) |
protected Set<Class<? extends EventedValue<?>>> |
getEventedVariables() |
protected abstract String |
getNamespace() |
Event |
parse(String xml) |
Event |
parseResource(String resource)
Uses the current thread's context classloader to read and unmarshall the given resource.
|
create, createSchema, getErrorHandler, getSchemaSources, parse, setContentHandlerprotected abstract String getNamespace()
protected Set<Class<? extends EventedValue<?>>> getEventedVariables()
protected EventedValue<?> createValue(String name, Map.Entry<String,String>[] attributes) throws Exception
Exceptionpublic Event parseResource(String resource) throws Exception
resource - The resource on the classpath.Exceptionprotected void generateInstanceIDs(Event event, Document descriptor, Element rootElement)
protected void generateEventedValue(EventedValue<?> eventedValue, Document descriptor, Element parentElement)
Copyright © 2023 jUPnP.org. All rights reserved.