Package jadex.publishservice.impl
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 Summary
FieldsFields inherited from interface jadex.publishservice.IPublishService
DEFAULT_RSPUBLISH_COMPONENTS, PUBLISH_RS, PUBLISH_WS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected jadex.providedservice.IServiceIdentifier
findService
(String target) Find a provided service per its provided service name or type.jadex.core.IComponent
abstract Object
getHttpServer
(URI uri, PublishInfo info) Get or start an api to the http server.void
handleRequest
(jadex.providedservice.IService service, PathManager<RequestManager.MappingInfo> pm, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object[] others) Handle a web request.jadex.future.IFuture
<Boolean> isSupported
(String publishtype) Test if publishing a specific type is supported (e.g.jadex.future.IFuture
<Void> onEnd()
jadex.future.IFuture
<Void> onStart()
abstract jadex.future.IFuture
<Void> publishService
(jadex.providedservice.IServiceIdentifier serviceid, PublishInfo info) Publish a service.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jadex.publishservice.IPublishService
unpublishService
Methods inherited from interface jadex.publishservice.IWebPublishService
publishHMTLPage, publishResources
-
Field Details
-
self
protected jadex.core.impl.Component selfThe component.
-
-
Constructor Details
-
PublishServiceFeature
protected PublishServiceFeature(jadex.core.impl.Component self)
-
-
Method Details
-
onStart
- Specified by:
onStart
in interfacejadex.execution.impl.ILifecycle
-
onEnd
- Specified by:
onEnd
in interfacejadex.execution.impl.ILifecycle
-
findService
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
Test if publishing a specific type is supported (e.g. web service).- Specified by:
isSupported
in interfaceIPublishService
- Parameters:
publishtype
- The type to test.- Returns:
- True, if can be published.
-
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 interfaceIPublishService
- Parameters:
cl
- The classloader.service
- The original service.pid
- The publish id (e.g. url or name).
-
getHttpServer
Get or start an api to the http server.
-