Package com.oracle.coherence.cdi
Class SerializerProducer
java.lang.Object
com.oracle.coherence.cdi.SerializerProducer
- All Implemented Interfaces:
NamedSerializerFactory
A CDI producer of
Serializer
instances.- Since:
- 20.06
- Author:
- Jonathan Knight 2019.11.20
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder that buildsSerializerProducer
instances. -
Field Summary
Fields inherited from interface com.tangosol.io.NamedSerializerFactory
DEFAULT
-
Method Summary
Modifier and TypeMethodDescriptionstatic SerializerProducer.Builder
builder()
Create an instance of aSerializerProducer.Builder
.static SerializerProducer
create()
Create an instance ofSerializerProducer
.getDefaultSerializer
(jakarta.enterprise.inject.spi.InjectionPoint ip) Produces an instance of the defaultSerializer
.getNamedSerializer
(jakarta.enterprise.inject.spi.InjectionPoint ip) Produces instances of a namedSerializer
.getNamedSerializer
(String sName, ClassLoader loader) Produces instances of a namedSerializer
.
-
Method Details
-
create
Create an instance ofSerializerProducer
.- Returns:
- an instance of
SerializerProducer
-
builder
Create an instance of aSerializerProducer.Builder
.- Returns:
- an instance of
SerializerProducer.Builder
-
getDefaultSerializer
Produces an instance of the defaultSerializer
.- Parameters:
ip
- theInjectionPoint
that theSerializer
will be injected into- Returns:
- an instance of the default
Serializer
-
getNamedSerializer
@Produces @Name("") @ConfigUri("") public Serializer getNamedSerializer(jakarta.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
Named
CDI bean of typeSerializer
.- Parameters:
ip
- theInjectionPoint
that theSerializer
will be injected into- Returns:
- an instance of a named
Serializer
-
getNamedSerializer
Produces instances of a namedSerializer
.- Specified by:
getNamedSerializer
in interfaceNamedSerializerFactory
- Parameters:
sName
- the name of the serializerloader
- theClassLoader
to 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
-