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)

Adds an extra (test) module to the registry, should you wish to override service behaviour.

Convenience for bedSheetBuilder.addModule()

addModules

Source

This addModules(Type[] moduleTypes)

Adds many modules to the registry

Convenience for bedSheetBuilder.addModules()

addModulesFromPod

Source

This addModulesFromPod(Str podName, Bool addDependencies := true)

Inspects the pod's meta-data for the key afIoc.module. This is then treated as a CSV list of (qualified) module type names to load.

If addDependencies is true then the pod's dependencies are also inspected for IoC modules.

Convenience for bedSheetBuilder.addModulesFromPod()

bedSheetBuilder

Source

BedSheetBuilder bedSheetBuilder { private set }

The underlying BedSheetBuilder instance.

build

Source

Obj build(Type type, Obj?[]? ctorArgs := null, [Field:Obj?]? fieldVals := null)

Helper method - tap into BedSheet's afIoc registry

inject

Source

Obj inject(Obj instance)

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)

Create a BedServer instance with the given IoC module (usually your web app).

makeWithName

Source

new makeWithName(Str qname)

Create a BedServer instance with the given qname of either a Pod or a Type.

makeWithPod

Source

new makeWithPod(Pod webApp)

Create a BedServer instance with the given pod (usually your web app).

options

Source

Str:Obj? options { private set }

Returns the options from the IoC RegistryBuilder. Read only.

registry

Source

Registry registry { private set }

The IoC registry.

removeModule

Source

This removeModule(Type moduleType)

Removes modules of the given type. If a module of the given type is subsequently added, it is silently ignored.

serviceById

Source

Obj serviceById(Str serviceId, Bool checked := true)

Helper method - tap into BedSheet's afIoc registry

serviceByType

Source

Obj serviceByType(Type serviceType, Bool checked := true)

Helper method - tap into BedSheet's afIoc registry

shutdown

Source

BedServer shutdown()

Shutdown afBedSheet

silenceBuilder

Source

This silenceBuilder()

Suppresses surplus logging by BedSheetBuilder and IoC's RegistryBuilder.

startup

Source

BedServer startup()

Startup afBedSheet