Packages

c

bloop.launcher.bsp

BspBridge

final class BspBridge extends AnyRef

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BspBridge
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BspBridge(clientIn: InputStream, clientOut: OutputStream, startedServer: Promise[Unit], out: PrintStream, shell: Shell, launcherTmpDir: Path)

Type Members

  1. case class RunningBspConnection(bsp: BspConnection, logs: ListBuffer[String]) extends Product with Serializable

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. def connectToOpenSession(serverConnection: BspConnection): Option[Socket]

    Open a client session from the launcher when a bsp server session is available.

    Open a client session from the launcher when a bsp server session is available.

    A bloop bsp / embedded bsp cli invocation opens a bsp server session, but we still need to connect to it so that we can redirect stdin/stdout as the BSP server discovery protocol mandates.

    serverConnection

    An open bsp server connection.

    returns

    A socket if the connection succeeded, none otherwise.

  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def establishBspConnectionViaBinary(bloopServerCmd: List[String], useTcp: Boolean, attempts: Int = 1): RunningBspConnection

    Establish a bsp connection by telling the background server to open a BSP session.

    Establish a bsp connection by telling the background server to open a BSP session.

    This routine is only called when a background server is running. The retry logic and the waits are done because the server might be still starting up and the bsp command may fail.

    The bsp connection will be attempted 5 times with several delays in between. When more than 3 local connections have failed in non Windows systems, we use TCP for the two remaining. After the 5 attempts, we just fail.

    bloopServerCmd

    The command we use to run

    useTcp

    Whether TCP should be always used or not.

    attempts

    How many attempts are allowed before failing to establish a connection.

    returns

    An open bsp connection that we need to poll.

  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. def resetServerStatus(): Unit
  18. def runEmbeddedBspInvocationInBackground(classpath: Seq[Path], forceTcp: Boolean, jvmOptions: List[String]): RunningBspConnection
  19. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  24. def waitForOpenBsp(conn: RunningBspConnection, attempts: Int = 0): Option[BspConnection]
  25. def wireBspConnectionStreams(socket: Socket): Unit

    Wires the client streams with the server streams so that they can communicate to each other.

    Wires the client streams with the server streams so that they can communicate to each other.

    After a connection has been successfully established, we create two threads that will pump contents in the streams in and out in a way that the server receives everything that we read and the client receives everything we read from the server socket stream.

    This operation is the last thing the launcher does to set up a bsp connection. We don't care if the operation succeeds or fails nor we have a way to know if an error is legit. If an error happens we report it but return with a successful exit code.

    socket

    The socket connection established with the server.

Inherited from AnyRef

Inherited from Any

Ungrouped