synchronized public URL getEventSubscriptionURL() { return getService().getDevice().normalizeURI( getService().getEventSubscriptionURI() ); }
protected void addIfNotNull(DefaultMutableTreeNode parent, String info, URI uri, Device device) { if (device instanceof RemoteDevice) { try { addIfNotNull(parent, info, uri != null ? ((RemoteDevice) device).normalizeURI(uri) : null, true); } catch (IllegalArgumentException ex) { if (ex.getCause() != null && ex.getCause() instanceof MalformedURLException) { // If it's an unsupported URL (which in Java is pretty much anything but HTTP) show the plain text addIfNotNull(parent, info, uri, false); } else { throw ex; } } } else if (device instanceof LocalDevice) { addIfNotNull(parent, info, uri, false); } }
descriptorURL = service.getDevice().normalizeURI(service.getDescriptorURI()); } catch(IllegalArgumentException e) { log.warning("Could not normalize service descriptor URL: " + service.getDescriptorURI());
new StreamRequestMessage(UpnpRequest.Method.GET, device.normalizeURI(usableIcon.getUri()));
? ((RemoteDevice) nodeIcon.getDevice()).normalizeURI(nodeIcon.getUri()).toString() : nodeIcon.getUri().toString();
controLURL = remoteService.getDevice().normalizeURI(remoteService.getControlURI()); } catch(IllegalArgumentException e) { failure(actionInvocation, null, "bad control URL: " + remoteService.getControlURI());
} else if (service instanceof RemoteService) { RemoteService rs = (RemoteService) service; addIfNotNull(serviceNode, "Descriptor URL: ", rs.getDevice().normalizeURI(rs.getDescriptorURI()), true); addIfNotNull(serviceNode, "Control URL: ", rs.getDevice().normalizeURI(rs.getControlURI()), true); addIfNotNull(serviceNode, "Event Subscription URL: ", rs.getDevice().normalizeURI(rs.getEventSubscriptionURI()), true);
synchronized public URL getEventSubscriptionURL() { return getService().getDevice().normalizeURI( getService().getEventSubscriptionURI() ); }
descriptorURL = service.getDevice().normalizeURI(service.getDescriptorURI()); } catch(IllegalArgumentException e) { log.warning("Could not normalize service descriptor URL: " + service.getDescriptorURI());
URL controLURL = remoteService.getDevice().normalizeURI(remoteService.getControlURI());
synchronized public URL getEventSubscriptionURL() { return getService().getDevice().normalizeURI( getService().getEventSubscriptionURI() ); }
descriptorURL = service.getDevice().normalizeURI(service.getDescriptorURI()); } catch(IllegalArgumentException e) { log.warning("Could not normalize service descriptor URL: " + service.getDescriptorURI());
public <T> T run(final ClingAction<T> action) { // Figure out the remote URL where we'd like to send the action request to final URL controLURL = remoteService.getDevice().normalizeURI(remoteService.getControlURI()); final ActionInvocation<RemoteService> actionInvocation = action.getActionInvocation(); final SendingAction prot = controlPoint.getProtocolFactory().createSendingAction(actionInvocation, controLURL); prot.run(); final IncomingActionResponseMessage response = prot.getOutputMessage(); if (response == null) { throw new ClingRouterException("Got null response for action " + actionInvocation); } else if (response.getOperation().isFailed()) { throw new ClingOperationFailedException("Invocation " + actionInvocation + " failed with operation '" + response.getOperation() + "', body '" + response.getBodyString() + "'", response); } return action.convert(actionInvocation); }
controLURL = remoteService.getDevice().normalizeURI(remoteService.getControlURI()); } catch(IllegalArgumentException e) { failure(actionInvocation, null, "bad control URL: " + remoteService.getControlURI());