001 /*
002 * Copyright 2014-2016 UnboundID Corp.
003 * All Rights Reserved.
004 */
005 /*
006 * Copyright (C) 2014-2016 UnboundID Corp.
007 *
008 * This program is free software; you can redistribute it and/or modify
009 * it under the terms of the GNU General Public License (GPLv2 only)
010 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only)
011 * as published by the Free Software Foundation.
012 *
013 * This program is distributed in the hope that it will be useful,
014 * but WITHOUT ANY WARRANTY; without even the implied warranty of
015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
016 * GNU General Public License for more details.
017 *
018 * You should have received a copy of the GNU General Public License
019 * along with this program; if not, see <http://www.gnu.org/licenses>.
020 */
021 package com.unboundid.ldap.listener.interceptor;
022
023
024
025 import com.unboundid.ldap.sdk.ReadOnlySearchRequest;
026 import com.unboundid.ldap.sdk.SearchResultReference;
027 import com.unboundid.util.NotExtensible;
028 import com.unboundid.util.ThreadSafety;
029 import com.unboundid.util.ThreadSafetyLevel;
030
031
032
033 /**
034 * This class provides an API that can be used in the course of processing a
035 * search request via the {@link InMemoryOperationInterceptor} API.
036 */
037 @NotExtensible()
038 @ThreadSafety(level=ThreadSafetyLevel.INTERFACE_NOT_THREADSAFE)
039 public interface InMemoryInterceptedSearchReference
040 extends InMemoryInterceptedResult
041 {
042 /**
043 * Retrieves the search request that is being processed. If the request was
044 * altered between the time it was received from the client and the time it
045 * was actually processed by the in-memory directory server, then this will be
046 * the most recently altered version.
047 *
048 * @return The search request that was processed.
049 */
050 ReadOnlySearchRequest getRequest();
051
052
053
054 /**
055 * Retrieves the search result reference to be returned to the client.
056 *
057 * @return The search result reference to be returned to the client.
058 */
059 SearchResultReference getSearchReference();
060
061
062
063 /**
064 * Replaces the search result reference to be returned to the client. It may
065 * be {@code null} if the reference should be suppressed rather than being
066 * returned to the client.
067 *
068 * @param reference The search result reference to be returned to the
069 * client. It may be {@code null} if the reference should
070 * be suppressed rather than being returned to the client.
071 */
072 void setSearchReference(final SearchResultReference reference);
073 }