public class LDAPCompare extends Object
Constructor and Description |
---|
LDAPCompare(AtomicInteger nextMessageID,
PrintStream out,
PrintStream err)
Constructor for the LDAPCompare object.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
The main method for LDAPCompare tool.
|
static int |
mainCompare(String[] args)
Parses the provided command-line arguments and uses that information to
run the ldapcompare tool.
|
static int |
mainCompare(String[] args,
boolean initializeServer,
OutputStream outStream,
OutputStream errStream)
Parses the provided command-line arguments and uses that information to
run the ldapcompare tool.
|
int |
readAndExecute(LDAPConnection connection,
String attributeType,
byte[] attributeVal,
ArrayList<String> lines,
LDAPCompareOptions compareOptions)
Execute the compare request in the specified list of DNs.
|
int |
readAndExecute(LDAPConnection connection,
String attributeType,
byte[] attributeVal,
Reader reader,
LDAPCompareOptions compareOptions)
Read the specified DNs from the given reader
(file or stdin) and execute the given compare request.
|
public LDAPCompare(AtomicInteger nextMessageID, PrintStream out, PrintStream err)
nextMessageID
- The message ID counter to use for requests.out
- The print stream to use for standard output.err
- The print stream to use for standard error.public int readAndExecute(LDAPConnection connection, String attributeType, byte[] attributeVal, ArrayList<String> lines, LDAPCompareOptions compareOptions) throws IOException, LDAPException
connection
- The connection to execute the request on.attributeType
- The attribute type to compare.attributeVal
- The attribute value to compare.lines
- The list of DNs to compare the attribute in.compareOptions
- The constraints for the compare request.IOException
- If a problem occurs while communicating with the
Directory Server.LDAPException
- If the server returns an error response.public int readAndExecute(LDAPConnection connection, String attributeType, byte[] attributeVal, Reader reader, LDAPCompareOptions compareOptions) throws IOException, LDAPException
connection
- The connection to execute the request on.attributeType
- The attribute type to compare.attributeVal
- The attribute value to compare.reader
- The reader to read the list of DNs from.compareOptions
- The constraints for the compare request.IOException
- If a problem occurs while communicating with the
Directory Server.LDAPException
- If the server returns an error response.public static void main(String[] args)
args
- The command-line arguments provided to this program.public static int mainCompare(String[] args)
args
- The command-line arguments provided to this program.public static int mainCompare(String[] args, boolean initializeServer, OutputStream outStream, OutputStream errStream)
args
- The command-line arguments provided to this
program.initializeServer
- Indicates whether to initialize the server.outStream
- The output stream to use for standard output, or
null
if standard output is not
needed.errStream
- The output stream to use for standard error, or
null
if standard error is not
needed.Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.