Class PublishServiceFeature

java.lang.Object
jadex.publishservice.impl.PublishServiceFeature
All Implemented Interfaces:
jadex.execution.impl.ILifecycle, IPublishService, IPublishServiceFeature, IWebPublishService

public abstract class PublishServiceFeature extends Object implements jadex.execution.impl.ILifecycle, IPublishServiceFeature
  • Field Details

    • self

      protected jadex.core.impl.Component self
      The component.
  • Constructor Details

    • PublishServiceFeature

      protected PublishServiceFeature(jadex.core.impl.Component self)
  • Method Details

    • onStart

      public jadex.future.IFuture<Void> onStart()
      Specified by:
      onStart in interface jadex.execution.impl.ILifecycle
    • onEnd

      public jadex.future.IFuture<Void> onEnd()
      Specified by:
      onEnd in interface jadex.execution.impl.ILifecycle
    • findService

      protected jadex.providedservice.IServiceIdentifier findService(String target)
      Find a provided service per its provided service name or type.
      Parameters:
      target - The service name or type.
      Returns:
      The service id of the service.
    • getComponent

      public jadex.core.IComponent getComponent()
    • isSupported

      public jadex.future.IFuture<Boolean> isSupported(String publishtype)
      Test if publishing a specific type is supported (e.g. web service).
      Specified by:
      isSupported in interface IPublishService
      Parameters:
      publishtype - The type to test.
      Returns:
      True, if can be published.
    • getClassLoader

      public ClassLoader getClassLoader()
    • handleRequest

      public void handleRequest(jadex.providedservice.IService service, PathManager<RequestManager.MappingInfo> pm, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object[] others) throws IOException, jakarta.servlet.ServletException
      Handle a web request.
      Parameters:
      service - The service.
      request - The request.
      response - The response.
      mappings - The collected mapping infos for the service.
      Throws:
      IOException
      jakarta.servlet.ServletException
    • publishService

      public abstract jadex.future.IFuture<Void> publishService(jadex.providedservice.IServiceIdentifier serviceid, PublishInfo info)
      Publish a service.
      Specified by:
      publishService in interface IPublishService
      Parameters:
      cl - The classloader.
      service - The original service.
      pid - The publish id (e.g. url or name).
    • getHttpServer

      public abstract Object getHttpServer(URI uri, PublishInfo info)
      Get or start an api to the http server.