const classafBounce::BedServer

sys::Obj
  afBounce::BedServer

Initialises a Bed App without the overhead of starting the wisp web server.

BedServer is a const class so it may be used in multiple threads. Do this to create BedClients in different threads to make concurrent calls - handy for load testing.

addModule

Source

BedServer addModule(Type iocModule)

Add extra (test) modules should you wish to override behaviour in your tests

addModulesFromDependencies

Source

BedServer addModulesFromDependencies(Pod dependency)

autobuild

Source

Obj autobuild(Type type, Obj?[] ctorArgs := Obj#.emptyList())

Helper method - tap into BedSheet's afIoc registry

dependencyByType

Source

Obj dependencyByType(Type dependencyType)

Helper method - tap into BedSheet's afIoc registry

injectIntoFields

Source

Obj injectIntoFields(Obj service)

Helper method - tap into BedSheet's afIoc registry

makeClient

Source

BedClient makeClient()

Creates a pack of Butter whose middleware ends with a BedTerminator which makes requests to the Bed app.

makeWithModule

Source

new makeWithModule(Type? iocModule := null)

Create a instance of afBedSheet with the given afIoc module (usually your web app)

makeWithPod

Source

new makeWithPod(Pod webApp)

Create a instance of afBedSheet with afIoc dependencies from the given pod (usually your web app)

registry

Source

Registry registry { private set }

The afIoc registry - read only.

serviceById

Source

Obj serviceById(Str serviceId)

Helper method - tap into BedSheet's afIoc registry

shutdown

Source

BedServer shutdown()

Shutdown afBedSheet

startup

Source

BedServer startup()

Startup afBedSheet