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.IServiceIdentifierfindService(String target) Find a provided service per its provided service name or type.jadex.core.IComponentabstract ObjectgetHttpServer(URI uri, PublishInfo info) Get or start an api to the http server.voidhandleRequest(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, waitMethods inherited from interface jadex.publishservice.IPublishService
unpublishServiceMethods 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:
onStartin interfacejadex.execution.impl.ILifecycle
-
onEnd
- Specified by:
onEndin 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:
isSupportedin 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.mappings- The collected mapping infos for the service.request- The request.response- The response.- Throws:
IOExceptionjakarta.servlet.ServletException
-
publishService
public abstract jadex.future.IFuture<Void> publishService(jadex.providedservice.IServiceIdentifier serviceid, PublishInfo info) Publish a service.- Specified by:
publishServicein 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.
-