View Javadoc

1   /*
2    *  Licensed to the Apache Software Foundation (ASF) under one
3    *  or more contributor license agreements.  See the NOTICE file
4    *  distributed with this work for additional information
5    *  regarding copyright ownership.  The ASF licenses this file
6    *  to you under the Apache License, Version 2.0 (the
7    *  "License"); you may not use this file except in compliance
8    *  with the License.  You may obtain a copy of the License at
9    *  
10   *    http://www.apache.org/licenses/LICENSE-2.0
11   *  
12   *  Unless required by applicable law or agreed to in writing,
13   *  software distributed under the License is distributed on an
14   *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   *  KIND, either express or implied.  See the License for the
16   *  specific language governing permissions and limitations
17   *  under the License. 
18   *  
19   */
20  package org.apache.directory.server.kerberos.shared.messages.components;
21  
22  
23  import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
24  import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
25  
26  
27  /**
28   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
29   * @version $Rev: 540371 $, $Date: 2007-05-22 02:00:43 +0200 (Di, 22 Mai 2007) $
30   */
31  public class EncApRepPartModifier
32  {
33      private KerberosTime clientTime;
34      private int cusec;
35      private EncryptionKey subSessionKey; //optional
36      private Integer sequenceNumber; //optional
37  
38  
39      /**
40       * Returns the {@link EncApRepPart}.
41       *
42       * @return The {@link EncApRepPart}.
43       */
44      public EncApRepPart getEncApRepPart()
45      {
46          return new EncApRepPart( clientTime, cusec, subSessionKey, sequenceNumber );
47      }
48  
49  
50      /**
51       * Sets the client {@link KerberosTime}.
52       *
53       * @param clientTime
54       */
55      public void setClientTime( KerberosTime clientTime )
56      {
57          this.clientTime = clientTime;
58      }
59  
60  
61      /**
62       * Sets the client microsecond.
63       *
64       * @param cusec
65       */
66      public void setClientMicroSecond( int cusec )
67      {
68          this.cusec = cusec;
69      }
70  
71  
72      /**
73       * Sets the sub-session {@link EncryptionKey}.
74       *
75       * @param subSessionKey
76       */
77      public void setSubSessionKey( EncryptionKey subSessionKey )
78      {
79          this.subSessionKey = subSessionKey;
80      }
81  
82  
83      /**
84       * Sets the sequence number.
85       *
86       * @param sequenceNumber
87       */
88      public void setSequenceNumber( Integer sequenceNumber )
89      {
90          this.sequenceNumber = sequenceNumber;
91      }
92  }