Interface InMemoryInterceptedSearchResult
-
- All Superinterfaces:
InMemoryInterceptedResult
@NotExtensible @ThreadSafety(level=INTERFACE_NOT_THREADSAFE) public interface InMemoryInterceptedSearchResult extends InMemoryInterceptedResult
This class provides an API that can be used in the course of processing a search request via theInMemoryOperationInterceptor
API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ReadOnlySearchRequest
getRequest()
Retrieves the search request that was processed.LDAPResult
getResult()
Retrieves the search result to be returned to the client.void
sendIntermediateResponse(IntermediateResponse intermediateResponse)
Sends the provided intermediate response message to the client.void
sendSearchEntry(Entry entry)
Sends the provided search result entry to the client.void
sendSearchReference(SearchResultReference reference)
Sends the provided search result reference to the client.void
setResult(LDAPResult searchResult)
Replaces the search result to be returned to the client.-
Methods inherited from interface com.unboundid.ldap.listener.interceptor.InMemoryInterceptedResult
getConnectedAddress, getConnectedPort, getConnectionID, getMessageID, getProperty, sendUnsolicitedNotification
-
-
-
-
Method Detail
-
getRequest
@NotNull ReadOnlySearchRequest getRequest()
Retrieves the search request that was processed. If the request was altered between the time it was received from the client and the time it was actually processed by the in-memory directory server, then this will be the most recently altered version.- Returns:
- The search request that was processed.
-
getResult
@Nullable LDAPResult getResult()
Retrieves the search result to be returned to the client.- Returns:
- The search result to be returned to the client.
-
setResult
void setResult(@NotNull LDAPResult searchResult)
Replaces the search result to be returned to the client.- Parameters:
searchResult
- The search result that should be returned to the client instead of the result originally generated by the in-memory directory server. It must not benull
.
-
sendSearchEntry
void sendSearchEntry(@NotNull Entry entry) throws LDAPException
Sends the provided search result entry to the client. It will be processed by theInMemoryOperationInterceptor.processSearchEntry(com.unboundid.ldap.listener.interceptor.InMemoryInterceptedSearchEntry)
method of all registered operation interceptors.- Parameters:
entry
- The search result entry to be returned to the client. It must not benull
. If the provided entry is aSearchResultEntry
, then it may optionally include one or more controls to provide to the client. If it is any other type ofEntry
, then it will not include any controls.- Throws:
LDAPException
- If a problem is encountered while trying to send the search result entry.
-
sendSearchReference
void sendSearchReference(@NotNull SearchResultReference reference) throws LDAPException
Sends the provided search result reference to the client. It will be processed by theInMemoryOperationInterceptor.processSearchReference(com.unboundid.ldap.listener.interceptor.InMemoryInterceptedSearchReference)
method of all registered operation interceptors.- Parameters:
reference
- The search result reference to be returned to the client. It must not benull
.- Throws:
LDAPException
- If a problem is encountered while trying to send the search result reference.
-
sendIntermediateResponse
void sendIntermediateResponse(@NotNull IntermediateResponse intermediateResponse) throws LDAPException
Sends the provided intermediate response message to the client. It will be processed by theInMemoryOperationInterceptor.processIntermediateResponse(com.unboundid.ldap.listener.interceptor.InMemoryInterceptedIntermediateResponse)
method of all registered operation interceptors.- Parameters:
intermediateResponse
- The intermediate response to send to the client. It must not benull
.- Throws:
LDAPException
- If a problem is encountered while trying to send the intermediate response.
-
-