Class ClassListExtractor
- java.lang.Object
-
- com.exasol.classlistextractor.verifier.ClassListExtractor
-
- All Implemented Interfaces:
AutoCloseable
public class ClassListExtractor extends Object implements AutoCloseable
This class captures the classes loaded by the JVM of a UDF.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceClassListExtractor.CallbackWithQueryToScriptInterface for a method that runs a query to a script, that loads classes you want to analyze withcapture(CallbackWithQueryToScript).
-
Constructor Summary
Constructors Constructor Description ClassListExtractor(com.exasol.bucketfs.Bucket bucket, LocalServiceExposer serviceExposer)Create a new instance ofClassListExtractor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>capture(ClassListExtractor.CallbackWithQueryToScript runnable)Capture the class list of a UDF call.voidclose()String[]getJvmOptions()Get the JVM options that must be added to the script.
-
-
-
Constructor Detail
-
ClassListExtractor
public ClassListExtractor(com.exasol.bucketfs.Bucket bucket, LocalServiceExposer serviceExposer)Create a new instance ofClassListExtractor.- Parameters:
bucket- bucket for uploading an agent used for extracting the class listserviceExposer- callback that makes a local TCP service available inside the database
-
-
Method Detail
-
getJvmOptions
public String[] getJvmOptions()
Get the JVM options that must be added to the script.- Returns:
- jvm options
-
capture
public List<String> capture(ClassListExtractor.CallbackWithQueryToScript runnable)
Capture the class list of a UDF call.The query you want to analyze must involve a script that contains the JVM options provided by
getJvmOptions(). To make sure that you don't forget this, this method will throw an exception if you did not callgetJvmOptions()before this method.- Parameters:
runnable- function that performs the UDF call- Returns:
- list of captured classes
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable
-
-