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.api.ldap.model.message; 21 22 23 /** 24 * Extended protocol request message used to add to more operations to the 25 * protocol. Here's what <a href="http://www.faqs.org/rfcs/rfc2251.html"> RFC 26 * 2251</a> says about it: 27 * 28 * <pre> 29 * 4.12. Extended Operation 30 * 31 * An extension mechanism has been added in this version of LDAP, in 32 * order to allow additional operations to be defined for services not 33 * available elsewhere in this protocol, for instance digitally signed 34 * operations and results. 35 * 36 * The extended operation allows clients to make requests and receive 37 * responses with predefined syntaxes and semantics. These may be 38 * defined in RFCs or be private to particular implementations. Each 39 * request MUST have a unique OBJECT IDENTIFIER assigned to it. 40 * 41 * ExtendedRequest ::= [APPLICATION 23] SEQUENCE { 42 * requestName [0] LDAPOID, 43 * requestValue [1] OCTET STRING OPTIONAL } 44 * 45 * The requestName is a dotted-decimal representation of the OBJECT 46 * IDENTIFIER corresponding to the request. The requestValue is 47 * information in a form defined by that request, encapsulated inside an 48 * OCTET STRING. 49 * </pre> 50 * <br> 51 * 52 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 53 * 54 */ 55 public interface ExtendedRequest extends SingleReplyRequest 56 { 57 /** 58 * Gets the Object Identifier corresponding to the extended request type. 59 * This is the <b>requestName</b> portion of the ExtendedRequst PDU. 60 * 61 * @return the dotted-decimal representation as a String of the OID 62 */ 63 String getRequestName(); 64 65 66 /** 67 * Sets the Object Identifier corresponding to the extended request type. 68 * 69 * @param oid the dotted-decimal representation as a String of the OID 70 * @return The ExtendedRequest instance 71 */ 72 ExtendedRequest setRequestName( String oid ); 73 74 75 /** 76 * {@inheritDoc} 77 */ 78 @Override 79 ExtendedRequest setMessageId( int messageId ); 80 81 82 /** 83 * {@inheritDoc} 84 */ 85 @Override 86 ExtendedRequest addControl( Control control ); 87 88 89 /** 90 * {@inheritDoc} 91 */ 92 @Override 93 ExtendedRequest addAllControls( Control[] controls ); 94 95 96 /** 97 * {@inheritDoc} 98 */ 99 @Override 100 ExtendedRequest removeControl( Control control ); 101 }