- java.lang.Object
-
- is.codion.common.rmi.server.SerializationWhitelist
-
public final class SerializationWhitelist extends Object
Implements a serialization whitelist
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
configure(String whitelistFile)
Configures a serialization whitelist, does nothing ifwhitelist
is null or empty.static void
configureDryRun(String dryRunFile)
Configures a serialization whitelist for a dry run, does nothing ifdryRunFile
is null or empty.static boolean
isSerializationDryRunActive()
Returns true if a serialization dry-run is active.static void
writeDryRunWhitelist()
Writes the class names collected during a dry-run to file.
-
-
-
Method Detail
-
configure
public static void configure(String whitelistFile)
Configures a serialization whitelist, does nothing ifwhitelist
is null or empty. Supports 'classpath:' prefix for a whitelist in the classpath root.- Parameters:
whitelistFile
- the path to the file containing the whitelisted class names
-
configureDryRun
public static void configureDryRun(String dryRunFile)
Configures a serialization whitelist for a dry run, does nothing ifdryRunFile
is null or empty. Note that this will append to an existing file.- Parameters:
dryRunFile
- the dry-run results file to write to, appended to if it exists- Throws:
IllegalArgumentException
- in case of a classpath dry run file
-
isSerializationDryRunActive
public static boolean isSerializationDryRunActive()
Returns true if a serialization dry-run is active.- Returns:
- true if a dry-run is active.
-
writeDryRunWhitelist
public static void writeDryRunWhitelist()
Writes the class names collected during a dry-run to file. If dry-run was not active this method has no effect.
-
-