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.extended; 021 022 023 import javax.naming.ldap.ExtendedResponse; 024 025 import org.apache.directory.shared.ldap.message.ExtendedRequestImpl; 026 027 028 /** 029 * An extended operation which launches an internal diagnostic UI. Only the 030 * administrator is authorized to execute this request. All other requestors 031 * will have a response with result code of insufficientAccessRights(50) sent. 032 * Any failures to launch the UI will return a operationsError(1) result code. 033 * 034 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 035 * @version $Rev: 482294 $ 036 */ 037 public class LaunchDiagnosticUiRequest extends ExtendedRequestImpl 038 { 039 private static final long serialVersionUID = -7481749915684864433L; 040 041 public static final String EXTENSION_OID = "1.3.6.1.4.1.18060.0.1.1"; 042 043 private static final byte[] EMPTY_PAYLOAD = new byte[0]; 044 045 046 public LaunchDiagnosticUiRequest(int messageId) 047 { 048 super( messageId ); 049 setOid( EXTENSION_OID ); 050 setPayload( EMPTY_PAYLOAD ); 051 } 052 053 054 public ExtendedResponse createExtendedResponse( String id, byte[] berValue, int offset, int length ) 055 { 056 return new LaunchDiagnosticUiResponse( getMessageId() ); 057 } 058 }