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.server.kerberos.shared.messages.application;
021    
022    
023    import org.apache.directory.server.kerberos.shared.KerberosMessageType;
024    import org.apache.directory.server.kerberos.shared.messages.KerberosMessage;
025    import org.apache.directory.server.kerberos.shared.messages.value.EncryptedData;
026    
027    
028    /**
029     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
030     * @version $Rev: 589780 $, $Date: 2007-10-29 19:14:59 +0100 (Mon, 29 Oct 2007) $
031     */
032    public class PrivateMessage extends KerberosMessage
033    {
034        private EncryptedData encryptedPart;
035    
036    
037        /**
038         * Creates a new instance of PrivateMessage.
039         */
040        public PrivateMessage()
041        {
042            super( KerberosMessageType.KRB_PRIV );
043            // used by ASN.1 decoder
044        }
045    
046    
047        /**
048         * Creates a new instance of PrivateMessage.
049         *
050         * @param encryptedPart
051         */
052        public PrivateMessage( EncryptedData encryptedPart )
053        {
054            super( KerberosMessageType.KRB_PRIV );
055            this.encryptedPart = encryptedPart;
056        }
057    
058    
059        /**
060         * Returns the {@link EncryptedData}.
061         *
062         * @return The {@link EncryptedData}.
063         */
064        public EncryptedData getEncryptedPart()
065        {
066            return encryptedPart;
067        }
068    
069    
070        /**
071         * Sets the {@link EncryptedData}.
072         *
073         * @param encryptedData
074         */
075        public void setEncryptedPart( EncryptedData encryptedData )
076        {
077            encryptedPart = encryptedData;
078        }
079    }