Tabnine Logo
ServiceRegistration.setProperties
Code IndexAdd Tabnine to your IDE (free)

How to use
setProperties
method
in
org.osgi.framework.ServiceRegistration

Best Java code snippets using org.osgi.framework.ServiceRegistration.setProperties (Showing top 20 results out of 504)

origin: org.eclipse/org.eclipse.osgi

void setServiceProperties(Dictionary props) {
  ServiceRegistration current = registration;
  if (current != null)
    current.setProperties(props);
}
origin: org.jflux/org.jflux.impl.registry.osgi

/**
 * Sets the certificate's properties.
 * @param properties the properties to set
 */
@Override
public void setProperties(Dictionary properties) {
  myRegistration.setProperties(properties);
}
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.osgi

void setServiceProperties(Dictionary props) {
  ServiceRegistration current = registration;
  if (current != null)
    current.setProperties(props);
}
origin: apache/felix

/**
 * Update the current import.
 */
private void update() {
  if (m_reg != null) {
    m_reg.setProperties(getProps(m_ref));
  }
}
origin: org.apache.stanbol/org.apache.stanbol.commons.solr.core

/**
 * Updates the {@link ServiceRegistration} of the {@link CoreContainer} after
 * some changes to the cores
 */
private void updateServerRegistration() {
  serverRegistration.setProperties(serverProperties);
}
/**
origin: org.apache.felix/org.apache.felix.ipojo.composite

/**
 * Update the current import.
 */
private void update() {
  if (m_reg != null) {
    m_reg.setProperties(getProps(m_ref));
  }
}
origin: apache/aries

protected void setProperties(Dictionary props) {
  ServiceRegistration reg = registration.get();
  if (reg == null) {
    throw new IllegalStateException("Service is not registered");
  } else {
    reg.setProperties(props);
    // TODO: set serviceProperties? convert somehow? should listeners be notified of this?
  }
}
origin: OpenNMS/opennms

public void setProperties(Hashtable<String, Object> props)
{
  this.serviceProps.clear();
  this.serviceProps.putAll(props);
  if (this.serviceReg != null) {
    this.serviceReg.setProperties(this.serviceProps);
  }
}
origin: org.apache.aries.blueprint/org.apache.aries.blueprint.core

protected void setProperties(Dictionary props) {
  ServiceRegistration reg = registration.get();
  if (reg == null) {
    throw new IllegalStateException("Service is not registered");
  } else {
    reg.setProperties(props);
    // TODO: set serviceProperties? convert somehow? should listeners be notified of this?
  }
}
origin: org.opendaylight.mdsal/mdsal-binding-dom-adapter

@Override
public void modifiedService(final ServiceReference<D> reference, final ServiceRegistration<B> service) {
  if (service != null && reference != null) {
    final Dict newProps = Dict.fromReference(reference);
    LOG.debug("Updating service {} with properties {}", service, newProps);
    service.setProperties(newProps);
  }
}
origin: org.ops4j.pax.wicket/org.ops4j.pax.wicket.service

/** {@inheritDoc} */
public void updated(Dictionary<String, ?> properties) throws ConfigurationException {
  if (properties != null) {
    setApplicationName((String) properties.get(APPLICATION_NAME));
  }
  synchronized (this) {
    serviceRegistration.setProperties(properties);
  }
}
origin: org.ops4j.pax.wicket/pax-wicket-service

@SuppressWarnings("rawtypes")
public void updated(Dictionary properties) throws ConfigurationException {
  if (properties != null) {
    setApplicationName((String) properties.get(APPLICATION_NAME));
  }
  synchronized (this) {
    serviceRegistration.setProperties(properties);
  }
}
origin: org.apache.aries.transaction/org.apache.aries.transaction.wrappers

public void modifiedService(ServiceReference ref, Object service)
{
 ServiceRegistration reg = (ServiceRegistration) service;
 
 Hashtable<String, Object> map = new Hashtable<String, Object>();
 for (String key : ref.getPropertyKeys()) {
  map.put(key, ref.getProperty(key));
 }
 map.put("aries.xa.aware", "true");
 reg.setProperties(map);
}
origin: org.apache.aries.rsa/org.apache.aries.rsa.topology-manager

private void updateRegistration() {
  if (serviceRegistration != null) {
    serviceRegistration.setProperties(getEELProperties());
  }
}
origin: org.apache.felix/org.apache.felix.ipojo.composite

/**
 * An exported service was modified.
 * @param reference : modified reference
 * @see org.apache.felix.ipojo.util.TrackerCustomizer#modifiedService(org.osgi.framework.ServiceReference, java.lang.Object)
 */
public void onServiceModification(ServiceReference reference) {
  ServiceRegistration reg = (ServiceRegistration) m_registrations.get(reference);
  if (reg != null) {
    reg.setProperties(getProps(reference));
  }
}
origin: org.ops4j.pax.wicket/pax-wicket-service

@SuppressWarnings("rawtypes")
public void updated(Dictionary config) throws ConfigurationException {
  if (config != null) {
    Integer filterPriority = (Integer) config.get(FILTER_PRIORITY);
    String applicationName = (String) config.get(APPLICATION_NAME);
    setPriority(filterPriority);
    setApplicationName(applicationName);
  }
  synchronized (this) {
    filterFactoryServiceRegistration.setProperties(config);
  }
}
origin: org.ops4j.pax.wicket/org.ops4j.pax.wicket.service

/** {@inheritDoc} */
public void updated(Dictionary<String, ?> config) throws ConfigurationException {
  if (config != null) {
    Integer filterPriority = (Integer) config.get(FILTER_PRIORITY);
    String applicationName = (String) config.get(APPLICATION_NAME);
    setPriority(filterPriority);
    setApplicationName(applicationName);
  }
  synchronized (this) {
    filterFactoryServiceRegistration.setProperties(config);
  }
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.equinox.app

void refreshProperties() {
  ServiceRegistration reg = getServiceRegistration();
  if (reg != null)
    try {
      reg.setProperties(getServiceProperties());
    } catch (IllegalStateException e) {
      // this must mean the service was unregistered
      // just ignore
    }
}
origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.app

void refreshProperties() {
  ServiceRegistration reg = getServiceRegistration();
  if (reg != null)
    try {
      reg.setProperties(getServiceProperties());
    } catch (IllegalStateException e) {
      // this must mean the service was unregistered
      // just ignore
    }
}
origin: org.eclipse.neoscada.core/org.eclipse.scada.ca.common

@Override
protected Entry<BeanConfigurationFactory.BeanServiceInstance> updateService ( final UserInformation userInformation, final String configurationId, final Entry<BeanConfigurationFactory.BeanServiceInstance> entry, final Map<String, String> parameters ) throws Exception
{
  entry.getService ().update ( parameters );
  entry.getHandle ().setProperties ( entry.getService ().getProperties () );
  return null;
}
org.osgi.frameworkServiceRegistrationsetProperties

Javadoc

Updates the properties associated with a service.

The Constants#OBJECTCLASS, Constants#SERVICE_BUNDLEID, Constants#SERVICE_ID and Constants#SERVICE_SCOPE keys cannot be modified by this method. These values are set by the Framework when the service is registered in the OSGi environment.

The following steps are required to modify service properties:

  1. The service's properties are replaced with the provided properties.
  2. A service event of type ServiceEvent#MODIFIED is fired.

Popular methods of ServiceRegistration

  • unregister
    Unregisters a service. Remove a ServiceRegistration object from the Framework service registry. All
  • getReference
    Returns a ServiceReference object for a service being registered. The ServiceReference object may be

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onCreateOptionsMenu (Activity)
  • onRequestPermissionsResult (Fragment)
  • findViewById (Activity)
  • Menu (java.awt)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • BoxLayout (javax.swing)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now