Class SerializeOptions.Builder
java.lang.Object
org.jolokia.server.core.service.serializer.SerializeOptions.Builder
- Enclosing class:
- SerializeOptions
Builder for constructing a convert options objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the convert options and reset this builderfaultHandler(ValueFaultHandler pFaultHandler) Set the handler which determines what should be done when extracting of a value fails.maxCollectionSize(int pMaxCollectionSize) Set the maximal size of collections when serializing collections.maxDepth(int pMaxDepth) Set the maximum depth for how deep serialization should go.maxObjects(int pMaxObjects) Set the maximum number of objects to serialize.serializeLong(String pSerializeLong) Set how to serialize long values.useAttributeFilter(boolean pUseFilter) Whether an attribute filter should be used to ignore missing attributes when a path is applied
-
Constructor Details
-
Builder
public Builder()Default constructor using default hard limits -
Builder
public Builder(int pHardMaxDepth, int pHardMaxCollectionSize, int pHardMaxObjects) Constructor with hard limits. No value set later on this builder can be larger than these limits.- Parameters:
pHardMaxDepth- hard limit for maxDepthpHardMaxCollectionSize- hard limit for maxCollectionSizepHardMaxObjects- hard limit for maxObjects.
-
-
Method Details
-
maxDepth
Set the maximum depth for how deep serialization should go. The number cannot be set larger than the hard limit given in the constructor- Parameters:
pMaxDepth- maximal depth when traversing an object tree during serialization.- Returns:
- this builder
-
maxCollectionSize
Set the maximal size of collections when serializing collections. The number cannot be set larger than the hard limit given in the constructor.- Parameters:
pMaxCollectionSize- maximum size of objects returned in a serialized collection- Returns:
- this builder
-
maxObjects
Set the maximum number of objects to serialize. The number cannot be set larger than the hard limit given in the constructor.- Parameters:
pMaxObjects- maximum number of objects- Returns:
- this builder
-
serializeLong
Set how to serialize long values. Can be either "number" or "string".- Parameters:
pSerializeLong- how to serialize long values- Returns:
- this builder
-
faultHandler
Set the handler which determines what should be done when extracting of a value fails.- Parameters:
pFaultHandler- handler to use which can be eitherValueFaultHandler.THROWING_VALUE_FAULT_HANDLERorValueFaultHandler.THROWING_VALUE_FAULT_HANDLER. If argument is null, it is ignored- Returns:
- this builder
-
useAttributeFilter
Whether an attribute filter should be used to ignore missing attributes when a path is applied- Parameters:
pUseFilter- if a filter should be used or not- Returns:
- this builder
-
build
Build the convert options and reset this builder- Returns:
- the options created.
-