Class | PhusionPassenger::Rack::ApplicationSpawner
In: | lib/phusion_passenger/rack/application_spawner.rb
Parent: | AbstractServer

Spawning of Rack applications.

### Methods

new spawn_application spawn_application start

### Included Modules

Utils DebugLogging

### Classes and Modules

Class PhusionPassenger::Rack::ApplicationSpawner::Error

### Public Class methods

new(options)

The following options are accepted:

- ‘app_root‘

See SpawnManager#spawn_application for information about the options.

spawn_application(options = {})

Spawn an instance of the given Rack application. When successful, an AppProcess object will be returned, which represents the spawned application.

Accepts the same options as SpawnManager#spawn_application.

Raises:

- AppInitError: The Rack application raised an exception or called exit() during startup.
- SystemCallError, IOError, SocketError: Something went wrong.

### Public Instance methods

spawn_application(options = {})

Spawns an instance of the Rack application. When successful, an AppProcess object will be returned, which represents the spawned Rack application.

`options` will be passed to the request handler‘s constructor.

Raises:

- AbstractServer::ServerNotStarted: The ApplicationSpawner server hasn‘t already been started.
- ApplicationSpawner::Error: The ApplicationSpawner server exited unexpectedly.

start()

Overrided from AbstractServer#start.

May raise these additional exceptions:

- AppInitError: The Rack application raised an exception or called exit() during startup.
- ApplicationSpawner::Error: The ApplicationSpawner server exited unexpectedly.

[Validate]