0N/A/*
0N/A * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
0N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
0N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
0N/A * or visit www.oracle.com if you need additional information or have any
0N/A * questions.
0N/A */
0N/A
0N/Apackage javax.naming.ldap;
0N/A
0N/A/**
0N/A * This interface represents an LDAPv3 control as defined in
0N/A * <A HREF="http://www.ietf.org/rfc/rfc2251.txt">RFC 2251</A>.
0N/A *<p>
0N/A * The LDAPv3 protocol uses controls to send and receive additional data
0N/A * to affect the behavior of predefined operations.
0N/A * Controls can be sent along with any LDAP operation to the server.
0N/A * These are referred to as <em>request controls</em>. For example, a
0N/A * "sort" control can be sent with an LDAP search operation to
0N/A * request that the results be returned in a particular order.
0N/A * Solicited and unsolicited controls can also be returned with
0N/A * responses from the server. Such controls are referred to as
0N/A * <em>response controls</em>. For example, an LDAP server might
0N/A * define a special control to return change notifications.
0N/A *<p>
0N/A * This interface is used to represent both request and response controls.
0N/A *
0N/A * @author Rosanna Lee
0N/A * @author Scott Seligman
0N/A * @author Vincent Ryan
0N/A *
0N/A * @see ControlFactory
0N/A * @since 1.3
0N/A */
0N/Apublic interface Control extends java.io.Serializable {
0N/A /**
0N/A * Indicates a critical control.
0N/A * The value of this constant is <tt>true</tt>.
0N/A */
0N/A public static final boolean CRITICAL = true;
0N/A
0N/A /**
0N/A * Indicates a non-critical control.
0N/A * The value of this constant is <tt>false</tt>.
0N/A */
0N/A public static final boolean NONCRITICAL = false;
0N/A
0N/A /**
0N/A * Retrieves the object identifier assigned for the LDAP control.
0N/A *
0N/A * @return The non-null object identifier string.
0N/A */
0N/A public String getID();
0N/A
0N/A /**
0N/A * Determines the criticality of the LDAP control.
0N/A * A critical control must not be ignored by the server.
0N/A * In other words, if the server receives a critical control
0N/A * that it does not support, regardless of whether the control
0N/A * makes sense for the operation, the operation will not be performed
0N/A * and an <tt>OperationNotSupportedException</tt> will be thrown.
0N/A * @return true if this control is critical; false otherwise.
0N/A */
0N/A public boolean isCritical();
0N/A
0N/A /**
0N/A * Retrieves the ASN.1 BER encoded value of the LDAP control.
0N/A * The result is the raw BER bytes including the tag and length of
0N/A * the control's value. It does not include the controls OID or criticality.
0N/A *
0N/A * Null is returned if the value is absent.
0N/A *
0N/A * @return A possibly null byte array representing the ASN.1 BER encoded
0N/A * value of the LDAP control.
0N/A */
0N/A public byte[] getEncodedValue();
0N/A
0N/A // static final long serialVersionUID = -591027748900004825L;
0N/A}
0N/A