Trait

ml.combust.bundle.serializer.custom

CustomType

Related Doc: package custom

Permalink

trait CustomType[T] extends AnyRef

Type class for a custom object.

Custom objects can be serialized in an ml.combust.bundle.dsl.AttributeList as an ml.combust.bundle.dsl.Value. They must provide a JSON serialization as well as a compact byte representation.

T

Scala class of custom type

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CustomType
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def format: RootJsonFormat[T]

    Permalink

    Get the Spray JSON format for the custom type.

    Get the Spray JSON format for the custom type.

    This is the formatter used for serializing/deserializing the custom type with JSON.

    returns

    Spray JSON format

  2. abstract def fromBytes(bytes: Array[Byte]): T

    Permalink

    Convert compact bytes to custom object.

    Convert compact bytes to custom object.

    bytes

    compact byte array

    returns

    deserialized custom object

  3. abstract def name: String

    Permalink

    Get name of the custom type.

    Get name of the custom type.

    This can be anything as long as it is unique among custom types

    returns

    name of the custom type

  4. abstract def toBytes(obj: T): Array[Byte]

    Permalink

    Convert custom object to compact byte array.

    Convert custom object to compact byte array.

    obj

    custom object

    returns

    compact byte array serialization of obj

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def bytesSerializer: CustomBytesSerializer[T]

    Permalink

    Get compact byte serializer.

    Get compact byte serializer.

    returns

    compact byte serializer for custom object

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def formatSerializer(implicit format: HasConcreteSerializationFormat): CustomSerializer[T]

    Permalink

    Get custom object serializer specific to implicit ml.combust.bundle.serializer.ConcreteSerializationFormat.

    Get custom object serializer specific to implicit ml.combust.bundle.serializer.ConcreteSerializationFormat.

    format

    concrete serialization format determines which serializer to return

    returns

    custom object serializer for given concrete format

  11. def fromJsonBytes(bytes: Array[Byte]): T

    Permalink

    Convert byte array of JSON to custom object.

    Convert byte array of JSON to custom object.

    bytes

    JSON byte array

    returns

    deserialized custom object

  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. def isLarge(obj: T): Boolean

    Permalink

    Whether or not this object is large when serialized.

    Whether or not this object is large when serialized.

    obj

    custom object

    returns

    true if large byte size when serialized, false otherwise

  16. def isSmall(obj: T): Boolean

    Permalink

    Whether or not this object is small when serialized.

    Whether or not this object is small when serialized.

    obj

    custom object

    returns

    true if small byte size when serialized, false otherwise

  17. def jsonSerializer: CustomJsonSerializer[T]

    Permalink

    Get JSON serializer.

    Get JSON serializer.

    returns

    JSON serialize for custom object

  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  22. def toJsonBytes(obj: T): Array[Byte]

    Permalink

    Convert object to byte array of JSON.

    Convert object to byte array of JSON.

    obj

    custom object

    returns

    byte array of JSON

  23. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped