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 */ 020 package org.apache.directory.shared.ldap.message.internal; 021 022 import org.apache.directory.shared.ldap.codec.MessageTypeEnum; 023 import org.apache.directory.shared.ldap.message.SingleReplyRequest; 024 025 026 /** 027 * Extended protocol request message used to add to more operations to the 028 * protocol. Here's what <a href="http://www.faqs.org/rfcs/rfc2251.html"> RFC 029 * 2251</a> says about it: 030 * 031 * <pre> 032 * 4.12. Extended Operation 033 * 034 * An extension mechanism has been added in this version of LDAP, in 035 * order to allow additional operations to be defined for services not 036 * available elsewhere in this protocol, for instance digitally signed 037 * operations and results. 038 * 039 * The extended operation allows clients to make requests and receive 040 * responses with predefined syntaxes and semantics. These may be 041 * defined in RFCs or be private to particular implementations. Each 042 * request MUST have a unique OBJECT IDENTIFIER assigned to it. 043 * 044 * ExtendedRequest ::= [APPLICATION 23] SEQUENCE { 045 * requestName [0] LDAPOID, 046 * requestValue [1] OCTET STRING OPTIONAL } 047 * 048 * The requestName is a dotted-decimal representation of the OBJECT 049 * IDENTIFIER corresponding to the request. The requestValue is 050 * information in a form defined by that request, encapsulated inside an 051 * OCTET STRING. 052 * <pre> 053 * <br> 054 * 055 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 056 * @version $Revision: 910150 $ 057 * 058 */ 059 public interface InternalExtendedRequest extends SingleReplyRequest, javax.naming.ldap.ExtendedRequest 060 { 061 /** Extended request message type enumeration value */ 062 MessageTypeEnum TYPE = MessageTypeEnum.EXTENDED_REQUEST; 063 064 /** Extended response message type enumeration value */ 065 MessageTypeEnum RESP_TYPE = InternalExtendedResponse.TYPE; 066 067 068 /** 069 * Gets the Object Idendifier corresponding to the extended request type. 070 * This is the <b>requestName</b> portion of the ext. req. PDU. 071 * 072 * @return the dotted-decimal representation as a String of the OID 073 */ 074 String getOid(); 075 076 077 /** 078 * Sets the Object Idendifier corresponding to the extended request type. 079 * 080 * @param oid 081 * the dotted-decimal representation as a String of the OID 082 */ 083 void setOid( String oid ); 084 085 086 /** 087 * Gets the extended request's <b>requestValue</b> portion of the PDU. The 088 * form of the data is request specific and is determined by the extended 089 * request OID. 090 * 091 * @return byte array of data 092 */ 093 byte[] getPayload(); 094 095 096 /** 097 * Sets the extended request's <b>requestValue</b> portion of the PDU. 098 * 099 * @param payload 100 * byte array of data encapsulating ext. req. parameters 101 */ 102 void setPayload( byte[] payload ); 103 }