public interface IInterceptor
| Modifier and Type | Method and Description |
|---|---|
ILoadPaths |
getLoadPaths() |
java.lang.Integer |
getMaxExecutionTimeSeconds() |
java.lang.Integer |
getMaxFutureThreadPoolSize() |
ReturnValue |
onGetBeanProperty(IInvoker invoker,
java.lang.Object receiver,
java.lang.String property)
Gets a Java Bean property
|
ReturnValue |
onGetInstanceField(IInvoker invoker,
java.lang.Object receiver,
java.lang.Class<?> receiverFormalType,
java.lang.String fieldName)
Get an instance field's value
|
ReturnValue |
onGetStaticField(IInvoker invoker,
java.lang.Class<?> receiver,
java.lang.String fieldName)
Get a static field's value
|
ReturnValue |
onInvokeConstructor(IInvoker invoker,
java.lang.Class<?> receiver,
java.lang.Object... args)
Invokes a constructor
|
ReturnValue |
onInvokeInstanceMethod(IInvoker invoker,
java.lang.Object receiver,
java.lang.Class<?> receiverFormalType,
java.lang.String method,
java.lang.Object... args)
Invokes an instance method
|
ReturnValue |
onInvokeStaticMethod(IInvoker invoker,
java.lang.Class<?> receiver,
java.lang.String method,
java.lang.Object... args)
Invokes a static method
|
byte[] |
onLoadClassPathResource(java.lang.String resourceName)
Loads a classpath resource
|
java.lang.String |
onReadSystemEnv(java.lang.String name)
Reads a Java environment variable
|
java.lang.String |
onReadSystemProperty(java.lang.String propertyName)
Reads a Java system property
|
void |
onSetBeanProperty(IInvoker invoker,
java.lang.Object receiver,
java.lang.String property,
java.lang.Object value)
Sets a Java Bean property
|
void |
validateFileRead(java.io.File file)
Validates that the file can be read
|
void |
validateFileWrite(java.io.File file)
Validates that the file can be written
|
void |
validateLoadModule(java.lang.String moduleName)
Validates the load of a module
|
void |
validateMaxExecutionTime()
Validates the execution time
|
void |
validateVeniceFunction(java.lang.String funcName)
Validates the invocation of a Venice function.
|
ReturnValue onInvokeInstanceMethod(IInvoker invoker, java.lang.Object receiver, java.lang.Class<?> receiverFormalType, java.lang.String method, java.lang.Object... args) throws SecurityException
invoker - the invokerreceiver - an objectreceiverFormalType - the formal type of the receiver (e.g a superclass)method - a methodargs - a list of argumentsSecurityException - if the instance method is not whitelistedReturnValue onInvokeStaticMethod(IInvoker invoker, java.lang.Class<?> receiver, java.lang.String method, java.lang.Object... args) throws SecurityException
invoker - the invokerreceiver - a classmethod - a methodargs - a list of argumentsSecurityException - if the static method is not whitelistedReturnValue onInvokeConstructor(IInvoker invoker, java.lang.Class<?> receiver, java.lang.Object... args) throws SecurityException
invoker - the invokerreceiver - a classargs - a list of argumentsSecurityException - if the constructor is not whitelistedReturnValue onGetBeanProperty(IInvoker invoker, java.lang.Object receiver, java.lang.String property) throws SecurityException
invoker - the invokerreceiver - an objectproperty - a property nameSecurityException - if the bean property (instance method) is not whitelistedvoid onSetBeanProperty(IInvoker invoker, java.lang.Object receiver, java.lang.String property, java.lang.Object value) throws SecurityException
invoker - the invokerreceiver - an objectproperty - a property namevalue - a property valueSecurityException - if the bean property (instance method) is not whitelistedReturnValue onGetStaticField(IInvoker invoker, java.lang.Class<?> receiver, java.lang.String fieldName) throws SecurityException
invoker - the invokerreceiver - a classfieldName - a field nameSecurityException - if the static field is not whitelistedReturnValue onGetInstanceField(IInvoker invoker, java.lang.Object receiver, java.lang.Class<?> receiverFormalType, java.lang.String fieldName) throws SecurityException
invoker - the invokerreceiver - an objectreceiverFormalType - the formal type of the receiver (e.g a superclass)fieldName - a field nameSecurityException - if the instance field is not whitelistedbyte[] onLoadClassPathResource(java.lang.String resourceName)
throws SecurityException
resourceName - a resource name (e.g.: /foo/org/image.png)SecurityException - if the classpath resource is not whitelistedjava.lang.String onReadSystemProperty(java.lang.String propertyName)
throws SecurityException
propertyName - a property name (e.g: user.home)SecurityException - if the property is not whitelistedjava.lang.String onReadSystemEnv(java.lang.String name)
throws SecurityException
name - a variable name (e.g: USER)SecurityException - if the variable is not whitelistedvoid validateLoadModule(java.lang.String moduleName)
throws SecurityException
moduleName - the module nameSecurityException - if the module is blacklistedvoid validateVeniceFunction(java.lang.String funcName)
throws SecurityException
funcName - A venice function nameSecurityException - if the function is blacklisted and not
allowed to be invoked.void validateMaxExecutionTime()
throws SecurityException
SecurityException - if the execution time exceeds the configured limit.void validateFileRead(java.io.File file)
throws SecurityException
file - A fileSecurityException - if the file can not be read.void validateFileWrite(java.io.File file)
throws SecurityException
file - A fileSecurityException - if the file can not be written.ILoadPaths getLoadPaths()
java.lang.Integer getMaxExecutionTimeSeconds()
Sandbox is allowed to run.java.lang.Integer getMaxFutureThreadPoolSize()
Sandbox is allowed to use.