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.codec;
021    
022    /**
023     * An enum to store the Ldap message type.
024     *
025     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
026     * @version $Rev$, $Date$
027     */
028    public enum MessageTypeEnum
029    {
030        ABANDON_REQUEST(0),
031        ADD_REQUEST (1),
032        ADD_RESPONSE(2),
033        BIND_REQUEST(3),
034        BIND_RESPONSE(4),
035        COMPARE_REQUEST(5),
036        COMPARE_RESPONSE(6),
037        DEL_REQUEST(7),
038        DEL_RESPONSE(8),
039        EXTENDED_REQUEST(9),
040        EXTENDED_RESPONSE(10),
041        MODIFYDN_REQUEST(11),
042        MODIFYDN_RESPONSE(12),
043        MODIFY_REQUEST(13),
044        MODIFY_RESPONSE(14),
045        SEARCH_REQUEST(15),
046        SEARCH_RESULT_DONE(16),
047        SEARCH_RESULT_ENTRY(17),
048        SEARCH_RESULT_REFERENCE(18),
049        UNBIND_REQUEST(19),
050        INTERMEDIATE_RESPONSE(20);
051    
052        /** The internal value */
053        private int value;
054        
055        /** The message Type name */
056        private String name;
057        
058        private MessageTypeEnum( int value )
059        {
060            this.value = value;
061        }
062    }