01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package javax.naming.ldap;
19:
20: import java.io.Serializable;
21:
22: /**
23: * A <code>Control</code> corresponds to a control used in LDAPv3. Controls
24: * are specified in RFC2251. A control provides extra information related to an
25: * operation on the server. It may be a request control which is sent when a
26: * request is made to the LDAPv3 server or it may be a response control which is
27: * received from the LDAPv3 server.
28: */
29: public interface Control extends Serializable {
30:
31: /**
32: * The constant indicating that a <code>Control</code> is critical.
33: */
34: public static final boolean CRITICAL = true;
35:
36: /**
37: * The constant indicating that a <code>Control</code> is not critical.
38: */
39: public static final boolean NONCRITICAL = false;
40:
41: /**
42: * Returns the object ID assigned to this <code>Control</code> instance.
43: * (see RFC2251).
44: *
45: * @return the object ID assigned to the control
46: */
47: String getID();
48:
49: /**
50: * Indicates whether this <code>Control</code> instance is critical.
51: *
52: * @return true if critical, otherwise false
53: */
54: boolean isCritical();
55:
56: /**
57: * Returns the value of this <code>Control</code> instance encoded using
58: * ASN.1 Basic Encoding Rules (BER).
59: *
60: * @return the encoded value of this <code>Control</code> instance
61: */
62: byte[] getEncodedValue();
63:
64: }
|