+
+ Component client = findComponent(aClientComponent);
+ Component server = findComponent(aServerComponent);
+
+ if (client == null) {
+ throw new SystemAssemblyException(getQualifiedName()
+ + ": No component '" + aClientComponent + "' in the container");
+ }
+
+ if (aRequiredInterface != null) {
+ if (findInterface(client.getRequiredInterfaces(), aRequiredInterface) == null) {
+ throw new SystemAssemblyException(getQualifiedName()
+ + ": Component '" + aClientComponent
+ + "' does not have a required interface named '"
+ + aRequiredInterface + "'");
+ }
+ }
+
+ if (server == null) {
+ throw new SystemAssemblyException("No component '"
+ + aClientComponent + "' in the container");
+ }
+
+ if (aProvidedInterface != null) {
+ if (findInterface(server.getProvidedInterfaces(), aProvidedInterface) == null) {
+ throw new SystemAssemblyException(getQualifiedName()
+ + ": Component '" + aServerComponent
+ + "' does not have a provided interface named '"
+ + aProvidedInterface + "'");
+ }
+ }
+
+ edgeFilter.add(new ConnectRequiredProvidedEdgeFilter(aClientComponent,
+ aRequiredInterface, aServerComponent, aProvidedInterface));