Package

protocbridge

frontend

Permalink

package frontend

Visibility
  1. Public
  2. All

Type Members

  1. trait PluginFrontend extends AnyRef

    Permalink

    A PluginFrontend instance provides a platform-dependent way for protoc to communicate with a JVM based ProtocCodeGenerator.

    A PluginFrontend instance provides a platform-dependent way for protoc to communicate with a JVM based ProtocCodeGenerator.

    protoc is able to launch plugins. Plugins are executables that take a serialized CodeGenerationRequest via stdin and serialize a CodeGenerationRequest to stdout. The idea in PluginFrontend is to create a minimal plugin that wires its stdin/stdout to this JVM.

    The two-way communication always goes as follows:

    1. protoc writes a request to the stdin of a plugin 2. plugin writes the data to the channel 3. this JVM reads it, interprets it as CodeGenerationRequest and process it. 4. this JVM writes a CodeGenerationResponse to the channel 5. this JVM closes the channel. 6. the plugin reads the data and writes it to standard out. 7. protoc handles the CodeGenerationResponse (creates Scala sources)

  2. class WindowsPluginFrontend extends PluginFrontend

    Permalink

    A PluginFrontend that binds a server socket to a local interface.

    A PluginFrontend that binds a server socket to a local interface. The plugin is a batch script that invokes Python, which will communicate its stdin and stdout to this socket.

Value Members

  1. object PluginFrontend

    Permalink
  2. object PosixPluginFrontend extends PluginFrontend

    Permalink

    PluginFrontend for Unix-like systems (Linux, Mac, etc)

    PluginFrontend for Unix-like systems (Linux, Mac, etc)

    Creates a pair of named pipes for input/output and a shell script that communicates with them.

Ungrouped