Worker.java revision d81978a0815d5b8a75633c35e3e1f8708d36f017
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the
// Common Development and Distribution License, Version 1.0 only
// (the "License"). You may not use this file except in compliance
// with the License.
//
// You can obtain a copy of the license at
// See the License for the specific language governing permissions
// and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each
// file and include the License file at
// trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
// add the following below this CDDL HEADER, with the fields enclosed
// information:
// Portions Copyright [yyyy] [name of copyright owner]
//
// CDDL HEADER END
//
//
// Copyright 2008 Sun Microsystems, Inc.
/**
** Constructor for Worker thread
**/
super();
try {
start();
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* Connect to the server
* wait a notify from the main thread to startthe modify operations
**/
public void run() {
try {
// Set the properties
// Waiting a notify from the main thread
/*
* Start modify operations
*/
initBindPW = "userpassword";
newBindPW = "new_userpassword";
while (true) {
while (true) {
try {
// if the Max_nb_mod is reached, counters are initialized
// disconnect cnx
// Wait the main to wake up
if ( client.nb_mod_started_reached() == false) {
// bind
// use a random DN to bind
// restore the old password
// bind
} else {
break;
}
}
// update the total number of searchs
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
// Initialize the today's date string
}
}
}