001/* 002 * Copyright 2014-2017 UnboundID Corp. 003 * All Rights Reserved. 004 */ 005/* 006 * Copyright (C) 2014-2017 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 */ 021package com.unboundid.ldap.listener.interceptor; 022 023 024 025import com.unboundid.ldap.sdk.IntermediateResponse; 026import com.unboundid.util.NotExtensible; 027import com.unboundid.util.ThreadSafety; 028import com.unboundid.util.ThreadSafetyLevel; 029 030 031 032/** 033 * This class provides an API that can be used in the course of processing an 034 * intermediate response via the {@link InMemoryOperationInterceptor} API. 035 */ 036@NotExtensible() 037@ThreadSafety(level=ThreadSafetyLevel.INTERFACE_NOT_THREADSAFE) 038public interface InMemoryInterceptedIntermediateResponse 039 extends InMemoryInterceptedResult 040{ 041 /** 042 * Retrieves the request associated with the operation that is being 043 * processed. If the request was altered between the time it was received 044 * from the client and the time it was actually processed by the in-memory 045 * directory server, then this will be the most recently altered version. 046 * 047 * @return The request associated with the operation that is being processed. 048 */ 049 InMemoryInterceptedRequest getRequest(); 050 051 052 053 /** 054 * Retrieves the intermediate response to be returned to the client. 055 * 056 * @return The intermediate response to be returned to the client. 057 */ 058 IntermediateResponse getIntermediateResponse(); 059 060 061 062 /** 063 * Replaces the intermediate response to be returned to the client. It may be 064 * {@code null} if the response should be suppressed rather than being 065 * returned to the client. 066 * 067 * @param response The intermediate response to be returned to the client. 068 * It may be {@code null} if the response should be 069 * suppressed rather than being returned to the client. 070 */ 071 void setIntermediateResponse(final IntermediateResponse response); 072}