Codota Logo
ApplicationContext.getServiceEntry
Code IndexAdd Codota to your IDE (free)

How to use
getServiceEntry
method
in
com.b2international.snowowl.core.ApplicationContext

Best Java code snippets using com.b2international.snowowl.core.ApplicationContext.getServiceEntry (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: com.b2international.snowowl/com.b2international.snowowl.core

public <T> T getService(final Class<T> serviceInterface) {
  return getServiceEntry(serviceInterface).implementation;
}
origin: com.b2international.snowowl/com.b2international.snowowl.core

public <T> void removeServiceListener(final Class<T> serviceInterface, final IServiceChangeListener<T> listener) {
  final ServiceRegistryEntry<T> entry = getServiceEntry(serviceInterface);
  entry.listeners.remove(listener);
}
origin: com.b2international.snowowl/com.b2international.snowowl.core

public <T> void addServiceListener(final Class<T> serviceInterface, final IServiceChangeListener<T> listener) {
  final ServiceRegistryEntry<T> entry = getServiceEntry(serviceInterface);
  if (null != entry.implementation) {
    listener.serviceChanged(null, entry.implementation);
  }
  entry.listeners.add(listener);
}

origin: com.b2international.snowowl/com.b2international.snowowl.core

public <T> void registerService(final Class<T> serviceInterface, final T implementation) {
  
  Preconditions.checkNotNull(implementation, "Registering service for " + serviceInterface.getSimpleName() + " is prohibited with unspecified implementation.");
  
  final ServiceRegistryEntry<T> entry = getServiceEntry(serviceInterface);
  final T oldImplementation = entry.implementation;
  entry.implementation = implementation;
  // notify listeners
  for (final Iterator<IServiceChangeListener<T>> ir = new CopyOnWriteArrayList<IServiceChangeListener<T>>(entry.listeners).iterator(); ir.hasNext(); /**/) {
    final IServiceChangeListener<T> listener = ir.next();
    listener.serviceChanged(oldImplementation, implementation);
  }
  
  // dispose old registered implementation
  if (oldImplementation instanceof IDisposableService && !((IDisposableService) oldImplementation).isDisposed()) {
    ((IDisposableService)oldImplementation).dispose();
  }
  
  LOGGER.debug(MessageFormat.format("Registered service {0} for interface {1}.", implementation.getClass().getName(), serviceInterface.getName()));
}

com.b2international.snowowl.coreApplicationContextgetServiceEntry

Popular methods of ApplicationContext

  • getInstance
    Factory method.
  • getServiceForClass
    Returns with the service registered for the class argument key from the shared application context.
  • getService
  • getServiceChecked
    Returns with the service instance associated with the passed in service interface. May throw runtime
  • registerService
  • isServerMode
    Returns true if the application for the current application context is running in server mode. Other
  • <init>
  • addServiceListener
  • checkStrictServices
    Checks the availability of the registered services strictly, which means that null implementations
  • dispose
  • exists
    Returns true if a the service given with it interface is registered to the application context with
  • getServiceInfo
    Initializes the project specific MultiStatus object for generic serviceablility support for the plug
  • exists,
  • getServiceInfo

Popular in Java

  • Reading from database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • onCreateOptionsMenu (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Kernel (java.awt.image)
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now