Class RegistrationNotRequiredKryoContextResolver
- java.lang.Object
-
- org.glassfish.jersey.kryo.internal.RegistrationNotRequiredKryoContextResolver
-
- All Implemented Interfaces:
ContextResolver<com.esotericsoftware.kryo.Kryo>
public class RegistrationNotRequiredKryoContextResolver extends Object implements ContextResolver<com.esotericsoftware.kryo.Kryo>
Backwards compatibility ContextResolver. It should only be used when the user specifically agrees on a vulnerability provided when theKryoFeature#registrationRequired(false)is used. The default behaviour is demanded to requireContextResolverwithpublic Kryo getContext(Class> type) { ... Kryo kryo = new Kryo(); kryo.setRegistrationRequired(true); kryo.register(The_class_for_which_the_KryoMessageBodyProvider_should_be_allowed); ... return kryo; }
-
-
Constructor Summary
Constructors Constructor Description RegistrationNotRequiredKryoContextResolver()
-
-
-
Method Detail
-
getContext
public com.esotericsoftware.kryo.Kryo getContext(Class<?> type)
- Specified by:
getContextin interfaceContextResolver<com.esotericsoftware.kryo.Kryo>
-
-