Class LDAPResultWriter
java.lang.Object
com.unboundid.ldap.sdk.unboundidds.tools.LDAPResultWriter
- Direct Known Subclasses:
ColumnBasedLDAPResultWriter,DNsOnlyLDAPResultWriter,JSONLDAPResultWriter,LDIFLDAPResultWriter,ValuesOnlyLDAPResultWriter
@InternalUseOnly
@NotExtensible
@ThreadSafety(level=INTERFACE_NOT_THREADSAFE)
public abstract class LDAPResultWriter
extends Object
This class provides an API that may be implemented by classes that format
and output the results for LDAP-related tools.
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds package structure, are only
supported for use against Ping Identity, UnboundID, and
Nokia/Alcatel-Lucent 8661 server products. These classes provide support
for proprietary functionality or for external specifications that are not
considered stable or mature enough to be guaranteed to work in an
interoperable way with other types of LDAP servers.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLDAPResultWriter(OutputStream outputStream) Creates a new LDAP result writer that will write to the provided output stream. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidflush()Flushes any buffered output.protected final PrintStreamRetrieves the print stream that may be used to write output.protected voidWrites the provided string to the associated print stream without a subsequent newline.protected voidprintln()Writes a blank line to the associated print stream.protected voidWrites the provided string to the associated print stream with a subsequent newline.final voidupdateOutputStream(OutputStream outputStream) Updates the output stream to which output will be written.abstract voidwriteComment(String comment) Writes the provided comment to the output.abstract voidFormats and writes a header that describes the way in which the data will be formatted.abstract voidwriteResult(LDAPResult result) Formats and writes the provided LDAP result.abstract voidFormats and writes the provided search result entry.abstract voidFormats and writes the provided search result reference.abstract voidwriteUnsolicitedNotification(LDAPConnection connection, ExtendedResult notification) Formats and writes the provided unsolicited notification.
-
Constructor Details
-
LDAPResultWriter
Creates a new LDAP result writer that will write to the provided output stream.- Parameters:
outputStream- The output stream to which the output will be written. It must not benull.
-
-
Method Details
-
updateOutputStream
Updates the output stream to which output will be written.- Parameters:
outputStream- The output stream to which the output will be written. It must not benull.
-
println
Writes a blank line to the associated print stream. -
print
Writes the provided string to the associated print stream without a subsequent newline.- Parameters:
string- The string to be written. It must not benull.
-
println
Writes the provided string to the associated print stream with a subsequent newline.- Parameters:
string- The string to be written. It must not benull.
-
getPrintStream
Retrieves the print stream that may be used to write output.- Returns:
- The print stream that may be used to write output.
-
flush
Flushes any buffered output. -
writeComment
Writes the provided comment to the output.- Parameters:
comment- The comment to be written. It must not benull.
-
writeHeader
Formats and writes a header that describes the way in which the data will be formatted. This will be displayed at the beginning of the output (including at the beginning of each file, if output should be spread across multiple files). -
writeSearchResultEntry
Formats and writes the provided search result entry.- Parameters:
entry- The search result entry to be processed.
-
writeSearchResultReference
Formats and writes the provided search result reference.- Parameters:
ref- The search result reference to be processed.
-
writeResult
Formats and writes the provided LDAP result.- Parameters:
result- The LDAP result to be processed. It may or may not be a search result.
-
writeUnsolicitedNotification
public abstract void writeUnsolicitedNotification(@NotNull LDAPConnection connection, @NotNull ExtendedResult notification) Formats and writes the provided unsolicited notification.- Parameters:
connection- The connection on which the unsolicited notification was received.notification- The unsolicited notification that was received.
-