Package jadex.extension.rs.publish
Class NanoRestPublishService
- java.lang.Object
- 
- jadex.extension.rs.publish.AbstractRestPublishService
- 
- jadex.extension.rs.publish.ExternalRestPublishService
- 
- jadex.extension.rs.publish.NanoRestPublishService
 
 
 
- 
- All Implemented Interfaces:
- IPublishService,- IWebPublishService,- IRequestHandlerService
 
 public class NanoRestPublishService extends ExternalRestPublishService Publish service using Nano.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class jadex.extension.rs.publish.AbstractRestPublishServiceAbstractRestPublishService.MappingInfo, AbstractRestPublishService.RequestInfo
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected java.util.Map<java.lang.Integer,NanoWebsocketServer>portservers2The servers per port.- 
Fields inherited from class jadex.extension.rs.publish.ExternalRestPublishServiceDEFAULT_APP, DEFAULT_COMPLETECONTEXT, DEFAULT_HOST, DEFAULT_PORT, inited, portservers, sidservers
 - 
Fields inherited from class jadex.extension.rs.publish.AbstractRestPublishServiceASYNC_CONTEXT_INFO, component, converters, FINISHED, HEADER_JADEX_CALLFINISHED, HEADER_JADEX_CALLID, HEADER_JADEX_CLIENTTIMEOUT, HEADER_JADEX_TERMINATE, PARAMETER_MEDIATYPES, requestinfos, requestspercall
 - 
Fields inherited from interface jadex.bridge.service.types.publish.IPublishServiceDEFAULT_RSPUBLISH_COMPONENTS, PUBLISH_RS, PUBLISH_WS
 
- 
 - 
Constructor SummaryConstructors Constructor Description NanoRestPublishService()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.URIconvertUri(java.lang.String pid)Convert the publish id to uri.static java.io.FilegetFile(java.lang.ClassLoader cl, java.lang.String path)java.lang.ObjectgetHttpServer(java.net.URI uri, PublishInfo info)Get or start an api to the http server.static java.io.InputStreamgetInputStream(java.io.File f)PathHandlergetPathHandler(java.net.URI uri, PublishInfo info)Get or start an api to the http server.static java.net.URLgetURL(java.lang.ClassLoader cl, java.lang.String path)IFuture<java.lang.Void>publishResources(java.lang.String pid, java.lang.String rootpath)Publish file resources from the classpath.voidstart()voidstop()- 
Methods inherited from class jadex.extension.rs.publish.ExternalRestPublishServicegetServicesInfo, handleRequest, init, isSupported, mirrorHttpServer, publishExternal, publishHMTLPage, publishRedirect, publishService, shutdownHttpServer, unpublish, unpublishService
 - 
Methods inherited from class jadex.extension.rs.publish.AbstractRestPublishServiceaddConverter, addEntry, complete, convertJsonValue, convertParameter, convertParameter, evaluateMapping, extractCallerValues, getAsyncContext, getCleanPublishId, getParameterInfos, getRequestTimeout, getServiceInfo, getServletHost, getServletUrl, guessRestType, handleRequest, hasStringConvertableParameters, isComplete, loadFunctionJS, loadStyleCSS, main, mapParameters, mapResult, parseMimetypes, removeConverter, saveRequestContext, splitQueryString, writeResponse, writeResponse, writeResponseContent, writeResponseHeader
 
- 
 
- 
- 
- 
Field Detail- 
portservers2protected java.util.Map<java.lang.Integer,NanoWebsocketServer> portservers2 The servers per port.
 
- 
 - 
Method Detail- 
startpublic void start() 
 - 
stoppublic void stop() 
 - 
getHttpServerpublic java.lang.Object getHttpServer(java.net.URI uri, PublishInfo info)Get or start an api to the http server.- Overrides:
- getHttpServerin class- ExternalRestPublishService
 
 - 
getPathHandlerpublic PathHandler getPathHandler(java.net.URI uri, PublishInfo info) Get or start an api to the http server.
 - 
publishResourcespublic IFuture<java.lang.Void> publishResources(java.lang.String pid, java.lang.String rootpath) Publish file resources from the classpath.- Specified by:
- publishResourcesin interface- IWebPublishService
- Overrides:
- publishResourcesin class- ExternalRestPublishService
- Parameters:
- pid- The publish url.
- rootpath- The classpath root path where to look for the reources.
 
 - 
getFilepublic static java.io.File getFile(java.lang.ClassLoader cl, java.lang.String path) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
getInputStreampublic static java.io.InputStream getInputStream(java.io.File f) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
getURLpublic static java.net.URL getURL(java.lang.ClassLoader cl, java.lang.String path)
 - 
convertUripublic java.net.URI convertUri(java.lang.String pid) Convert the publish id to uri.- Overrides:
- convertUriin class- ExternalRestPublishService
 
 
- 
 
-