validate method
Validates the configuration
Implementation
@override
bool validate({bool throwOnError = false}) {
if (name.isEmpty) {
if (throwOnError) {
throw ArgumentError('Configuration name cannot be empty');
}
return false;
}
if (!sessionConfig.validate(throwOnError: throwOnError)) {
if (throwOnError) {
throw ArgumentError('Invalid session configuration');
}
return false;
}
if (!streamConfig.validate(throwOnError: throwOnError)) {
if (throwOnError) {
throw ArgumentError('Invalid stream configuration');
}
return false;
}
if (!topologyConfig.validate(throwOnError: throwOnError)) {
if (throwOnError) {
throw ArgumentError('Invalid topology configuration');
}
return false;
}
if (!transportConfig.validate(throwOnError: throwOnError)) {
if (throwOnError) {
throw ArgumentError('Invalid transport configuration');
}
return false;
}
return true;
}