throw new IllegalArgumentException(ENDPOINT_ID + " property must be set"); if (getConfigurationTypes().isEmpty()) { throw new IllegalArgumentException(SERVICE_IMPORTED_CONFIGS + " property must be set and non-empty");
throw new IllegalArgumentException(ENDPOINT_ID + " property must be set"); if (getConfigurationTypes().isEmpty()) { throw new IllegalArgumentException(SERVICE_IMPORTED_CONFIGS + " property must be set and non-empty");
throw new IllegalArgumentException(ENDPOINT_ID + " property must be set"); if (getConfigurationTypes().isEmpty()) { throw new IllegalArgumentException(SERVICE_IMPORTED_CONFIGS + " property must be set and non-empty");
if (getConfigurationTypes().isEmpty()) { throw new IllegalArgumentException(SERVICE_IMPORTED_CONFIGS + " property must be set and non-empty");
+ " property must be set"); if (getConfigurationTypes().isEmpty()) { throw new IllegalArgumentException(SERVICE_IMPORTED_CONFIGS + " property must be set and non-empty");
throw new IllegalArgumentException(ENDPOINT_ID + " property must be set"); if (getConfigurationTypes().isEmpty()) { throw new IllegalArgumentException(SERVICE_IMPORTED_CONFIGS + " property must be set and non-empty");
if (getConfigurationTypes().isEmpty()) { throw new IllegalArgumentException(SERVICE_IMPORTED_CONFIGS + " property must be set and non-empty");
throw new IllegalArgumentException(ENDPOINT_ID + " property must be set"); if (getConfigurationTypes().isEmpty()) { throw new IllegalArgumentException(SERVICE_IMPORTED_CONFIGS + " property must be set and non-empty");
+ " property must be set"); if (getConfigurationTypes().isEmpty()) { throw new IllegalArgumentException(SERVICE_IMPORTED_CONFIGS + " property must be set and non-empty");
+ " property must be set"); if (getConfigurationTypes().isEmpty()) { throw new IllegalArgumentException(SERVICE_IMPORTED_CONFIGS + " property must be set and non-empty");
+ " property must be set"); if (getConfigurationTypes().isEmpty()) { throw new IllegalArgumentException(SERVICE_IMPORTED_CONFIGS + " property must be set and non-empty");
@Override public boolean update(EndpointDescription endpoint) { if (m_closed.get()) { throw new IllegalStateException("Updating closed Import Registration not supported"); } if (m_exception != null) { throw new IllegalStateException("Updating invalid Import Registration not allowed"); } if (!endpoint.equals(m_endpoint)) { throw new IllegalArgumentException( "Updating Import Registation with different service instance not allowed"); } List<String> configurationTypes = endpoint.getConfigurationTypes(); if (!configurationTypes.contains(CONFIGURATION_TYPE)) { // TODO setexception return false; } String updateHash = computeHash(endpoint); if (!updateHash.equals(m_endpointHash)) { m_endpoint = endpoint; m_endpointHash = updateHash; Dictionary<String, Object> serviceProperties = createImportedServiceProperties(m_endpoint); m_clientRegistration.setProperties(serviceProperties); m_admin.importedEndpointUpdated(this); } return true; }
if (getConfigurationTypes().isEmpty()) { throw new IllegalArgumentException(SERVICE_IMPORTED_CONFIGS + " property must be set and non-empty");
throw new IllegalArgumentException(ENDPOINT_ID + " property must be set"); if (getConfigurationTypes().isEmpty()) { throw new IllegalArgumentException(SERVICE_IMPORTED_CONFIGS + " property must be set and non-empty");
throw new IllegalArgumentException(ENDPOINT_ID + " property must be set"); if (getConfigurationTypes().isEmpty()) { throw new IllegalArgumentException(SERVICE_IMPORTED_CONFIGS + " property must be set and non-empty");
throw new IllegalArgumentException(ENDPOINT_ID + " property must be set"); if (getConfigurationTypes().isEmpty()) { throw new IllegalArgumentException(SERVICE_IMPORTED_CONFIGS + " property must be set and non-empty");
if (getConfigurationTypes().isEmpty()) { throw new IllegalArgumentException(SERVICE_IMPORTED_CONFIGS + " property must be set and non-empty");
+ " property must be set"); if (getConfigurationTypes().isEmpty()) { throw new IllegalArgumentException(SERVICE_IMPORTED_CONFIGS + " property must be set and non-empty");
/** * 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); }
if (!endpoint.getConfigurationTypes().contains(CONFIGURATION_TYPE)) { logInfo("No supported configuration type found. Not importing endpoint: %s", endpoint); return null;