YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.sendspin.session.ControllerServerMessages Class Reference

The server's side of the controller and metadata roles (issue #325, K15): the server/state with its controller and metadata objects, and the reading of a controller's client/command. More...

Collaboration diagram for de.yaacc.sendspin.session.ControllerServerMessages:
Collaboration graph

Classes

class  ColorView
 The color object of server/state: six colours [R, G, B] (0 to 255) and the server time they take effect.
 
class  Command
 A client/command of a controller: the command and its parameter, as far as it has one.
 
class  ControllerView
 The controller object of server/state.
 
class  MetadataView
 The metadata object of server/state.
 
class  Progress
 The progress of the metadata object.
 

Static Public Member Functions

static String serverState (ControllerView controller, MetadataView metadata)
 server/state with the given objects (a null object is omitted, which leaves that state unchanged on the client).
 
static String serverState (ControllerView controller, MetadataView metadata, ColorView color)
 As serverState(ControllerView, MetadataView), with the color object of the colour role.
 
static Command parseCommand (JSONObject payload) throws ProtocolException
 Reads the controller object of a client/command.
 

Detailed Description

The server's side of the controller and metadata roles (issue #325, K15): the server/state with its controller and metadata objects, and the reading of a controller's client/command.

The client is untrusted: every number is range checked and a violation is a ProtocolException; what the server sends respects the limits of the protocol (texts are clipped on a character boundary, an over long URL is left out). Pure.

Member Function Documentation

◆ parseCommand()

static Command de.yaacc.sendspin.session.ControllerServerMessages.parseCommand ( JSONObject payload) throws ProtocolException
static

Reads the controller object of a client/command.

Exceptions
ProtocolExceptionif the object, the command or the parameter that the command needs is missing or out of range

Referenced by de.yaacc.sendspin.control.ControllerHost.Session.command().

Here is the caller graph for this function:

The documentation for this class was generated from the following file: