/** * Answers if this Endpoint Description refers to the same service instance * as the given Endpoint Description. * * Two Endpoint Descriptions point to the same service if they have the same * id or their framework UUIDs and remote service ids are equal. * * @param other The Endpoint Description to look at * @return True if this endpoint description points to the same service as * the other */ public boolean isSameService(EndpointDescription other) { if (this.equals(other)) { return true; } if (this.getFrameworkUUID() == null) { return false; } return (this.getServiceId() == other.getServiceId()) && this.getFrameworkUUID().equals(other.getFrameworkUUID()); }
/** * Answers if this Endpoint Description refers to the same service instance * as the given Endpoint Description. * * Two Endpoint Descriptions point to the same service if they have the same * id or their framework UUIDs and remote service ids are equal. * * @param other The Endpoint Description to look at * @return True if this endpoint description points to the same service as * the other */ public boolean isSameService(EndpointDescription other) { if (this.equals(other)) { return true; } if (this.getFrameworkUUID() == null) { return false; } return (this.getServiceId() == other.getServiceId()) && this.getFrameworkUUID().equals(other.getFrameworkUUID()); }
/** * Answers if this Endpoint Description refers to the same service instance * as the given Endpoint Description. * * Two Endpoint Descriptions point to the same service if they have the same * id or their framework UUIDs and remote service ids are equal. * * @param other The Endpoint Description to look at * @return True if this endpoint description points to the same service as * the other */ public boolean isSameService(EndpointDescription other) { if (this.equals(other)) { return true; } if (this.getFrameworkUUID() == null) { return false; } return (this.getServiceId() == other.getServiceId()) && this.getFrameworkUUID().equals(other.getFrameworkUUID()); }
/** * Answers if this Endpoint Description refers to the same service instance * as the given Endpoint Description. * * Two Endpoint Descriptions point to the same service if they have the same * id or their framework UUIDs and remote service ids are equal. * * @param other The Endpoint Description to look at * @return True if this endpoint description points to the same service as * the other */ public boolean isSameService(EndpointDescription other) { if (this.equals(other)) { return true; } if (this.getFrameworkUUID() == null) { return false; } return (this.getServiceId() == other.getServiceId()) && this.getFrameworkUUID().equals(other.getFrameworkUUID()); }
/** * Answers if this Endpoint Description refers to the same service instance * as the given Endpoint Description. * * Two Endpoint Descriptions point to the same service if they have the same * id or their framework UUIDs and remote service ids are equal. * * @param other The Endpoint Description to look at * @return True if this endpoint description points to the same service as * the other */ public boolean isSameService(EndpointDescription other) { if (this.equals(other)) { return true; } if (this.getFrameworkUUID() == null) { return false; } return (this.getServiceId() == other.getServiceId()) && this.getFrameworkUUID().equals(other.getFrameworkUUID()); }
/** * Answers if this Endpoint Description refers to the same service instance * as the given Endpoint Description. * * Two Endpoint Descriptions point to the same service if they have the same * id or their framework UUIDs and remote service ids are equal. * * @param other The Endpoint Description to look at * @return True if this endpoint description points to the same service as * the other */ public boolean isSameService(EndpointDescription other) { if (this.equals(other)) { return true; } if (this.getFrameworkUUID() == null) { return false; } return (this.getServiceId() == other.getServiceId()) && this.getFrameworkUUID().equals(other.getFrameworkUUID()); }
/** * Answers if this Endpoint Description refers to the same service instance * as the given Endpoint Description. * * Two Endpoint Descriptions point to the same service if they have the same * id or their framework UUIDs and remote service ids are equal. * * @param other The Endpoint Description to look at * @return True if this endpoint description points to the same service as * the other */ public boolean isSameService(EndpointDescription other) { if (this.equals(other)) { return true; } if (this.getFrameworkUUID() == null) { return false; } return (this.getServiceId() == other.getServiceId()) && this.getFrameworkUUID().equals( other.getFrameworkUUID()); }
/** * Answers if this Endpoint Description refers to the same service instance * as the given Endpoint Description. * * Two Endpoint Descriptions point to the same service if they have the same * id or their framework UUIDs and remote service ids are equal. * * @param other The Endpoint Description to look at * @return True if this endpoint description points to the same service as * the other */ public boolean isSameService(EndpointDescription other) { if (this.equals(other)) { return true; } if (this.getFrameworkUUID() == null) { return false; } return (this.getServiceId() == other.getServiceId()) && this.getFrameworkUUID().equals( other.getFrameworkUUID()); }
/** * Answers if this Endpoint Description refers to the same service instance * as the given Endpoint Description. * * Two Endpoint Descriptions point to the same service if they have the same * id or their framework UUIDs and remote service ids are equal. * * @param other The Endpoint Description to look at * @return True if this endpoint description points to the same service as * the other */ public boolean isSameService(EndpointDescription other) { if (this.equals(other)) { return true; } if (this.getFrameworkUUID() == null) { return false; } return (this.getServiceId() == other.getServiceId()) && this.getFrameworkUUID().equals( other.getFrameworkUUID()); }
/** * Map a Remote Service Admin Event to an EventAdmin event according to OSGi Enterprise R5 122.7.1. * * @param event the Remote Service Admin event * @return the Event Admin event */ private Event createEventAdminEvent(RemoteServiceAdminEvent event, EndpointDescription description, Throwable exception) { Map<String, Object> properties = new HashMap<String, Object>(); properties.put("bundle", getBundleContext().getBundle()); properties.put("bundle.id", getBundleContext().getBundle().getBundleId()); properties.put("bundle.symbolicname", getBundleContext().getBundle().getSymbolicName()); properties.put("bundle.version", getBundleContext().getBundle().getVersion()); properties.put("bundle.signer", new String[] {}); // TODO impl properties.put("event", event); properties.put("timestamp", System.currentTimeMillis()); putIfValueNotNull(properties, "cause", exception); if (description != null) { putIfValueNotNull(properties, "endpoint.service.id", description.getServiceId()); putIfValueNotNull(properties, "endpoint.framework.uuid", description.getFrameworkUUID()); putIfValueNotNull(properties, "endpoint.id", description.getId()); putIfValueNotNull(properties, "endpoint.imported.configs", description.getConfigurationTypes()); } return new Event(getEventTopic(event.getType()), properties); }