1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 *
19 */
20 package org.apache.directory.server.ldap;
21
22
23 import java.util.Set;
24
25 import org.apache.directory.shared.ldap.message.ExtendedRequest;
26
27
28 /**
29 * An extension (hook) point that enables an implementor to provide his or her
30 * own LDAP 'Extended' operation.
31 *
32 * @org.apache.xbean.XBean
33 *
34 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
35 * @version $Rev: 692919 $, $Date: 2008-09-07 21:00:21 +0200 (So, 07 Sep 2008) $
36 *
37 */
38 public interface ExtendedOperationHandler
39 {
40 /**
41 * Returns the EXTENSION_OID of the extended request this handler can handle.
42 */
43 String getOid();
44
45
46 /**
47 * The OIDs of the extensions supported by this handler. This includes the
48 * request as well as any responses associated with the request. These OIDs
49 * will be registered with the server to publish them as supportedExtensions.
50 *
51 * @return the OIDs supported by this handler.
52 */
53 Set<String> getExtensionOids();
54
55
56 /**
57 * Handles the specified extended operation.
58 *
59 * @param session the session object related with current connection
60 * @param req the LDAP Extended operation request
61 *
62 * @throws Exception if failed to handle the operation
63 */
64 void handleExtendedOperation( LdapSession session, ExtendedRequest req ) throws Exception;
65
66
67 /**
68 * Sets the LDAP server for this extendedOperation handler.
69 *
70 * @param ldapService the ldap protocol server
71 */
72 void setLdapServer( LdapService ldapService );
73 }