+ /**
+ * A method to create a thread for policy deployment
+ *
+ * @param setHostAddresses Set of strings for host addresses to configure
+ * @return void
+ */
+ private void createMACPolicyThreads(Set<String> setHostAddresses) throws IOException {
+
+ // Create a list of threads
+ List<Thread> threads = new ArrayList<Thread>();
+ // Start threads for hosts
+ for(String strAddress : setHostAddresses) {
+ Thread policyThread = new Thread(new Runnable() {
+ public void run() {
+ synchronized(this) {
+ processJailConfig.sendMACPolicies(strAddress);
+ }
+ }
+ });
+ threads.add(policyThread);
+ policyThread.start();
+ RuntimeOutput.print("Deploying MAC policies for: " + strAddress, BOOL_VERBOSE);
+ }
+ // Join all threads
+ for (Thread thread : threads) {
+ try {
+ thread.join();
+ } catch (InterruptedException ex) {
+ ex.printStackTrace();
+ }
+ }
+ }
+