org.terminal21.client

Members list

Type members

Classlikes

class ClientEventsWsListener(wsClient: WsClient, session: ConnectedSession, executor: FiberExecutor)

Attributes

Supertypes
class Object
trait Matchable
class Any
class ConnectedSession(val session: Session, encoding: UiElementEncoding, val serverUrl: String, sessionsService: SessionsService, onCloseHandler: () => Unit)

A session connected to the terminal21 server.

A session connected to the terminal21 server.

Value parameters

encoding

json encoder for UiElements

onCloseHandler

gets notified when the user closes the session

serverUrl

the url of the server

session

the session

sessionsService

the service to talk to the server

Attributes

Supertypes
class Object
trait Matchable
class Any
class Controller[M](eventIteratorFactory: => Iterator[CommandEvent], renderChanges: (Seq[UiElement]) => Unit, modelViewFunction: () => M)

Controller manages the changes in the model by receiving events. Also the rendering of the view (which is UiElements).

Controller manages the changes in the model by receiving events. Also the rendering of the view (which is UiElements).

Type parameters

M

the type of the model

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object Controller

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Controller.type
case class Events(event: CommandEvent)

Wraps an event and has useful methods to process it.

Wraps an event and has useful methods to process it.

Value parameters

event

CommandEvent (like clicks, changed values, ClientEvent etc)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Events

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Events.type
case class MV[M](model: M, view: Seq[UiElement], terminate: Boolean)

The ModelViewFunction should return this, which contains the changes to the model, the changed view and if the event iteration should terminate.

The ModelViewFunction should return this, which contains the changes to the model, the changed view and if the event iteration should terminate.

Type parameters

M

the type of the model

Value parameters

model

the value of the model after processing the event

terminate

if true, the event iteration will terminate

view

the value of the view after processing the event

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object MV

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
MV.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Controller[Unit]
class RenderedController[M](eventIteratorFactory: => Iterator[CommandEvent], renderChanges: (Seq[UiElement]) => Unit, materializer: () => M, initialMv: MV[M])

Attributes

Supertypes
class Object
trait Matchable
class Any
object Sessions

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Sessions.type

Types

type ModelViewFunction[M] = (M, Events) => MV[M]

The initial function passed on to a controller in order to create the MVC iterator.

The initial function passed on to a controller in order to create the MVC iterator.

Type parameters

M

the type of the model

Attributes

Value members

Concrete fields

val fiberExecutor: FiberExecutor

Givens

Givens

given given_FiberExecutor: FiberExecutor