001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 * 019 */ 020package org.apache.directory.api.ldap.model.message; 021 022 023/** 024 * Extended protocol request message used to add to more operations to the 025 * protocol. Here's what <a href="http://www.faqs.org/rfcs/rfc2251.html"> RFC 026 * 2251</a> says about it: 027 * 028 * <pre> 029 * 4.12. Extended Operation 030 * 031 * An extension mechanism has been added in this version of LDAP, in 032 * order to allow additional operations to be defined for services not 033 * available elsewhere in this protocol, for instance digitally signed 034 * operations and results. 035 * 036 * The extended operation allows clients to make requests and receive 037 * responses with predefined syntaxes and semantics. These may be 038 * defined in RFCs or be private to particular implementations. Each 039 * request MUST have a unique OBJECT IDENTIFIER assigned to it. 040 * 041 * ExtendedRequest ::= [APPLICATION 23] SEQUENCE { 042 * requestName [0] LDAPOID, 043 * requestValue [1] OCTET STRING OPTIONAL } 044 * 045 * The requestName is a dotted-decimal representation of the OBJECT 046 * IDENTIFIER corresponding to the request. The requestValue is 047 * information in a form defined by that request, encapsulated inside an 048 * OCTET STRING. 049 * </pre> 050 * <br> 051 * 052 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 053 * 054 */ 055public interface ExtendedRequest extends SingleReplyRequest 056{ 057 /** 058 * Gets the Object Identifier corresponding to the extended request type. 059 * This is the <b>requestName</b> portion of the ExtendedRequst PDU. 060 * 061 * @return the dotted-decimal representation as a String of the OID 062 */ 063 String getRequestName(); 064 065 066 /** 067 * Sets the Object Identifier corresponding to the extended request type. 068 * 069 * @param oid the dotted-decimal representation as a String of the OID 070 * @return The ExtendedRequest instance 071 */ 072 ExtendedRequest setRequestName( String oid ); 073 074 075 /** 076 * {@inheritDoc} 077 */ 078 @Override 079 ExtendedRequest setMessageId( int messageId ); 080 081 082 /** 083 * {@inheritDoc} 084 */ 085 @Override 086 ExtendedRequest addControl( Control control ); 087 088 089 /** 090 * {@inheritDoc} 091 */ 092 @Override 093 ExtendedRequest addAllControls( Control[] controls ); 094 095 096 /** 097 * {@inheritDoc} 098 */ 099 @Override 100 ExtendedRequest removeControl( Control control ); 101}