public static Set<DataPortConnector> getConnectorSet(Set<RTComponent> componentSet)
			throws Exception {
		Set<DataPortConnector> connectorSet = new HashSet<DataPortConnector>();

		for (RTComponent component : componentSet) {
			RTObject sourceRTObject = RTSystemBuilder.getComponent(component);

			RTC.PortService[] portServices = sourceRTObject.get_ports();
			for (RTC.PortService portService : portServices) {
				RTC.ConnectorProfile[] connectorProfiles = portService
						.get_connector_profiles();
				for (RTC.ConnectorProfile connectorProfile : connectorProfiles) {
					connectorSet.add(RTSystemBuilder.createConnector(
							componentSet, connectorProfile));
				}
			}
		}
		return connectorSet;
	}