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.
/*****************************************************************/
super();
try {
this.start();
} catch (Exception e) {
e.printStackTrace();
}
}
/*****************************************************************/
public void run() {
while (true) {
this.addAnEntry(entry);
this.deleteAnEntry(entry);
}
}
/*****************************************************************/
public LDAPEntry generateAnEntry() {
try {
// Build random strings
int n = 1000000;
// Create entry attributes set
// Create the entry
attrSet);
// TBD a fixer return pas global a la function
return entry;
}
catch( Exception e ) {
}
return null;
}
/*****************************************************************/
try {
//************************************
// LDAP CONNECTION
// bind if needed
}
else {
}
//************************************
// ADD LDAP ENTRY
try {
// println("INFO","Add entry " + entry.getDN());
} catch (LDAPException e) {
int errorCode = e.getLDAPResultCode();
if ( errorCode == 50 ) {
}
else if ( errorCode == 68 ) {
}
else {
}
}
//************************************
// CLOSE LDAP CONNECTION
}
catch( LDAPException e ) {
}
}
/*****************************************************************/
try {
//************************************
// LDAP CONNECTION
// bind if needed
}
else {
}
//************************************
// LDAP CONNECTION
try {
// println("INFO","Delete entry " + entry.getDN());
} catch (LDAPException e) {
int errorCode = e.getLDAPResultCode();
if ( errorCode == 50 ) {
}
else if ( errorCode == 68 ) {
}
else {
}
}
//************************************
// CLOSE LDAP CONNECTION
}
catch( LDAPException e ) {
}
}
/*****************************************************************/
// Initialize the today's date string
}
/*****************************************************************/
+ msg );
}
}