public class DecoderSettings extends Object
Constructor and Description |
---|
DecoderSettings() |
Modifier and Type | Method and Description |
---|---|
static DecoderSettings |
createFullControlSettings()
Settings with all checks enabled.
|
boolean |
enableNarrowingOnRead() |
boolean |
enableNarrowingOnWrite() |
boolean |
enableNullDataReturn()
Checks if the null value can be returned by field value getter.
|
Class<?>[] |
getCustomCompositeClasses()
Custom composite classes.
|
ClassLoader |
getParentLoader()
Parent loader for decoder.
|
DecoderSettings |
makeCopy()
Makes copy of the settings.
|
DecoderSettings |
setCustomCompositeClasses(Class<?>[] customCompositeClasses)
Set custom composite classes.
|
DecoderSettings |
setEnableNarrowingOnRead(boolean enableNarrowingOnRead) |
DecoderSettings |
setEnableNarrowingOnWrite(boolean enableNarrowingOnWrite) |
DecoderSettings |
setEnableNullDataReturn(boolean enableNullDataReturn)
Sets option that controls checking of the null data before return.
|
DecoderSettings |
setParentLoader(ClassLoader parentLoader)
Sets parent loader for decoder.
|
DecoderSettings |
setValidateNarrowingOnRead(boolean validateNarrowingOnRead) |
DecoderSettings |
setValidateNarrowingOnWrite(boolean validateNarrowingOnWrite) |
DecoderSettings |
setValidateValueRanges(boolean validateValueRanges)
Controls raising of exceptions when wrong data occurs.
|
boolean |
validateNarrowingOnRead() |
boolean |
validateNarrowingOnWrite() |
boolean |
validateValueRanges()
Controls raising of exception when wrong data occurs.
|
public boolean validateValueRanges()
WrongValueException
exception when wrong data appear on the wire.
If the option is false (default behavior) the data can be read and returned viw accessors.public DecoderSettings setValidateValueRanges(boolean validateValueRanges)
validateValueRanges
- true if exception should be raised.public boolean enableNullDataReturn()
IFieldSet.getInt(int)
can return value that represents empty (or null)
data. That is default behaviour of the decoder.
If the option is false the NullValueException
will be raised by getters. To prevent exceptions
the content must be checked using 'tryGet' accessors like to the IFieldSet.tryGetInt(int, AtomicInteger)
before access.public DecoderSettings setEnableNullDataReturn(boolean enableNullDataReturn)
enableNullDataReturn()
description for details.enableNullDataReturn
- Value of the option.public ClassLoader getParentLoader()
public DecoderSettings setParentLoader(ClassLoader parentLoader)
parentLoader
- Parent class loader to use by decoder.public Class<?>[] getCustomCompositeClasses()
public DecoderSettings setCustomCompositeClasses(Class<?>[] customCompositeClasses)
customCompositeClasses
- Custom composite classes.public DecoderSettings makeCopy()
public static DecoderSettings createFullControlSettings()
public boolean enableNarrowingOnWrite()
public DecoderSettings setEnableNarrowingOnWrite(boolean enableNarrowingOnWrite)
public boolean validateNarrowingOnWrite()
public DecoderSettings setValidateNarrowingOnWrite(boolean validateNarrowingOnWrite)
public boolean enableNarrowingOnRead()
public DecoderSettings setEnableNarrowingOnRead(boolean enableNarrowingOnRead)
public boolean validateNarrowingOnRead()
public DecoderSettings setValidateNarrowingOnRead(boolean validateNarrowingOnRead)
Copyright © 2005–2025 Onix Solutions. All rights reserved.