Class CollectSupportDataExtendedRequest
- java.lang.Object
-
- com.unboundid.ldap.sdk.LDAPRequest
-
- com.unboundid.ldap.sdk.ExtendedRequest
-
- com.unboundid.ldap.sdk.unboundidds.extensions.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 (usingCollectSupportDataOutputIntermediateResponse
messages) and the resulting support data archive (usingCollectSupportDataArchiveFragmentIntermediateResponse
messages) back to the client before the finalCollectSupportDataExtendedResult
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 }, headAndTailSize [3] SEQUENCE { headSizeKB [0] INTEGER OPTIONAL, tailSizeKB [1] INTEGER 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.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COLLECT_SUPPORT_DATA_REQUEST_OID
The OID (1.3.6.1.4.1.30221.2.6.64) for the collect support data extended request.-
Fields inherited from class com.unboundid.ldap.sdk.ExtendedRequest
TYPE_EXTENDED_REQUEST_OID, TYPE_EXTENDED_REQUEST_VALUE
-
-
Constructor Summary
Constructors Constructor Description CollectSupportDataExtendedRequest(ExtendedRequest request, CollectSupportDataIntermediateResponseListener intermediateResponseListener)
Creates a new collect support data extended request that is decoded from the provided generic extended request.CollectSupportDataExtendedRequest(CollectSupportDataExtendedRequestProperties properties, CollectSupportDataIntermediateResponseListener intermediateResponseListener, Control... controls)
Creates a new instance of this extended request with the provided information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CollectSupportDataExtendedRequest
duplicate()
Creates a new instance of this LDAP request that may be modified without impacting this request.CollectSupportDataExtendedRequest
duplicate(Control[] controls)
Creates a new instance of this LDAP request that may be modified without impacting this request.java.lang.String
getArchiveFileName()
Retrieves the name (without any path information) that the client intends to use for the support data archive file.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.java.lang.String
getComment()
Retrieves an additional comment that should be included in the support data archive.ASN1OctetString
getEncryptionPassphrase()
Retrieves the passphrase that should be used to encrypt the contents of the support data archive.java.lang.String
getExtendedRequestName()
Retrieves the user-friendly name for the extended request, if available.java.lang.Boolean
getIncludeBinaryFiles()
Retrieves the value of a flag that indicates whether the support data archive may include binary files.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.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.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.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.CollectSupportDataLogCaptureWindow
getLogCaptureWindow()
Retrieves the log capture window object that indicates how much log content should be included in the support data archive.java.lang.Integer
getMaximumFragmentSizeBytes()
Retrieves the maximum size, in bytes, that may be used for a support data archive fragment returned in any singleCollectSupportDataArchiveFragmentIntermediateResponse
message.java.lang.String
getProxyToServerAddress()
Retrieves the address of the backend Directory Server to which the collect support data extended request should be forwarded.java.lang.Integer
getProxyToServerPort()
Retrieves the port of the backend Directory Server to which the collect support data extended request should be forwarded.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.).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.).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.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.void
intermediateResponseReturned(IntermediateResponse intermediateResponse)
Indicates that the provided intermediate response has been returned by the server and may be processed by this intermediate response listener.CollectSupportDataExtendedResult
process(LDAPConnection connection, int depth)
Sends this extended request to the directory server over the provided connection and returns the associated response.void
toString(java.lang.StringBuilder buffer)
Appends a string representation of this request to the provided buffer.-
Methods inherited from class com.unboundid.ldap.sdk.ExtendedRequest
encodeProtocolOp, getLastMessageID, getOID, getOperationType, getProtocolOpType, getValue, hasValue, responseReceived, toCode, writeTo
-
Methods inherited from class com.unboundid.ldap.sdk.LDAPRequest
followReferrals, getControl, getControlList, getControls, getIntermediateResponseListener, getReferralConnector, getReferralConnectorInternal, getReferralDepth, getResponseTimeoutMillis, hasControl, hasControl, setFollowReferrals, setIntermediateResponseListener, setReferralConnector, setReferralDepth, setResponseTimeoutMillis, toString
-
-
-
-
Field Detail
-
COLLECT_SUPPORT_DATA_REQUEST_OID
@NotNull public static final java.lang.String COLLECT_SUPPORT_DATA_REQUEST_OID
The OID (1.3.6.1.4.1.30221.2.6.64) for the collect support data extended request.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CollectSupportDataExtendedRequest
public CollectSupportDataExtendedRequest(@NotNull CollectSupportDataExtendedRequestProperties properties, @NotNull CollectSupportDataIntermediateResponseListener intermediateResponseListener, @Nullable 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 benull
.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 benull
.controls
- The controls to include in the collect support data extended request. It may benull
or empty if no controls are needed.
-
CollectSupportDataExtendedRequest
public CollectSupportDataExtendedRequest(@NotNull ExtendedRequest request, @NotNull 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 benull
.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 benull
.- Throws:
LDAPException
- If the provided extended request cannot be decoded as a valid collect support data extended request.
-
-
Method Detail
-
getCollectSupportDataIntermediateResponseListener
@NotNull 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
@Nullable 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
@Nullable 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
@Nullable 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
@Nullable 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
@Nullable 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
@Nullable 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
@Nullable 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
@Nullable 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
@Nullable 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
@Nullable 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
@Nullable 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
@Nullable 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
@Nullable 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
@Nullable 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
@Nullable 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
@Nullable public java.lang.Integer getMaximumFragmentSizeBytes()
Retrieves the maximum size, in bytes, that may be used for a support data archive fragment returned in any singleCollectSupportDataArchiveFragmentIntermediateResponse
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
@NotNull public CollectSupportDataExtendedResult process(@NotNull 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 classExtendedRequest
- 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
@NotNull public CollectSupportDataExtendedRequest duplicate()
Creates a new instance of this LDAP request that may be modified without impacting this request.. Subclasses should override this method to return a duplicate of the appropriate type..- Specified by:
duplicate
in interfaceReadOnlyLDAPRequest
- Overrides:
duplicate
in classExtendedRequest
- Returns:
- A new instance of this LDAP request that may be modified without impacting this request.
-
duplicate
@NotNull public CollectSupportDataExtendedRequest duplicate(@Nullable 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 interfaceReadOnlyLDAPRequest
- Overrides:
duplicate
in classExtendedRequest
- 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
@NotNull 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 classExtendedRequest
- Returns:
- The user-friendly name for this extended request, or the OID if no user-friendly name is available.
-
intermediateResponseReturned
public void intermediateResponseReturned(@NotNull IntermediateResponse intermediateResponse)
Indicates that the provided intermediate response has been returned by the server and may be processed by this intermediate response listener.- Specified by:
intermediateResponseReturned
in interfaceIntermediateResponseListener
- Parameters:
intermediateResponse
- The intermediate response that has been returned by the server.
-
toString
public void toString(@NotNull java.lang.StringBuilder buffer)
Appends a string representation of this request to the provided buffer.- Specified by:
toString
in interfaceProtocolOp
- Specified by:
toString
in interfaceReadOnlyLDAPRequest
- Overrides:
toString
in classExtendedRequest
- Parameters:
buffer
- The buffer to which to append a string representation of this request.
-
-