Class RestISPublisher

java.lang.Object
org.gcube.vremanagement.executor.ispublisher.ISPublisher
org.gcube.vremanagement.executor.ispublisher.RestISPublisher

public class RestISPublisher extends ISPublisher
Author:
Luca Frosini (ISTI - CNR)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final UUID
    The unique identifier for this eService instance.
    protected org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClient
    Client for interacting with the Resource Registry.
    protected org.gcube.informationsystem.resourceregistry.publisher.ResourceRegistryPublisher
    Publisher for managing resources in the Resource Registry.

    Fields inherited from class org.gcube.vremanagement.executor.ispublisher.ISPublisher

    applicationContext, isPublishers
  • Constructor Summary

    Constructors
    Constructor
    Description
    RestISPublisher(org.gcube.smartgears.context.application.ApplicationContext applicationContext)
    Constructor for REST-based Information System publisher.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet
    getPluginAccessPointFacet(org.gcube.vremanagement.executor.plugin.Plugin plugin, org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet smartExecutorAccessPointFacet)
    Create an access point facet for a specific plugin.
    protected URI
    getPluginEndpoint(String pluginName, org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet smartExecutorAccessPointFacet)
    Get the endpoint URI for a specific plugin.
    protected org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet
    getSmartExecutorAccessPointFacet(org.gcube.resourcemanagement.model.reference.entities.resources.EService smartExecutorEService)
    Get the access point facet for the SmartExecutor service.
    protected URI
    getSmartExecutorEndpoint(org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet smartExecutorAccessPointFacet)
    Get the endpoint URI for the SmartExecutor service.
    void
    publishPlugins(Map<String,Class<? extends org.gcube.vremanagement.executor.plugin.Plugin>> availablePlugins)
    Publish the available plugins to the Information System.
    protected org.gcube.resourcemanagement.model.reference.entities.resources.RunningPlugin
    publishRunningPluginWithRelations(org.gcube.vremanagement.executor.plugin.Plugin plugin, UUID pluginUUID)
    Publish a running plugin along with its relations to the Information System.
    void
    unpublishPlugins(boolean force)
    Unpublish plugins from the Information System.

    Methods inherited from class org.gcube.vremanagement.executor.ispublisher.ISPublisher

    getISPublishers

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • eServiceUUID

      protected final UUID eServiceUUID
      The unique identifier for this eService instance.
    • resourceRegistryClient

      protected org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClient resourceRegistryClient
      Client for interacting with the Resource Registry.
    • resourceRegistryPublisher

      protected org.gcube.informationsystem.resourceregistry.publisher.ResourceRegistryPublisher resourceRegistryPublisher
      Publisher for managing resources in the Resource Registry.
  • Constructor Details

    • RestISPublisher

      public RestISPublisher(org.gcube.smartgears.context.application.ApplicationContext applicationContext)
      Constructor for REST-based Information System publisher.
      Parameters:
      applicationContext - the application context
  • Method Details

    • getPluginEndpoint

      protected URI getPluginEndpoint(String pluginName, org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet smartExecutorAccessPointFacet) throws Exception
      Get the endpoint URI for a specific plugin.
      Parameters:
      pluginName - the name of the plugin
      smartExecutorAccessPointFacet - the access point facet of the SmartExecutor
      Returns:
      the plugin endpoint URI
      Throws:
      Exception - if the endpoint creation fails
    • getPluginAccessPointFacet

      protected org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet getPluginAccessPointFacet(org.gcube.vremanagement.executor.plugin.Plugin plugin, org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet smartExecutorAccessPointFacet) throws Exception
      Create an access point facet for a specific plugin.
      Parameters:
      plugin - the plugin for which to create the access point facet
      smartExecutorAccessPointFacet - the access point facet of the SmartExecutor
      Returns:
      the access point facet for the plugin
      Throws:
      Exception - if the access point facet creation fails
    • getSmartExecutorAccessPointFacet

      protected org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet getSmartExecutorAccessPointFacet(org.gcube.resourcemanagement.model.reference.entities.resources.EService smartExecutorEService)
      Get the access point facet for the SmartExecutor service.
      Parameters:
      smartExecutorEService - the SmartExecutor eService
      Returns:
      the access point facet for the SmartExecutor
    • getSmartExecutorEndpoint

      protected URI getSmartExecutorEndpoint(org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet smartExecutorAccessPointFacet) throws URISyntaxException
      Get the endpoint URI for the SmartExecutor service.
      Parameters:
      smartExecutorAccessPointFacet - the access point facet of the SmartExecutor
      Returns:
      the SmartExecutor endpoint URI
      Throws:
      URISyntaxException - if the URI creation fails
    • publishRunningPluginWithRelations

      protected org.gcube.resourcemanagement.model.reference.entities.resources.RunningPlugin publishRunningPluginWithRelations(org.gcube.vremanagement.executor.plugin.Plugin plugin, UUID pluginUUID) throws Exception
      Publish a running plugin along with its relations to the Information System.
      Parameters:
      plugin - the plugin to publish
      pluginUUID - the unique identifier for the plugin execution
      Returns:
      the published running plugin resource
      Throws:
      Exception - if the publishing fails
    • publishPlugins

      public void publishPlugins(Map<String,Class<? extends org.gcube.vremanagement.executor.plugin.Plugin>> availablePlugins) throws Exception
      Description copied from class: ISPublisher
      Publish the available plugins to the Information System.
      Specified by:
      publishPlugins in class ISPublisher
      Parameters:
      availablePlugins - map of available plugins
      Throws:
      Exception - if the publishing fails
    • unpublishPlugins

      public void unpublishPlugins(boolean force) throws Exception
      Description copied from class: ISPublisher
      Unpublish plugins from the Information System.
      Specified by:
      unpublishPlugins in class ISPublisher
      Parameters:
      force - whether to force the unpublishing even if some plugins are still running
      Throws:
      Exception - if the unpublishing fails