// important to initialize in the correct order: cache first,
// then the state and transport services, and lastly scheduler.
setStateFactory(config);
addTransportServices(config);
// ensure there is always an HttpService for outgoing calls
addTransportService(new HttpService());
setSchedulerFactory(config);
addAgents(config);
} else {
// ensure there is at least a memory state service
setStateFactory(new MemoryStateFactory());
// ensure there is always an HttpService for outgoing calls
addTransportService(new HttpService());
}
}