All Downloads are FREE. Search and download functionalities are using the official Maven repository.

loci.runtime.GatewayConnection.scala Maven / Gradle / Ivy

The newest version!
package loci
package runtime

import communicator._
import messaging._

final class GatewayConnection[R, M](
  peer: Peer.Signature,
  system: System)
    extends language.transmitter.Connection[R, M] {

  private[this] val peerId: AnyRef = (system, peer)

  @inline private[loci] def cache[B <: AnyRef](id: Any, body: => B): B =
    system.cache((peerId, id), body)

  @inline private[loci] val remoteJoined: Notice.Stream[Remote[R]] =
    system.remoteJoined(peer, Seq.empty, earlyAccess = false)

  @inline private[loci] val remoteLeft: Notice.Stream[Remote[R]] =
    system.remoteLeft(peer, Seq.empty, earlyAccess = false)

  @inline private[loci] def remoteReferences: Seq[Remote[R]] =
    system.remoteReferences(peer, Seq.empty, earlyAccess = false)

  @inline private[loci] def remoteConnect(connector: Connector[ConnectionsBase.Protocol]): Unit =
    system.connect(peer, connector)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy