Package org.apache.dubbo.common.utils
Class DefaultSerializeClassChecker
java.lang.Object
org.apache.dubbo.common.utils.DefaultSerializeClassChecker
- All Implemented Interfaces:
AllowClassNotifyListener
Inspired by Fastjson2
see com.alibaba.fastjson2.filter.ContextAutoTypeBeforeHandler#apply(java.lang.String, java.lang.Class, long)
-
Field Summary
Fields inherited from interface org.apache.dubbo.common.utils.AllowClassNotifyListener
DEFAULT_STATUS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultSerializeClassCheckerbooleanClass<?> loadClass(ClassLoader classLoader, String className) Try load classvoidnotifyCheckSerializable(boolean checkSerializable) voidvoidnotifyPrefix(Set<String> allowedList, Set<String> disAllowedList)
-
Constructor Details
-
DefaultSerializeClassChecker
-
-
Method Details
-
notifyPrefix
- Specified by:
notifyPrefixin interfaceAllowClassNotifyListener
-
notifyCheckStatus
- Specified by:
notifyCheckStatusin interfaceAllowClassNotifyListener
-
notifyCheckSerializable
public void notifyCheckSerializable(boolean checkSerializable) - Specified by:
notifyCheckSerializablein interfaceAllowClassNotifyListener
-
loadClass
Try load class- Parameters:
className- class name- Throws:
IllegalArgumentException- if class is blockedClassNotFoundException
-
getInstance
-
isCheckSerializable
public boolean isCheckSerializable()
-