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: import javax.naming.NamingException;
22:
23: /**
24: * See RFC2251 for the definition of an <code>ExtendedRequest</code>.
25: *
26: * @see ExtendedResponse
27: */
28: public interface ExtendedRequest extends Serializable {
29:
30: /**
31: * Gets the object ID assigned to this request. (see RFC2251)
32: *
33: * @return the object ID assigned to this request
34: */
35: String getID();
36:
37: /**
38: * Gets the request encoded using ASN.1 Basic Encoding Rules (BER).
39: *
40: * @return the request encoded using ASN.1 BER
41: */
42: byte[] getEncodedValue();
43:
44: /**
45: * Returns a suitable <code>ExtendedResponse</code> object for this
46: * request. The method parameters provide the data obtained by the service
47: * provider from the LDAP server for this request.
48: *
49: * @param s
50: * the object identifier of the response control. May be null.
51: * @param value
52: * holds the value of the response control as raw ASN.1 BER
53: * encoded bytes, including the tag and length of the response
54: * but excluding its OID.
55: * @param i
56: * specifies the start index of useable data within array
57: * <code>value</code>.
58: * @param i2
59: * specifies the number of data bytes to use within array
60: * <code>value</code>.
61: * @return a suitable <code>ExtendedResponse</code> object for this
62: * request.
63: *
64: * @throws NamingException
65: * If an error is encountered.
66: */
67: ExtendedResponse createExtendedResponse(String s, byte[] value,
68: int i, int i2) throws NamingException;
69:
70: }
|