Packages

  • package root
    Definition Classes
    root
  • package csw
    Definition Classes
    root
  • package messages

    This project is intended to hold reusable models and messages used throughout the csw source code.

    Messages

    This project is intended to hold reusable models and messages used throughout the csw source code.

    This also provides out of the box support to cater to the diverse communication requirements. Consumer of this library will be able to create Commands, Events, States to store ParameterSets.

    Imp Packages

    Commands and Events

    This packages contains classes, traits and models used to create *commands* and *events*. These are all based on type-safe keys and items (a set of values with optional units). Each key has a specific type and the key's values must be of that type.

    Two types of csw.messages.commands.Command are supported:

    Following are the concrete commands supported by csw:

    Two types of csw.messages.events.Event are supported:

    Another important feature provided by *commands* package is csw.messages.commands.matchers.Matcher One of the use case for using matcher is when Assembly sends csw.messages.CommandMessage.Oneway command to HCD and in response to this command HCD keeps publishing its current state. Then Assembly can use Matcher with the matching definition as provided by csw.messages.commands.matchers.StateMatcher to match against the current states published by HCD.

    Location and Framework

    These packages contain reusable classes, traits and models. We are keeping all the models which are getting transferred over the wire and requires serialization and deserialization in csw-messages project. All the models are marked with csw.messages.TMTSerializable. csw.messages.TMTSerializable is a marker trait which extends scala.Serializable. This is configured to use kryo serialization. Also these models are being shared between multiple projects. csw-location, csw-framework and csw-logging depends on csw-messages project which uses these models.

    Location Service uses csw.messages.location.Connection model to register component/container of type:

    When you resolve/find a csw.messages.location.Connection, you get csw.messages.location.Location in return which can be one of below type:

    Framework package contains following actor messages:

    Params

    This package supports serialization and deserialization of commands, events and state variables in following formats:

    Scala and Java APIs

    All the param and event classes are immutable. The set methods return a new instance of the object with a new item added and the get methods return an Option, in case the Key is not found. There are also value methods that return a value directly, throwing an exception if the key or value is not found.

    Key Types

    A set of standard key types and matching items are defined. Each key accepts one or more values of the given type.

    Following csw.messages.params.generics.KeyType are supported by csw:

    +--------------+-------------------------+---------------------------+
    |  Primitive   |      Scala KeyType      |       Java KeyType        |
    +--------------+-------------------------+---------------------------+
    | Boolean      | KeyType.BooleanKey      | JKeyTypes.BooleanKey      |
    | Character    | KeyType.CharKey         | JKeyTypes.JCharKey        |
    | Byte         | KeyType.ByteKey         | JKeyTypes.ByteKey         |
    | Short        | KeyType.ShortKey        | JKeyTypes.ShortKey        |
    | Long         | KeyType.LongKey         | JKeyTypes.LongKey         |
    | Int          | KeyType.IntKey          | JKeyTypes.IntKey          |
    | Float        | KeyType.FloatKey        | JKeyTypes.FloatKey        |
    | Double       | KeyType.DoubleKey       | JKeyTypes.DoubleKey       |
    | String       | KeyType.StringKey       | JKeyTypes.StringKey       |
    | Timestamp    | KeyType.TimestampKey    | JKeyTypes.TimestampKey    |
    | ----------   | ----------              | ----------                |
    | ByteArray    | KeyType.ByteArrayKey    | JKeyTypes.ByteArrayKey    |
    | ShortArray   | KeyType.ShortArrayKey   | JKeyTypes.ShortArrayKey   |
    | LongArray    | KeyType.LongArrayKey    | JKeyTypes.LongArrayKey    |
    | IntArray     | KeyType.IntArrayKey     | JKeyTypes.IntArrayKey     |
    | FloatArray   | KeyType.FloatArrayKey   | JKeyTypes.FloatArrayKey   |
    | DoubleArray  | KeyType.DoubleArrayKey  | JKeyTypes.DoubleArrayKey  |
    | ----------   | ----------              | ----------                |
    | ByteMatrix   | KeyType.ByteMatrixKey   | JKeyTypes.ByteMatrixKey   |
    | ShortMatrix  | KeyType.ShortMatrixKey  | JKeyTypes.ShortMatrixKey  |
    | LongMatrix   | KeyType.LongMatrixKey   | JKeyTypes.LongMatrixKey   |
    | IntMatrix    | KeyType.IntMatrixKey    | JKeyTypes.IntMatrixKey    |
    | FloatMatrix  | KeyType.FloatMatrixKey  | JKeyTypes.FloatMatrixKey  |
    | DoubleMatrix | KeyType.DoubleMatrixKey | JKeyTypes.DoubleMatrixKey |
    | ----------   | ----------              | ----------                |
    | Choice       | KeyType.ChoiceKey       | JKeyTypes.ChoiceKey       |
    | RaDec        | KeyType.RaDecKey        | JKeyTypes.RaDecKey        |
    | Struct       | KeyType.StructKey       | JKeyTypes.StructKey       |
    +--------------+-------------------------+---------------------------+

    Detailed information about creating Keys and Parameters can be found here: https://tmtsoftware.github.io/csw-prod/services/messages/keys-parameters.html

    Detailed information about creating commands can be found here: https://tmtsoftware.github.io/csw-prod/services/messages/commands.html

    Detailed information about creating events can be found here: https://tmtsoftware.github.io/csw-prod/services/messages/events.html

    Definition Classes
    csw
  • package params
    Definition Classes
    messages
  • package formats
    Definition Classes
    params
  • JavaJsonSupport
  • JsonSupport

trait JsonSupport extends AnyRef

Supports conversion of commands, state variables and events to/from JSON

Self Type
JsonSupport with DerivedJsonFormats with WrappedArrayProtocol
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JsonSupport
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  6. lazy val commandTypeFormat: Format[CommandName]
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. lazy val eventNameFormat: Format[EventName]
  10. lazy val eventTimeFormat: Format[EventTime]
  11. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. lazy val idFormat: Format[Id]
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. lazy val obsIdFormat: Format[Option[ObsId]]
  20. lazy val paramSetFormat: Format[Set[Parameter[_]]]
  21. lazy val prefixFormat: Format[Prefix]
  22. def readEvent[A <: Event](json: JsValue): A

    Reads an event back from JSON

    Reads an event back from JSON

    A

    the type of the event (use Any and match on the type if you don't know)

    json

    the parsed JSON

    returns

    an instance of the given event type, or an exception if the JSON is not valid for that type

  23. def readResult(json: JsValue): Result

    Reads a Result back from JSON

    Reads a Result back from JSON

    json

    the parsed JSON

    returns

    an instance of Result, or an exception if the JSON is not valid for that type

  24. def readSequenceCommand[A <: SequenceCommand](json: JsValue): A

    Reads a SequenceCommand back from JSON

    Reads a SequenceCommand back from JSON

    A

    the type of the command (implied)

    json

    the parsed JSON

    returns

    an instance of the given SequenceCommand type, or an exception if the JSON is not valid for that type

  25. def readStateVariable[A <: StateVariable](json: JsValue): A

    Reads a StateVariable back from JSON

    Reads a StateVariable back from JSON

    A

    the type of the StateVariable (implied)

    json

    the parsed JSON

    returns

    an instance of the given StateVariable, or an exception if the JSON is not valid for that type

  26. implicit val sequenceCommandFormat: Format[SequenceCommand]
  27. lazy val stateNameFormat: Format[StateName]
  28. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  33. def writeEvent[A <: Event](event: A): JsValue

    Writes an event to JSON

    Writes an event to JSON

    A

    the type of the event (implied)

    event

    any instance of EventType

    returns

    a JsValue object representing the event

  34. def writeResult(result: Result): JsValue

    Writes a Result to JSON

    Writes a Result to JSON

    result

    any instance of Result

    returns

    a JsValue object representing the Result

  35. def writeSequenceCommand[A <: SequenceCommand](result: A): JsValue

    Writes a SequenceParameterSet to JSON

    Writes a SequenceParameterSet to JSON

    A

    the type of the command (implied)

    result

    any instance of SequenceCommand

    returns

    a JsValue object representing the SequenceCommand

  36. def writeStateVariable[A <: StateVariable](stateVariable: A): JsValue

    Writes a state variable to JSON

    Writes a state variable to JSON

    A

    the type of the StateVariable (implied)

    stateVariable

    any instance of StateVariable

    returns

    a JsValue object representing the StateVariable

Inherited from AnyRef

Inherited from Any

Ungrouped