com.unboundid.ldap.sdk.unboundidds.extensions
Class GetChangelogBatchExtendedResult

java.lang.Object
  extended by com.unboundid.ldap.sdk.LDAPResult
      extended by com.unboundid.ldap.sdk.ExtendedResult
          extended by com.unboundid.ldap.sdk.unboundidds.extensions.GetChangelogBatchExtendedResult
All Implemented Interfaces:
LDAPResponse, java.io.Serializable

@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class GetChangelogBatchExtendedResult
extends ExtendedResult

NOTE: This class is part of the Commercial Edition of the UnboundID LDAP SDK for Java. It is not available for use in applications that include only the Standard Edition of the LDAP SDK, and is not supported for use in conjunction with non-UnboundID products.
This class provides an extended result that may be used to obtain information about the results of processing a get changelog batch extended request. The The changelog batch result value is encoded as follows:
   ChangelogBatchResult ::= SEQUENCE {
        resumeToken                   [0] OCTET STRING OPTIONAL,
        moreChangesAvailable          [1] BOOLEAN,
        changesAlreadyPurged          [2] BOOLEAN DEFAULT FALSE,
        additionalInfo                [3] OCTET STRING OPTIONAL,
        estimatedChangesRemaining     [4] INTEGER (0 .. MAXINT) OPTIONAL,
        ... }
 


See the documentation for the GetChangelogBatchExtendedRequest class for an example demonstrating its use.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.unboundid.ldap.protocol.LDAPResponse
NO_CONTROLS
 
Constructor Summary
GetChangelogBatchExtendedResult(ExtendedResult extendedResult, int entryCount)
          Creates a new get changelog batch extended result with the provided information.
GetChangelogBatchExtendedResult(ExtendedResult extendedResult, java.util.List<ChangelogEntryIntermediateResponse> entryList)
          Creates a new get changelog batch extended result with the provided information.
GetChangelogBatchExtendedResult(LDAPResult r)
          Creates a new get changelog batch extended result with only the generic LDAP result information and no extended value.
GetChangelogBatchExtendedResult(LDAPResult r, int entryCount, ASN1OctetString resumeToken, boolean moreChangesAvailable, boolean changesAlreadyPurged, java.lang.String additionalInfo)
          Creates a new get changelog batch extended result with the provided information.
GetChangelogBatchExtendedResult(LDAPResult r, int entryCount, ASN1OctetString resumeToken, boolean moreChangesAvailable, int estimatedChangesRemaining, boolean changesAlreadyPurged, java.lang.String additionalInfo)
          Creates a new get changelog batch extended result with the provided information.
 
Method Summary
 boolean changesAlreadyPurged()
          Indicates whether the server indicated that it may have already purged one or more changes after the starting point for the associated request and therefore the results returned may be missing changes.
 java.lang.String getAdditionalInfo()
          Retrieves a message with additional information about the processing that occurred, if available.
 java.util.List<ChangelogEntryIntermediateResponse> getChangelogEntries()
          Retrieves a list containing the entries that were returned by the server in the course of processing the extended operation, if available.
 int getEntryCount()
          Retrieves the number of entries returned by the server in the course of processing the extended operation.
 int getEstimatedChangesRemaining()
          Retrieves an estimate of the number of changes that may be immediately available to be retrieved from the server, if available.
 java.lang.String getExtendedResultName()
          Retrieves the user-friendly name for the extended result, if available.
 ASN1OctetString getResumeToken()
          Retrieves a token that may be used to resume the process of retrieving changes at the point after the last change received.
 boolean moreChangesAvailable()
          Indicates whether the server indicated that more changes may be immediately available without waiting.
 void toString(java.lang.StringBuilder buffer)
          Appends a string representation of this extended response to the provided buffer.
 
Methods inherited from class com.unboundid.ldap.sdk.ExtendedResult
getOID, getValue, hasValue, toString
 
Methods inherited from class com.unboundid.ldap.sdk.LDAPResult
getDiagnosticMessage, getMatchedDN, getMessageID, getReferralURLs, getResponseControl, getResponseControls, getResultCode, hasResponseControl, hasResponseControl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GetChangelogBatchExtendedResult

public GetChangelogBatchExtendedResult(LDAPResult r)
Creates a new get changelog batch extended result with only the generic LDAP result information and no extended value.

Parameters:
r - An LDAP result with general details of the response. It must not be null.

GetChangelogBatchExtendedResult

public GetChangelogBatchExtendedResult(LDAPResult r,
                                       int entryCount,
                                       ASN1OctetString resumeToken,
                                       boolean moreChangesAvailable,
                                       boolean changesAlreadyPurged,
                                       java.lang.String additionalInfo)
Creates a new get changelog batch extended result with the provided information.

Parameters:
r - An LDAP result with general details of the response. It must not be null.
entryCount - The number of entries returned. It may be less than zero to indicate that the number of entries is unknown.
resumeToken - A token which may be used to resume retrieving changes at the point immediately after the last change returned. It may be null only if this result represents an error that prevented the operation from being successfully processed.
moreChangesAvailable - Indicates whether there may be more changes immediately available to retrieve from the server.
changesAlreadyPurged - Indicates whether the server may have already purged changes after the starting point referenced by the associated request.
additionalInfo - A message with additional information about the status of the processing. It may be null if no additional message is available.

GetChangelogBatchExtendedResult

public GetChangelogBatchExtendedResult(LDAPResult r,
                                       int entryCount,
                                       ASN1OctetString resumeToken,
                                       boolean moreChangesAvailable,
                                       int estimatedChangesRemaining,
                                       boolean changesAlreadyPurged,
                                       java.lang.String additionalInfo)
Creates a new get changelog batch extended result with the provided information.

Parameters:
r - An LDAP result with general details of the response. It must not be null.
entryCount - The number of entries returned. It may be less than zero to indicate that the number of entries is unknown.
resumeToken - A token which may be used to resume retrieving changes at the point immediately after the last change returned. It may be null only if this result represents an error that prevented the operation from being successfully processed.
moreChangesAvailable - Indicates whether there may be more changes immediately available to retrieve from the server.
estimatedChangesRemaining - An estimate of the number of changes remaining to be retrieved. A value less than zero will be interpreted as "unknown".
changesAlreadyPurged - Indicates whether the server may have already purged changes after the starting point referenced by the associated request.
additionalInfo - A message with additional information about the status of the processing. It may be null if no additional message is available.

GetChangelogBatchExtendedResult

public GetChangelogBatchExtendedResult(ExtendedResult extendedResult,
                                       int entryCount)
                                throws LDAPException
Creates a new get changelog batch extended result with the provided information.

Parameters:
extendedResult - A generic extended result to be parsed as a get changelog batch extended result. It must not be null.
entryCount - The number of entries returned to the client. It may be less than zero to indicate that the entry count is unknown.
Throws:
LDAPException - If the provided extended result cannot be parsed as a get changelog batch result.

GetChangelogBatchExtendedResult

public GetChangelogBatchExtendedResult(ExtendedResult extendedResult,
                                       java.util.List<ChangelogEntryIntermediateResponse> entryList)
                                throws LDAPException
Creates a new get changelog batch extended result with the provided information.

Parameters:
extendedResult - A generic extended result to be parsed as a get changelog batch extended result. It must not be null.
entryList - A list of the entries returned to the client. It may be empty to indicate that no entries were returned, but it must not be null.
Throws:
LDAPException - If the provided extended result cannot be parsed as a get changelog batch result.
Method Detail

getResumeToken

public ASN1OctetString getResumeToken()
Retrieves a token that may be used to resume the process of retrieving changes at the point after the last change received. It may be null if this result represents an error that prevented the operation from being processed successfully.

Returns:
A token that may be used to resume the process of retrieving changes at the point after the last change received, or null if none is available.

moreChangesAvailable

public boolean moreChangesAvailable()
Indicates whether the server indicated that more changes may be immediately available without waiting. The value of this argument is only meaningful if ExtendedResult.hasValue() returns true.

Returns:
true if the server indicated that more changes may be immediately available without waiting, or false if not.

getEstimatedChangesRemaining

public int getEstimatedChangesRemaining()
Retrieves an estimate of the number of changes that may be immediately available to be retrieved from the server, if available.

Returns:
An estimate of the number of changes that may be immediately available to be retrieved from the server, or -1 if that information is not available.

changesAlreadyPurged

public boolean changesAlreadyPurged()
Indicates whether the server indicated that it may have already purged one or more changes after the starting point for the associated request and therefore the results returned may be missing changes. The value of this argument is only meaningful if ExtendedResult.hasValue() returns true.

Returns:
true if the server indicated that it may have already purged one or more changes after the starting point, or false if not.

getAdditionalInfo

public java.lang.String getAdditionalInfo()
Retrieves a message with additional information about the processing that occurred, if available.

Returns:
A message with additional information about the processing that occurred, or null if none is available.

getEntryCount

public int getEntryCount()
Retrieves the number of entries returned by the server in the course of processing the extended operation. A value of -1 indicates that the entry count is not known.

Returns:
The number of entries returned by the server in the course of processing the extended operation, 0 if no entries were returned, or -1 if the entry count is not known.

getChangelogEntries

public java.util.List<ChangelogEntryIntermediateResponse> getChangelogEntries()
Retrieves a list containing the entries that were returned by the server in the course of processing the extended operation, if available. An entry list will not be available if a custom ChangelogEntryListener was used for the request, and it may not be available if an error was encountered during processing.

Returns:
A list containing the entries that were returned by the server in the course of processing the extended operation, or null if an entry list is not available.

getExtendedResultName

public java.lang.String getExtendedResultName()
Retrieves the user-friendly name for the extended result, if available. If no user-friendly name has been defined, but a response OID is available, then that will be returned. If neither a user-friendly name nor a response OID are available, then null will be returned.

Overrides:
getExtendedResultName in class ExtendedResult
Returns:
The user-friendly name for this extended request, the response OID if a user-friendly name is not available but a response OID is, or null if neither a user-friendly name nor a response OID are available.

toString

public void toString(java.lang.StringBuilder buffer)
Appends a string representation of this extended response to the provided buffer.

Specified by:
toString in interface LDAPResponse
Overrides:
toString in class ExtendedResult
Parameters:
buffer - The buffer to which a string representation of this extended response will be appended.