コード例 #1
0
 protected void readDevice(String invalidXMLFile, UpnpService upnpService) throws Exception {
   RemoteDevice device = new RemoteDevice(SampleData.createRemoteDeviceIdentity());
   upnpService
       .getConfiguration()
       .getDeviceDescriptorBinderUDA10()
       .describe(device, IO.readLines(getClass().getResourceAsStream(invalidXMLFile)));
 }
コード例 #2
0
ファイル: EnumTest.java プロジェクト: ruipires/cling
  public LocalDevice createTestDevice(Class serviceClass) throws Exception {

    LocalServiceBinder binder = new AnnotationLocalServiceBinder();
    LocalService svc = binder.read(serviceClass);
    svc.setManager(new DefaultServiceManager(svc, serviceClass));

    return new LocalDevice(
        SampleData.createLocalDeviceIdentity(),
        new DeviceType("mydomain", "CustomDevice", 1),
        new DeviceDetails("A Custom Device"),
        svc);
  }