Package org.restheart.polyglot
Class AbstractJSPlugin
java.lang.Object
org.restheart.polyglot.AbstractJSPlugin
- Direct Known Subclasses:
AbstractJSInterceptor,JavaScriptService,NodeService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected org.graalvm.polyglot.Engineprotected org.graalvm.polyglot.Sourceprotected InterceptPointprotected booleanprotected booleanprotected RegisterPlugin.MATCH_POLICYprotected com.mongodb.client.MongoClientprotected Stringprotected Stringprotected Stringprotected booleanprotected String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedAbstractJSPlugin(String name, String pluginClass, String description, String uri, boolean secured, RegisterPlugin.MATCH_POLICY matchPolicy, InterceptPoint interceptPoint, Map<String, Object> pluginArgs, boolean isService, boolean isInterceptor) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddBindings(org.graalvm.polyglot.Context ctx, String pluginName, Map<String, Object> pluginsArgs, org.slf4j.Logger LOGGER, com.mongodb.client.MongoClient mclient) static org.graalvm.polyglot.Contextprotected org.graalvm.polyglot.Contextctx()protected voidfinalize()getName()getUri()protected org.graalvm.polyglot.Valuehandle()boolean
-
Field Details
-
contextOptions
-
engine
protected org.graalvm.polyglot.Engine engine -
modulesReplacements
-
handleSource
protected org.graalvm.polyglot.Source handleSource -
name
-
pluginClass
-
description
-
uri
-
secured
protected boolean secured -
matchPolicy
-
interceptPoint
-
isService
protected boolean isService -
isInterceptor
protected boolean isInterceptor -
mclient
protected com.mongodb.client.MongoClient mclient -
pluginArgs
-
ctxs
-
handles
-
-
Constructor Details
-
AbstractJSPlugin
protected AbstractJSPlugin() -
AbstractJSPlugin
protected AbstractJSPlugin(String name, String pluginClass, String description, String uri, boolean secured, RegisterPlugin.MATCH_POLICY matchPolicy, InterceptPoint interceptPoint, Map<String, Object> pluginArgs, boolean isService, boolean isInterceptor)
-
-
Method Details
-
context
-
getName
-
getPluginClass
-
getUri
-
getDescription
-
isSecured
public boolean isSecured() -
getMatchPolicy
-
getInterceptPoint
-
addBindings
-
ctx
protected org.graalvm.polyglot.Context ctx()- Returns:
- the Context associated with this thread. If not existing, it instanitates it.
-
handle
protected org.graalvm.polyglot.Value handle()- Returns:
- the handle Value associated with this thread. If not existing, it instanitates it.
-
finalize
-