001    /*
002     * CDDL HEADER START
003     *
004     * The contents of this file are subject to the terms of the
005     * Common Development and Distribution License, Version 1.0 only
006     * (the "License").  You may not use this file except in compliance
007     * with the License.
008     *
009     * You can obtain a copy of the license at
010     * trunk/opends/resource/legal-notices/OpenDS.LICENSE
011     * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
012     * See the License for the specific language governing permissions
013     * and limitations under the License.
014     *
015     * When distributing Covered Code, include this CDDL HEADER in each
016     * file and include the License file at
017     * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
018     * add the following below this CDDL HEADER, with the fields enclosed
019     * by brackets "[]" replaced with your own identifying information:
020     *      Portions Copyright [yyyy] [name of copyright owner]
021     *
022     * CDDL HEADER END
023     *
024     *
025     *      Copyright 2006-2008 Sun Microsystems, Inc.
026     */
027    package org.opends.server.core;
028    
029    import org.opends.server.protocols.asn1.ASN1OctetString;
030    import org.opends.server.types.Operation;
031    
032    
033    
034    /**
035     * This interface defines an extended operation, which can perform virtually any
036     * kind of task.
037     */
038    public interface ExtendedOperation
039           extends Operation
040    {
041      /**
042       * Retrieves the OID for the request associated with this extended
043       * operation.
044       *
045       * @return  The OID for the request associated with this extended
046       *          operation.
047       */
048      public String getRequestOID();
049    
050    
051    
052      /**
053       * Retrieves the value for the request associated with this extended
054       * operation.
055       *
056       * @return  The value for the request associated with this extended
057       *          operation.
058       */
059      public ASN1OctetString getRequestValue();
060    
061    
062    
063      /**
064       * Retrieves the OID to include in the response to the client.
065       *
066       * @return  The OID to include in the response to the client.
067       */
068      public String getResponseOID();
069    
070    
071    
072      /**
073       * Specifies the OID to include in the response to the client.
074       *
075       * @param  responseOID  The OID to include in the response to the
076       *                      client.
077       */
078      public void setResponseOID(String responseOID);
079    
080    
081    
082      /**
083       * Retrieves the value to include in the response to the client.
084       *
085       * @return  The value to include in the response to the client.
086       */
087      public ASN1OctetString getResponseValue();
088    
089    
090    
091      /**
092       * Specifies the value to include in the response to the client.
093       *
094       * @param  responseValue  The value to include in the response to
095       *                        the client.
096       */
097      public void setResponseValue(ASN1OctetString responseValue);
098    
099      /**
100       * Indicates that the response for this extended operation has been sent from
101       * somewhere outside of this class.  This should only be used by the StartTLS
102       * extended operation for the case in which it needs to send a response in the
103       * clear after TLS negotiation has already started on the connection.
104       */
105      public void setResponseSent();
106    }
107