001 /*
002 * Copyright 2009-2014 UnboundID Corp.
003 * All Rights Reserved.
004 */
005 /*
006 * Copyright (C) 2009-2014 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.protocol;
022
023
024
025 import com.unboundid.ldap.sdk.Control;
026 import com.unboundid.util.InternalUseOnly;
027
028
029
030 /**
031 * This interface serves as a marker for classes in the
032 * {@code com.unboundid.ldap.sdk} package that are responses which may be
033 * received from a directory server.
034 *
035 */
036 @InternalUseOnly()
037 public interface LDAPResponse
038 {
039 /**
040 * An empty set of controls.
041 */
042 Control[] NO_CONTROLS = new Control[0];
043
044
045
046 /**
047 * Retrieves the message ID for the LDAP message containing this response.
048 *
049 * @return The message ID for the LDAP message containing this response.
050 */
051 int getMessageID();
052
053
054
055 /**
056 * Appends a string representation of this LDAP response to the provided
057 * buffer.
058 *
059 * @param buffer The buffer to which the information should be appended.
060 */
061 void toString(final StringBuilder buffer);
062 }