Class ServiceListConlet

java.lang.Object
org.jgrapes.core.internal.ComponentVertex
org.jgrapes.core.Component
org.jgrapes.webconsole.base.AbstractConlet<S>
org.jgrapes.webconsole.base.freemarker.FreeMarkerConlet<Serializable>
org.jgrapes.osgi.webconlet.services.ServiceListConlet
All Implemented Interfaces:
Iterable<ComponentType>, EventListener, Channel, ComponentType, Eligible, Manager, ServiceListener

public class ServiceListConlet extends org.jgrapes.webconsole.base.freemarker.FreeMarkerConlet<Serializable> implements ServiceListener
A conlet for inspecting the services in an OSGi runtime.
  • Constructor Details

  • Method Details

    • onConsoleReady

      @Handler public void onConsoleReady(org.jgrapes.webconsole.base.events.ConsoleReady event, org.jgrapes.webconsole.base.ConsoleConnection channel) throws freemarker.template.TemplateNotFoundException, freemarker.template.MalformedTemplateNameException, freemarker.core.ParseException, IOException
      On ConsoleReady, fire the AddConletType.
      Parameters:
      event - the event
      channel - the channel
      Throws:
      freemarker.template.TemplateNotFoundException - the template not found exception
      freemarker.template.MalformedTemplateNameException - the malformed template name exception
      freemarker.core.ParseException - the parse exception
      IOException - Signals that an I/O exception has occurred.
    • doRenderConlet

      protected Set<org.jgrapes.webconsole.base.Conlet.RenderMode> doRenderConlet(org.jgrapes.webconsole.base.events.RenderConletRequestBase<?> event, org.jgrapes.webconsole.base.ConsoleConnection channel, String conletId, Serializable conletState) throws Exception
      Specified by:
      doRenderConlet in class org.jgrapes.webconsole.base.AbstractConlet<Serializable>
      Throws:
      Exception
    • serviceChanged

      public void serviceChanged(ServiceEvent event)
      Translates the OSGi ServiceEvent to a JGrapes event and fires it on all known console session channels.
      Specified by:
      serviceChanged in interface ServiceListener
      Parameters:
      event - the event
    • onServiceChanged

      @Handler public void onServiceChanged(ServiceListConlet.ServiceChanged event, org.jgrapes.webconsole.base.ConsoleConnection channel)
      Handles a ServiceListConlet.ServiceChanged event by updating the information in the console sessions.
      Parameters:
      event - the event