Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SessionService

A service for managing connections to other ArgonSystem instances

Hierarchy

  • SessionService

Index

Constructors

constructor

Properties

Private _connectEvent

_connectEvent: Event<SessionPort> = new Event<SessionPort>()

Private _managedSessions

_managedSessions: SessionPort[] = []

configuration

configuration: Configuration

The configuration of this ArgonSystem

Private connectService

connectService: ConnectService

errorEvent

errorEvent: Event<Error> = new Event<Error>()

An event that is raised when an error occurs.

manager

manager: SessionPort = this.createSessionPort('argon:manager')

The port which handles communication between this session and the manager session.

Private messageChannelFactory

messageChannelFactory: MessageChannelFactory

Private sessionPortFactory

sessionPortFactory: SessionPortFactory

Accessors

connectEvent

Private isApplication

  • get isApplication(): boolean

Private isManager

  • get isManager(): boolean

isRealityAugmenter

  • get isRealityAugmenter(): boolean

isRealityManager

  • get isRealityManager(): boolean

Private isRealityView

  • get isRealityView(): boolean

isRealityViewer

  • get isRealityViewer(): boolean

managedSessions

Methods

addManagedSessionPort

  • Manager-only. Creates a SessionPort that is managed by the current ArgonSystem. Session ports that are managed will automatically forward open events to [[SessionService#sessionConnectEvent]] and error events to [[SessionService#errorEvent]]. Other services that are part of the current ArgonSystem are likely to add message handlers to a newly connected SessionPort.

    Parameters

    • uri: string

    Returns SessionPort

    a new SessionPort instance

connect

  • connect(): void

createMessageChannel

createSessionPort

createSynchronousMessageChannel

ensureConnected

  • ensureConnected(): void
  • Throws an error if the connection to the manager is closed

    Returns void

ensureIsRealityManager

  • ensureIsRealityManager(): void

ensureIsRealityViewer

  • ensureIsRealityViewer(): void

ensureNotRealityAugmenter

  • ensureNotRealityAugmenter(): void

ensureNotRealityViewer

  • ensureNotRealityViewer(): void

Generated using TypeDoc