Package com.oracle.coherence.cdi
Class SerializerProducer
- java.lang.Object
-
- com.oracle.coherence.cdi.SerializerProducer
-
- All Implemented Interfaces:
NamedSerializerFactory
@ApplicationScoped public class SerializerProducer extends Object implements NamedSerializerFactory
A CDI producer ofSerializerinstances.- Since:
- 20.06
- Author:
- Jonathan Knight 2019.11.20
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSerializerProducer.BuilderA builder that buildsSerializerProducerinstances.
-
Field Summary
-
Fields inherited from interface com.tangosol.io.NamedSerializerFactory
DEFAULT
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SerializerProducer.Builderbuilder()Create an instance of aSerializerProducer.Builder.static SerializerProducercreate()Create an instance ofSerializerProducer.SerializergetDefaultSerializer(javax.enterprise.inject.spi.InjectionPoint ip)Produces an instance of the defaultSerializer.SerializergetNamedSerializer(String sName, ClassLoader loader)Produces instances of a namedSerializer.SerializergetNamedSerializer(javax.enterprise.inject.spi.InjectionPoint ip)Produces instances of a namedSerializer.
-
-
-
Method Detail
-
create
public static SerializerProducer create()
Create an instance ofSerializerProducer.- Returns:
- an instance of
SerializerProducer
-
builder
public static SerializerProducer.Builder builder()
Create an instance of aSerializerProducer.Builder.- Returns:
- an instance of
SerializerProducer.Builder
-
getDefaultSerializer
@Produces public Serializer getDefaultSerializer(javax.enterprise.inject.spi.InjectionPoint ip)
Produces an instance of the defaultSerializer.- Parameters:
ip- theInjectionPointthat theSerializerwill be injected into- Returns:
- an instance of the default
Serializer
-
getNamedSerializer
@Produces @Name("") @ConfigUri("") public Serializer getNamedSerializer(javax.enterprise.inject.spi.InjectionPoint ip)
Produces instances of a namedSerializer.Named Serializers are first looked up in the Coherence operational configuration and if not found there they will be looked up in as a
NamedCDI bean of typeSerializer.- Parameters:
ip- theInjectionPointthat theSerializerwill be injected into- Returns:
- an instance of a named
Serializer
-
getNamedSerializer
public Serializer getNamedSerializer(String sName, ClassLoader loader)
Produces instances of a namedSerializer.- Specified by:
getNamedSerializerin interfaceNamedSerializerFactory- Parameters:
sName- the name of the serializerloader- theClassLoaderto use to create aSerializer- Returns:
- an instance of a named
Serializer - Throws:
NullPointerException- if the name parameter is nullIllegalArgumentException- if no serializer is discoverable with the specified name
-
-