Class PluginService

java.lang.Object
org.gcube.service.helloworld.rest.PluginService

@Path("plugins") public class PluginService extends Object
The plugins of the service, each at /plugins/<id>. The service finds them with a ServiceLoader of HelloWorldPlugin, the interface its application.yaml names in plugins. A plugin says itself whether its path needs a token: the greeter does not. SmartGears reads the configuration of each plugin; the service gives it to every instance it creates, and does not use a plugin whose configuration is missing.
Author:
Luca Frosini (ISTI-CNR)
  • Constructor Details

    • PluginService

      public PluginService()
  • Method Details

    • greet

      @GET @Path("{id}") @Produces("text/plain") public String greet(@PathParam("id") String id, @QueryParam("who") @DefaultValue("world") String who)
      Asks a plugin to greet.
      Parameters:
      id - the identifier of the plugin
      who - whom to greet
      Returns:
      the greeting of the plugin