![]() ![]() It is not restricted to only use its two parameters. The filter factory implementation can also use any contextual information at its disposal, for example, extracted from the application thread context, or its call stack, to compose and combine a new filter. When invoked from tObjectInputFilter, the first parameter is the filter currently set on the stream (which was set in the constructor), and the second parameter is the filter given to tObjectInputFilter.Ī typical filter factory should use or merge the static JVM-wide filter with other application and context specific filters and the stream-specific filter, if one is set on the stream. When invoked from the ObjectInputStream constructors, the first parameter is null and the second parameter is the static JVM-wide filter. The parameters are the current filter and a requested filter and the function returns the filter to be used for the stream. The JVM-wide filter factory is a function invoked when each ObjectInputStream is constructed and when the stream-specific filter is set using tObjectInputFilter(ObjectInputFilter). If set, the JVM-wide filter factory selects the filter for each stream when the stream is constructed and when a stream-specific filter is set. The behavior is opt-in based on the presence of the jdk.serialFilterFactory system property on the command line or the jdk.serialFilterFactory security property. The behavior is a strict subset of JEP 415: Context-Specific Deserialization Filters to allow a filter factory to be configured using a property configured on the command line or in the security properties file. Core-libs/java.io:serialization ➜ Context-specific Deserialization FiltersĪllow applications to configure context-specific and dynamically-selected deserialization filters via a JVM-wide filter factory that is invoked to select a filter for each deserialization stream.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |