Class CollectSupportDataExtendedRequest

  • All Implemented Interfaces:
    ProtocolOp, IntermediateResponseListener, ReadOnlyLDAPRequest, java.io.Serializable

    @NotMutable
    @ThreadSafety(level=COMPLETELY_THREADSAFE)
    public final class CollectSupportDataExtendedRequest
    extends ExtendedRequest
    implements IntermediateResponseListener
    This class provides an implementation of an extended request that may be used to invoke the collect-support data tool in a Ping Identity Directory Server and stream the output (using CollectSupportDataOutputIntermediateResponse messages) and the resulting support data archive (using CollectSupportDataArchiveFragmentIntermediateResponse messages) back to the client before the final CollectSupportDataExtendedResult response.
    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.

    The collect support data extended request has an OID of 1.3.6.1.4.1.30221.2.6.64 and a value with the following encoding:
       CollectSupportDataRequest ::= SEQUENCE {
          archiveFileName                 [0]  OCTET STRING OPTIONAL,
          encryptionPassphrase            [1]  OCTET STRING OPTIONAL,
          includeExpensiveData            [2]  BOOLEAN DEFAULT FALSE,
          includeReplicationStateDump     [3]  BOOLEAN DEFAULT FALSE,
          includeBinaryFiles              [4]  BOOLEAN DEFAULT FALSE,
          includeExtensionSource          [5]  BOOLEAN DEFAULT FALSE,
          useSequentialMode               [6]  BOOLEAN DEFAULT FALSE,
          securityLevel                   [7]  ENUMERATED {
               none                            (0),
               obscureSecrets                  (1),
               maximum                         (2),
               ... } DEFAULT obscureSecrets,
          jstackCount                     [8]  INTEGER (0..MAX) DEFAULT 10,
          reportCount                     [9]  INTEGER (0..MAX) DEFAULT 10,
          reportIntervalSeconds           [10] INTEGER (1..MAX) DEFAULT 1,
          logCaptureWindow                [11] CHOICE {
               toolDefault                     [0] NULL,
               durationMillis                  [1] INTEGER (0..MAX),
               timeWindow                      [2] SEQUENCE {
                    startTime                       OCTET STRING,
                    endTime                         OCTET STRING OPTIONAL },
               ... } DEFAULT default,
          comment                         [12] OCTET STRING OPTIONAL,
          proxyToServer                   [13] SEQUENCE OF {
               address                         OCTET STRING,
               port                            INTEGER (1..65535),
               ... } OPTIONAL,
          maximumFragmentSizeBytes        [1] INTEGER DEFAULT 1048576,
          ... }
     


    Because the tool output and the support data archive will be streamed back to the client using intermediate response messages, the request must be configured with an intermediate response listener to gain access to that information.
    See Also:
    CollectSupportDataExtendedResult, CollectSupportDataOutputIntermediateResponse, CollectSupportDataArchiveFragmentIntermediateResponse, CollectSupportDataSecurityLevel, CollectSupportDataLogCaptureWindow, Serialized Form
    • Constructor Detail

      • CollectSupportDataExtendedRequest

        public CollectSupportDataExtendedRequest​(CollectSupportDataExtendedRequestProperties properties,
                                                 CollectSupportDataIntermediateResponseListener intermediateResponseListener,
                                                 Control... controls)
        Creates a new instance of this extended request with the provided information.
        Parameters:
        properties - The properties that should be used for the collect support data extended request. It must not be null.
        intermediateResponseListener - The listener that will be used to handle any intermediate response messages that are received in the course of processing the collect support data extended request. It must not be null.
        controls - The controls to include in the collect support data extended request. It may be null or empty if no controls are needed.
      • CollectSupportDataExtendedRequest

        public CollectSupportDataExtendedRequest​(ExtendedRequest request,
                                                 CollectSupportDataIntermediateResponseListener intermediateResponseListener)
                                          throws LDAPException
        Creates a new collect support data extended request that is decoded from the provided generic extended request.
        Parameters:
        request - The generic extended request to be decoded as a collect support data extended request. It must not be null.
        intermediateResponseListener - The listener that will be used to handle any intermediate response messages that are received in the course of processing the collect support data extended request. It must not be null.
        Throws:
        LDAPException - If the provided extended request cannot be decoded as a valid collect support data extended request.
    • Method Detail

      • getCollectSupportDataIntermediateResponseListener

        public CollectSupportDataIntermediateResponseListener getCollectSupportDataIntermediateResponseListener()
        Retrieves the listener that will be notified when any output, archive fragment, or other types of intermediate response messages are received in response to this extended request.
        Returns:
        The listener that will be notified when any output, archive fragment, or other types of intermediate response messages are in response to this extended request.
      • getArchiveFileName

        public java.lang.String getArchiveFileName()
        Retrieves the name (without any path information) that the client intends to use for the support data archive file.
        Returns:
        The name (without any path information) that the client intends to use for the support data archive file, or null if the server should generate an archive file name.
      • getEncryptionPassphrase

        public ASN1OctetString getEncryptionPassphrase()
        Retrieves the passphrase that should be used to encrypt the contents of the support data archive.
        Returns:
        The passphrase that should be used to encrypt the contents of the support data archive, or null if the archive should not be encrypted.
      • getIncludeExpensiveData

        public java.lang.Boolean getIncludeExpensiveData()
        Retrieves the value of a flag that indicates whether the support data archive may include data that is potentially expensive to collect and could affect the performance or responsiveness of the server.
        Returns:
        The value of a flag that indicates whether the support data archive may include data that is potentially expensive to collect, or null if the property should not be specified when the task is created (in which case the server will use a default behavior of excluding expensive data).
      • getIncludeReplicationStateDump

        public java.lang.Boolean getIncludeReplicationStateDump()
        Retrieves the value of a flag that indicates whether the support data archive may include a replication state dump, which may be several megabytes in size.
        Returns:
        The value of a flag that indicates whether the support data archive may include a replication state dump, or null if the property should not be specified when the task is created (in which case the server will use a default behavior of excluding the state dump).
      • getIncludeBinaryFiles

        public java.lang.Boolean getIncludeBinaryFiles()
        Retrieves the value of a flag that indicates whether the support data archive may include binary files.
        Returns:
        The value of a flag that indicates whether the support data archive may include binary files, or null if the property should not be specified when the task is created (in which case the server will use a default behavior of excluding binary files).
      • getIncludeExtensionSource

        public java.lang.Boolean getIncludeExtensionSource()
        Retrieves the value of a flag that indicates whether the support data archive should include source code (if available) for any third-party extensions installed in the server.
        Returns:
        The value of a flag that indicates whether the support data archive should include source code (if available) for any third-party extensions installed in the server, or null if the property should not be specified when the task is created (in which case the server will use a default behavior of excluding extension source code).
      • getUseSequentialMode

        public java.lang.Boolean getUseSequentialMode()
        Retrieves the value of a flag that indicates whether the server should collect items for the support data archive in sequential mode rather than in parallel. Collecting data in sequential mode may reduce the amount of memory consumed during the collection process, but it will take longer to complete.
        Returns:
        The value of a flag that indicates whether the server should collect items for the support data archive in sequential mode rather than in parallel, or null if the property should not be specified when the task is created (in which case the server will default to capturing data in parallel).
      • getSecurityLevel

        public CollectSupportDataSecurityLevel getSecurityLevel()
        Retrieves the security level that should be used to indicate which data should be obscured, redacted, or omitted from the support data archive.
        Returns:
        The security level that should be used when creating the support data archive, or null if the property should not be specified when the task is created (in which case the server will use a default security level).
      • getJStackCount

        public java.lang.Integer getJStackCount()
        Retrieves the number of times that the jstack utility should be invoked to obtain stack traces from all threads in the server.
        Returns:
        The number of times that the jstack utility should be invoked to obtain stack traces from all threads in the server, or null if the property should not be specified when the task is created (in which case the server will use a default count).
      • getReportCount

        public java.lang.Integer getReportCount()
        Retrieves the number of intervals that should be captured from tools that use interval-based sampling (e.g., vmstat, iostat, mpstat, etc.).
        Returns:
        The number of intervals that should be captured from tools that use interval-based sampling, or null if the property should not be specified when the task is created (in which case the server will use a default report count).
      • getReportIntervalSeconds

        public java.lang.Integer getReportIntervalSeconds()
        Retrieves the interval duration in seconds that should be used for tools that use interval-based sampling (e.g., vmstat, iostat, mpstat, etc.).
        Returns:
        The interval duration in seconds that should be used for tools that use interval-based sampling, or null if the property should not be specified when the task is created (in which case the server will use a default report interval).
      • getLogCaptureWindow

        public CollectSupportDataLogCaptureWindow getLogCaptureWindow()
        Retrieves the log capture window object that indicates how much log content should be included in the support data archive.
        Returns:
        The log capture window object that indicates how much log content should be included in the support data archive, or null if this should not be specified in the request and the server should choose an appropriate amount of log content.
      • getComment

        public java.lang.String getComment()
        Retrieves an additional comment that should be included in the support data archive.
        Returns:
        An additional comment that should be included in the support data archive, or null if no comment should be included.
      • getProxyToServerAddress

        public java.lang.String getProxyToServerAddress()
        Retrieves the address of the backend Directory Server to which the collect support data extended request should be forwarded.
        Returns:
        The address of the backend Directory Server to which the collect support data extended request should be forwarded, or null if the request should be processed directly by the server that receives it.
      • getProxyToServerPort

        public java.lang.Integer getProxyToServerPort()
        Retrieves the port of the backend Directory Server to which the collect support data extended request should be forwarded.
        Returns:
        The port of the backend Directory Server to which the collect support data extended request should be forwarded, or null if the request should be processed directly by the server that receives it.
      • getMaximumFragmentSizeBytes

        public java.lang.Integer getMaximumFragmentSizeBytes()
        Retrieves the maximum size, in bytes, that may be used for a support data archive fragment returned in any single CollectSupportDataArchiveFragmentIntermediateResponse message.
        Returns:
        The maximum size, in bytes, that may be used for a support data archive fragment in any single archive fragment intermediate response message, or null if the server should use a default maximum fragment size.
      • process

        public CollectSupportDataExtendedResult process​(LDAPConnection connection,
                                                        int depth)
                                                 throws LDAPException
        Sends this extended request to the directory server over the provided connection and returns the associated response.
        Overrides:
        process in class ExtendedRequest
        Parameters:
        connection - The connection to use to communicate with the directory server.
        depth - The current referral depth for this request. It should always be one for the initial request, and should only be incremented when following referrals.
        Returns:
        An LDAP result object that provides information about the result of the extended operation processing.
        Throws:
        LDAPException - If a problem occurs while sending the request or reading the response.
      • duplicate

        public CollectSupportDataExtendedRequest duplicate​(Control[] controls)
        Creates a new instance of this LDAP request that may be modified without impacting this request. The provided controls will be used for the new request instead of duplicating the controls from this request.. Subclasses should override this method to return a duplicate of the appropriate type..
        Specified by:
        duplicate in interface ReadOnlyLDAPRequest
        Overrides:
        duplicate in class ExtendedRequest
        Parameters:
        controls - The set of controls to include in the duplicate request.
        Returns:
        A new instance of this LDAP request that may be modified without impacting this request.
      • getExtendedRequestName

        public java.lang.String getExtendedRequestName()
        Retrieves the user-friendly name for the extended request, if available. If no user-friendly name has been defined, then the OID will be returned.
        Overrides:
        getExtendedRequestName in class ExtendedRequest
        Returns:
        The user-friendly name for this extended request, or the OID if no user-friendly name is available.
      • toString

        public void toString​(java.lang.StringBuilder buffer)
        Appends a string representation of this request to the provided buffer.
        Specified by:
        toString in interface ProtocolOp
        Specified by:
        toString in interface ReadOnlyLDAPRequest
        Overrides:
        toString in class ExtendedRequest
        Parameters:
        buffer - The buffer to which to append a string representation of this request.