trait MutableSchemaBasedValueProcessor[Target, Context] extends AnyRef
Base trait for mutable value processors, processing a value with a known schema. An example is protocol encoders.
The implementation is stack safe and consists of invocations of a series of processXYZ methods, as well as built-in support for a context value which is handled in a stacked way.
Maintaining any global state (per process) such as stream writers etc. is the responsibility of the implementation class.
The Target type parameter is the base type for the process function's output value. In case the process is built entirely using side effects (such as calls to a mutable writer interface) this type can be Unit.
The Context type parameter is the use-case specific context type which is passed for each process invocation, and can be manipulated before each process call achieving a local state.
- Alphabetic
- By Inheritance
- MutableSchemaBasedValueProcessor
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def contextForEither(context: Context, e: Either[Unit, Unit]): Context
Gets the context for an either's left or right value within the parent context
Gets the context for an either's left or right value within the parent context
- Attributes
- protected
- abstract def contextForEnumConstructor(context: Context, index: Int, c: Case[_, _]): Context
Gets the context for an enum's given constructor within the parent context
Gets the context for an enum's given constructor within the parent context
- Attributes
- protected
- abstract def contextForMap(context: Context, schema: Map[_, _], index: Int): Context
Gets the context for a dictionary's given element within the parent context
Gets the context for a dictionary's given element within the parent context
- Attributes
- protected
- abstract def contextForOption(context: Context, o: Option[Unit]): Context
Gets the context for an option's inner value within the parent context
Gets the context for an option's inner value within the parent context
- Attributes
- protected
- abstract def contextForRecordField(context: Context, index: Int, field: Field[_, _]): Context
Gets the context for a record's given field within the parent context
Gets the context for a record's given field within the parent context
- Attributes
- protected
- abstract def contextForSequence(context: Context, schema: Sequence[_, _, _], index: Int): Context
Gets the context for a sequence's given element within the parent context
Gets the context for a sequence's given element within the parent context
- Attributes
- protected
- abstract def contextForSet(context: Context, schema: Set[_], index: Int): Context
Gets the context for a set's given element within the parent context
Gets the context for a set's given element within the parent context
- Attributes
- protected
- abstract def contextForTuple(context: Context, index: Int): Context
Gets the context for a tuple's given field within the parent context
Gets the context for a tuple's given field within the parent context
- Attributes
- protected
- abstract def fail(context: Context, message: String): Target
Fails the processing
Fails the processing
- Attributes
- protected
- abstract val initialContext: Context
The initial (top-level) context value
The initial (top-level) context value
- Attributes
- protected
- abstract def processDictionary(context: Context, schema: Map[_, _], value: Chunk[(Target, Target)]): Target
* Process a dictionary using its already processed key-value pairs
* Process a dictionary using its already processed key-value pairs
- Attributes
- protected
- abstract def processDynamic(context: Context, value: DynamicValue): Option[Target]
Process a dynamic value.
Process a dynamic value. If the result is None it indicates that the processor has no built-in support for dynamic values, and the Dynamic value's schema should be used instead.
- Attributes
- protected
- abstract def processEither(context: Context, schema: Either[_, _], value: Either[Target, Target]): Target
Process an either value using its already processed left or right value
Process an either value using its already processed left or right value
- Attributes
- protected
- abstract def processEnum(context: Context, schema: Enum[_], tuple: (String, Target)): Target
Process an enum in the given context with the given schema using the processed constructor value and it's name
Process an enum in the given context with the given schema using the processed constructor value and it's name
- Attributes
- protected
- abstract def processOption(context: Context, schema: Optional[_], value: Option[Target]): Target
Process an optional value using its already processed inner value, or None
Process an optional value using its already processed inner value, or None
- Attributes
- protected
- abstract def processPrimitive(context: Context, value: Any, typ: StandardType[Any]): Target
Process a primitive value
Process a primitive value
- Attributes
- protected
- abstract def processRecord(context: Context, schema: Record[_], value: ListMap[String, Target]): Target
Process a record in the given context with the given schema, using the already processed values of its fields.
Process a record in the given context with the given schema, using the already processed values of its fields.
- Attributes
- protected
- abstract def processSequence(context: Context, schema: Sequence[_, _, _], value: Chunk[Target]): Target
Process a sequence using its already processed elements
Process a sequence using its already processed elements
- Attributes
- protected
- abstract def processSet(context: Context, schema: Set[_], value: Set[Target]): Target
Process a set using its already processed elements
Process a set using its already processed elements
- Attributes
- protected
- abstract def processTuple(context: Context, schema: Tuple2[_, _], left: Target, right: Target): Target
Process a tuple using its already processed left and right values
Process a tuple using its already processed left and right values
- Attributes
- protected
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def process[A](schema: Schema[A], value: A): Target
Process a value based on it's schema
- def startProcessingDictionary(context: Context, schema: Map[_, _], size: Int): Unit
Called before processing a dictionary
Called before processing a dictionary
- Attributes
- protected
- Annotations
- @nowarn()
- def startProcessingEither(context: Context, schema: Either[_, _]): Unit
Called before processing and either value
Called before processing and either value
- Attributes
- protected
- Annotations
- @nowarn()
- def startProcessingEnum(context: Context, schema: Enum[_]): Unit
Called before processing an enum
Called before processing an enum
- Attributes
- protected
- Annotations
- @nowarn()
- def startProcessingOption(context: Context, schema: Optional[_]): Unit
Called before processing an option value
Called before processing an option value
- Attributes
- protected
- Annotations
- @nowarn()
- def startProcessingRecord(context: Context, schema: Record[_]): Unit
Called before processing a record (before calling processXYZ for the record's fields)
Called before processing a record (before calling processXYZ for the record's fields)
- Attributes
- protected
- Annotations
- @nowarn()
- def startProcessingSequence(context: Context, schema: Sequence[_, _, _], size: Int): Unit
Called before processing a sequence
Called before processing a sequence
- Attributes
- protected
- Annotations
- @nowarn()
- def startProcessingSet(context: Context, schema: Set[_], size: Int): Unit
Called before processing a set
Called before processing a set
- Attributes
- protected
- Annotations
- @nowarn()
- def startProcessingTuple(context: Context, schema: Tuple2[_, _]): Unit
Called before processing a pair of values
Called before processing a pair of values
- Attributes
- protected
- Annotations
- @nowarn()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()