@UpnpService( serviceId = @UpnpServiceId("SwitchPower"), serviceType = @UpnpServiceType(value = "SwitchPower", version = 1)
public LocalService read(Class<?> clazz) throws LocalServiceBindingException { log.fine("Reading and binding annotations of service implementation class: " + clazz); // Read the service ID and service type from the annotation if (clazz.isAnnotationPresent(UpnpService.class)) { UpnpService annotation = clazz.getAnnotation(UpnpService.class); UpnpServiceId idAnnotation = annotation.serviceId(); UpnpServiceType typeAnnotation = annotation.serviceType(); ServiceId serviceId = idAnnotation.namespace().equals(UDAServiceId.DEFAULT_NAMESPACE) ? new UDAServiceId(idAnnotation.value()) : new ServiceId(idAnnotation.namespace(), idAnnotation.value()); ServiceType serviceType = typeAnnotation.namespace().equals(UDAServiceType.DEFAULT_NAMESPACE) ? new UDAServiceType(typeAnnotation.value(), typeAnnotation.version()) : new ServiceType(typeAnnotation.namespace(), typeAnnotation.value(), typeAnnotation.version()); boolean supportsQueryStateVariables = annotation.supportsQueryStateVariables(); Set<Class> stringConvertibleTypes = readStringConvertibleTypes(annotation.stringConvertibleTypes()); return read(clazz, serviceId, serviceType, supportsQueryStateVariables, stringConvertibleTypes); } else { throw new LocalServiceBindingException("Given class is not an @UpnpService"); } }
value = "X_MS_MediaReceiverRegistrar" ), serviceType = @UpnpServiceType( namespace = "microsoft.com", value = "X_MS_MediaReceiverRegistrar",
public LocalService read(Class<?> clazz) throws LocalServiceBindingException { log.fine("Reading and binding annotations of service implementation class: " + clazz); // Read the service ID and service type from the annotation if (clazz.isAnnotationPresent(UpnpService.class)) { UpnpService annotation = clazz.getAnnotation(UpnpService.class); UpnpServiceId idAnnotation = annotation.serviceId(); UpnpServiceType typeAnnotation = annotation.serviceType(); ServiceId serviceId = idAnnotation.namespace().equals(UDAServiceId.DEFAULT_NAMESPACE) ? new UDAServiceId(idAnnotation.value()) : new ServiceId(idAnnotation.namespace(), idAnnotation.value()); ServiceType serviceType = typeAnnotation.namespace().equals(UDAServiceType.DEFAULT_NAMESPACE) ? new UDAServiceType(typeAnnotation.value(), typeAnnotation.version()) : new ServiceType(typeAnnotation.namespace(), typeAnnotation.value(), typeAnnotation.version()); boolean supportsQueryStateVariables = annotation.supportsQueryStateVariables(); Set<Class> stringConvertibleTypes = readStringConvertibleTypes(annotation.stringConvertibleTypes()); return read(clazz, serviceId, serviceType, supportsQueryStateVariables, stringConvertibleTypes); } else { throw new LocalServiceBindingException("Given class is not an @UpnpService"); } }
serviceType = @UpnpServiceType(value = "ContentDirectory", version = 1)
public LocalService read(Class<?> clazz) throws LocalServiceBindingException { log.fine("Reading and binding annotations of service implementation class: " + clazz); // Read the service ID and service type from the annotation if (clazz.isAnnotationPresent(UpnpService.class)) { UpnpService annotation = clazz.getAnnotation(UpnpService.class); UpnpServiceId idAnnotation = annotation.serviceId(); UpnpServiceType typeAnnotation = annotation.serviceType(); ServiceId serviceId = idAnnotation.namespace().equals(UDAServiceId.DEFAULT_NAMESPACE) ? new UDAServiceId(idAnnotation.value()) : new ServiceId(idAnnotation.namespace(), idAnnotation.value()); ServiceType serviceType = typeAnnotation.namespace().equals(UDAServiceType.DEFAULT_NAMESPACE) ? new UDAServiceType(typeAnnotation.value(), typeAnnotation.version()) : new ServiceType(typeAnnotation.namespace(), typeAnnotation.value(), typeAnnotation.version()); boolean supportsQueryStateVariables = annotation.supportsQueryStateVariables(); Set<Class> stringConvertibleTypes = readStringConvertibleTypes(annotation.stringConvertibleTypes()); return read(clazz, serviceId, serviceType, supportsQueryStateVariables, stringConvertibleTypes); } else { throw new LocalServiceBindingException("Given class is not an @UpnpService"); } }
serviceType = @UpnpServiceType(value = "RenderingControl", version = 1), stringConvertibleTypes = LastChange.class
serviceType = @UpnpServiceType(value = "ConnectionManager", version = 1), stringConvertibleTypes = {ProtocolInfo.class, ProtocolInfos.class, ServiceReference.class}
serviceType = @UpnpServiceType(value = "AVTransport", version = 1), stringConvertibleTypes = LastChange.class
serviceType = @UpnpServiceType(value = "ContentDirectory", version = 1)
value = "X_MS_MediaReceiverRegistrar" ), serviceType = @UpnpServiceType( namespace = "microsoft.com", value = "X_MS_MediaReceiverRegistrar",
serviceType = @UpnpServiceType(value = "ConnectionManager", version = 1), stringConvertibleTypes = {ProtocolInfo.class, ProtocolInfos.class, ServiceReference.class}
serviceType = @UpnpServiceType(value = "RenderingControl", version = 1), stringConvertibleTypes = LastChange.class
serviceType = @UpnpServiceType(value = "AVTransport", version = 1), stringConvertibleTypes = LastChange.class
serviceType = @UpnpServiceType(value = "UPnPServerMock", version = 1)
value = "X_MS_MediaReceiverRegistrar" ), serviceType = @UpnpServiceType( namespace = "microsoft.com", value = "X_MS_MediaReceiverRegistrar",
serviceType = @UpnpServiceType(value = "ContentDirectory", version = 1)
serviceType = @UpnpServiceType(value = "RenderingControl", version = 1), stringConvertibleTypes = LastChange.class
serviceType = @UpnpServiceType(value = "ConnectionManager", version = 1), stringConvertibleTypes = {ProtocolInfo.class, ProtocolInfos.class, ServiceReference.class}
serviceType = @UpnpServiceType(value = "AVTransport", version = 1), stringConvertibleTypes = LastChange.class