public final class Responses extends Object
All copy constructors of the form copyOfXXXResult
perform deep copies
of their response parameter. More specifically, any controls, modifications,
and attributes contained within the response will be duplicated.
Similarly, all unmodifiable views of responses returned by methods of the
form unmodifiableXXXResult
return deep unmodifiable views of their
response parameter. More specifically, any controls, modifications, and
attributes contained within the returned response will be unmodifiable.
Modifier and Type | Method and Description |
---|---|
static BindResult |
copyOfBindResult(BindResult result)
Creates a new bind result that is an exact copy of the provided result.
|
static CompareResult |
copyOfCompareResult(CompareResult result)
Creates a new compare result that is an exact copy of the provided
result.
|
static GenericExtendedResult |
copyOfGenericExtendedResult(GenericExtendedResult result)
Creates a new generic extended result that is an exact copy of the
provided result.
|
static GenericIntermediateResponse |
copyOfGenericIntermediateResponse(GenericIntermediateResponse result)
Creates a new generic intermediate response that is an exact copy of the
provided response.
|
static PasswordModifyExtendedResult |
copyOfPasswordModifyExtendedResult(PasswordModifyExtendedResult result)
Creates a new password modify extended result that is an exact copy of
the provided result.
|
static Result |
copyOfResult(Result result)
Creates a new result that is an exact copy of the provided result.
|
static SearchResultEntry |
copyOfSearchResultEntry(SearchResultEntry entry)
Creates a new search result entry that is an exact copy of the provided
result.
|
static SearchResultReference |
copyOfSearchResultReference(SearchResultReference reference)
Creates a new search result reference that is an exact copy of the
provided result.
|
static WhoAmIExtendedResult |
copyOfWhoAmIExtendedResult(WhoAmIExtendedResult result)
Creates a new who am I extended result that is an exact copy of the
provided result.
|
static BindResult |
newBindResult(ResultCode resultCode)
Creates a new bind result using the provided result code.
|
static CompareResult |
newCompareResult(ResultCode resultCode)
Creates a new compare result using the provided result code.
|
static GenericExtendedResult |
newGenericExtendedResult(ResultCode resultCode)
Creates a new generic extended result using the provided result code.
|
static GenericIntermediateResponse |
newGenericIntermediateResponse()
Creates a new generic intermediate response with no name or value.
|
static GenericIntermediateResponse |
newGenericIntermediateResponse(String responseName,
Object responseValue)
Creates a new generic intermediate response using the provided response
name and value.
|
static PasswordModifyExtendedResult |
newPasswordModifyExtendedResult(ResultCode resultCode)
Creates a new password modify extended result using the provided result
code, and no generated password.
|
static Result |
newResult(ResultCode resultCode)
Creates a new result using the provided result code.
|
static SearchResultEntry |
newSearchResultEntry(Dn name)
Creates a new search result entry using the provided distinguished name.
|
static SearchResultEntry |
newSearchResultEntry(Entry entry)
Creates a new search result entry backed by the provided entry.
|
static SearchResultEntry |
newSearchResultEntry(String... ldifLines)
Creates a new search result entry using the provided lines of LDIF
decoded using the default schema.
|
static SearchResultEntry |
newSearchResultEntry(String name)
Creates a new search result entry using the provided distinguished name
decoded using the default schema.
|
static SearchResultReference |
newSearchResultReference(List<String> uris)
Creates a new search result reference using the provided continuation reference URIs.
|
static SearchResultReference |
newSearchResultReference(String uri)
Creates a new search result reference using the provided continuation
reference URI.
|
static StartTlsExtendedResult |
newStartTlsExtendedResult(ResultCode resultCode)
Creates a new start TLS extended result which will use the provided SSL context.
|
static WhoAmIExtendedResult |
newWhoAmIExtendedResult(ResultCode resultCode)
Creates a new who am I extended result with the provided result code and
no authorization ID.
|
static BindResult |
unmodifiableBindResult(BindResult result)
Creates an unmodifiable bind result using the provided response.
|
static CompareResult |
unmodifiableCompareResult(CompareResult result)
Creates an unmodifiable compare result using the provided response.
|
static GenericExtendedResult |
unmodifiableGenericExtendedResult(GenericExtendedResult result)
Creates an unmodifiable generic extended result using the provided
response.
|
static GenericIntermediateResponse |
unmodifiableGenericIntermediateResponse(GenericIntermediateResponse response)
Creates an unmodifiable generic intermediate response using the provided
response.
|
static PasswordModifyExtendedResult |
unmodifiablePasswordModifyExtendedResult(PasswordModifyExtendedResult result)
Creates an unmodifiable password modify extended result using the
provided response.
|
static Result |
unmodifiableResult(Result result)
Creates an unmodifiable result using the provided response.
|
static SearchResultEntry |
unmodifiableSearchResultEntry(SearchResultEntry entry)
Creates an unmodifiable search result entry using the provided response.
|
static SearchResultReference |
unmodifiableSearchResultReference(SearchResultReference reference)
Creates an unmodifiable search result reference using the provided
response.
|
static WhoAmIExtendedResult |
unmodifiableWhoAmIExtendedResult(WhoAmIExtendedResult result)
Creates an unmodifiable who am I extended result using the provided
response.
|
public static BindResult copyOfBindResult(BindResult result)
result
- The bind result to be copied.NullPointerException
- If result
was null
.public static CompareResult copyOfCompareResult(CompareResult result)
result
- The compare result to be copied.NullPointerException
- If result
was null
.public static GenericExtendedResult copyOfGenericExtendedResult(GenericExtendedResult result)
result
- The generic extended result to be copied.NullPointerException
- If result
was null
.public static GenericIntermediateResponse copyOfGenericIntermediateResponse(GenericIntermediateResponse result)
result
- The generic intermediate response to be copied.NullPointerException
- If result
was null
.public static PasswordModifyExtendedResult copyOfPasswordModifyExtendedResult(PasswordModifyExtendedResult result)
result
- The password modify extended result to be copied.NullPointerException
- If result
was null
.public static Result copyOfResult(Result result)
result
- The result to be copied.NullPointerException
- If result
was null
.public static SearchResultEntry copyOfSearchResultEntry(SearchResultEntry entry)
entry
- The search result entry to be copied.NullPointerException
- If entry
was null
.public static SearchResultReference copyOfSearchResultReference(SearchResultReference reference)
reference
- The search result reference to be copied.NullPointerException
- If reference
was null
.public static WhoAmIExtendedResult copyOfWhoAmIExtendedResult(WhoAmIExtendedResult result)
result
- The who am I result to be copied.NullPointerException
- If result
was null
.public static BindResult newBindResult(ResultCode resultCode)
resultCode
- The result code.NullPointerException
- If resultCode
was null
.public static CompareResult newCompareResult(ResultCode resultCode)
resultCode
- The result code.NullPointerException
- If resultCode
was null
.public static GenericExtendedResult newGenericExtendedResult(ResultCode resultCode)
resultCode
- The result code.NullPointerException
- If resultCode
was null
.public static GenericIntermediateResponse newGenericIntermediateResponse()
public static GenericIntermediateResponse newGenericIntermediateResponse(String responseName, Object responseValue)
If the response value is not an instance of ByteString
then it
will be converted using the ByteString.valueOfObject(Object)
method.
responseName
- The dotted-decimal representation of the unique OID
corresponding to this intermediate response, which may be
null
indicating that none was provided.responseValue
- The response value associated with this generic intermediate
response, which may be null
indicating that none was
provided.public static PasswordModifyExtendedResult newPasswordModifyExtendedResult(ResultCode resultCode)
resultCode
- The result code.NullPointerException
- If resultCode
was null
.public static Result newResult(ResultCode resultCode)
resultCode
- The result code.NullPointerException
- If resultCode
was null
.public static SearchResultEntry newSearchResultEntry(Dn name)
name
- The distinguished name of the entry.NullPointerException
- If name
was null
.public static SearchResultEntry newSearchResultEntry(Entry entry)
entry
will be reflected in the returned
search result entry. The returned search result entry supports updates to
its list of controls, as well as updates to the name and attributes if
the underlying entry allows.entry
- The entry.NullPointerException
- If entry
was null
.public static SearchResultEntry newSearchResultEntry(String name)
name
- The distinguished name of the entry.LocalizedIllegalArgumentException
- If name
could not be decoded using the default
schema.NullPointerException
- If name
was null
.public static SearchResultEntry newSearchResultEntry(String... ldifLines)
ldifLines
- Lines of LDIF containing an LDIF add change record or an LDIF
entry record.LocalizedIllegalArgumentException
- If ldifLines
was empty, or contained invalid LDIF, or
could not be decoded using the default schema.NullPointerException
- If ldifLines
was null
.public static SearchResultReference newSearchResultReference(String uri)
uri
- The first continuation reference URI to be added to this
search result reference.NullPointerException
- If uri
was null
.public static SearchResultReference newSearchResultReference(List<String> uris)
uris
- The reference URIs to be added to this search result reference.NullPointerException
- If uris
were null
.public static StartTlsExtendedResult newStartTlsExtendedResult(ResultCode resultCode)
resultCode
- The result code.NullPointerException
- If resultCode
was null
.public static WhoAmIExtendedResult newWhoAmIExtendedResult(ResultCode resultCode)
resultCode
- The result code.NullPointerException
- If resultCode
was null
.public static BindResult unmodifiableBindResult(BindResult result)
result
- The bind result to be copied.NullPointerException
- If result
was null
.public static CompareResult unmodifiableCompareResult(CompareResult result)
result
- The compare result to be copied.NullPointerException
- If result
was null
.public static GenericExtendedResult unmodifiableGenericExtendedResult(GenericExtendedResult result)
result
- The generic extended result to be copied.NullPointerException
- If result
was null
.public static GenericIntermediateResponse unmodifiableGenericIntermediateResponse(GenericIntermediateResponse response)
response
- The generic intermediate response to be copied.NullPointerException
- If response
was null
.public static PasswordModifyExtendedResult unmodifiablePasswordModifyExtendedResult(PasswordModifyExtendedResult result)
result
- The password modify extended result to be copied.NullPointerException
- If result
was null
.public static Result unmodifiableResult(Result result)
result
- The result to be copied.NullPointerException
- If result
was null
.public static SearchResultEntry unmodifiableSearchResultEntry(SearchResultEntry entry)
entry
- The search result entry to be copied.NullPointerException
- If entry
was null
.public static SearchResultReference unmodifiableSearchResultReference(SearchResultReference reference)
reference
- The search result reference to be copied.NullPointerException
- If searchResultReference
was null
.public static WhoAmIExtendedResult unmodifiableWhoAmIExtendedResult(WhoAmIExtendedResult result)
result
- The who am I result to be copied.NullPointerException
- If result
was null
.Copyright 2010-2022 ForgeRock AS.