java.lang.Object
org.restheart.polyglot.JSPlugin
org.restheart.polyglot.interceptors.JSInterceptor<R,S>
- All Implemented Interfaces:
ConfigurablePlugin,ExchangeTypeResolver<R,,S> Interceptor<R,,S> Plugin
- Direct Known Subclasses:
BsonJSInterceptor,ByteArrayJSInterceptor,ByteArrayProxyJSInterceptor,CsvJSInterceptor,JsonJSInterceptor,JsonProxyJSInterceptor,MongoJSInterceptor,StringJSInterceptor,WildCardJSInterceptor
public class JSInterceptor<R extends Request<?>,S extends Response<?>>
extends JSPlugin
implements Interceptor<R,S>
-
Field Summary
Fields inherited from class org.restheart.polyglot.JSPlugin
contextQueue, LOGGER -
Constructor Summary
ConstructorsConstructorDescriptionJSInterceptor(String name, String pluginClass, String description, InterceptPoint interceptPoint, String modulesReplacements, org.graalvm.polyglot.Source handleSource, org.graalvm.polyglot.Source resolveSource, Optional<com.mongodb.client.MongoClient> mclient, Configuration config, Map<String, String> contextOptions) -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanMethods inherited from class org.restheart.polyglot.JSPlugin
configuration, engine, getDescription, handleSource, mclient, name, releaseCtx, takeCtxMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.restheart.plugins.ConfigurablePlugin
arg, argOrDefaultMethods inherited from interface org.restheart.plugins.ExchangeTypeResolver
requestType, responseType
-
Constructor Details
-
JSInterceptor
public JSInterceptor(String name, String pluginClass, String description, InterceptPoint interceptPoint, String modulesReplacements, org.graalvm.polyglot.Source handleSource, org.graalvm.polyglot.Source resolveSource, Optional<com.mongodb.client.MongoClient> mclient, Configuration config, Map<String, String> contextOptions) - Parameters:
name-pluginClass-description-interceptPoint-modulesReplacements-handleSource-resolveSource-mclient-config-contextOptions-
-
-
Method Details
-
getInterceptPoint
-
handle
- Specified by:
handlein interfaceInterceptor<R extends Request<?>,S extends Response<?>> - Parameters:
request-response-- Throws:
InterruptedException
-
resolve
-
getPluginClass
-