directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r537074 - in /directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/replay: InMemoryReplayCache.java ReplayCache.java
Date Fri, 11 May 2007 03:13:38 GMT
Author: erodriguez
Date: Thu May 10 20:13:37 2007
New Revision: 537074

URL: http://svn.apache.org/viewvc?view=rev&rev=537074
Log:
Javadocs and minor warning clean-up.

Modified:
    directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/replay/InMemoryReplayCache.java
    directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/replay/ReplayCache.java

Modified: directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/replay/InMemoryReplayCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/replay/InMemoryReplayCache.java?view=diff&rev=537074&r1=537073&r2=537074
==============================================================================
--- directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/replay/InMemoryReplayCache.java
(original)
+++ directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/replay/InMemoryReplayCache.java
Thu May 10 20:13:37 2007
@@ -38,7 +38,7 @@
 {
     private static final long TWO_WEEKS = 1000 * 60 * 60 * 24 * 14;
 
-    private List list = new ArrayList();
+    private List<ReplayCacheEntry> list = new ArrayList<ReplayCacheEntry>();
 
 
     public synchronized boolean isReplay( KerberosTime clientTime, KerberosPrincipal clientPrincipal
)
@@ -90,19 +90,38 @@
         private KerberosPrincipal clientPrincipal;
 
 
-        public ReplayCacheEntry(KerberosTime time, KerberosPrincipal principal)
+        /**
+         * Creates a new instance of ReplayCacheEntry.
+         *
+         * @param time
+         * @param principal
+         */
+        public ReplayCacheEntry( KerberosTime time, KerberosPrincipal principal )
         {
             clientTime = time;
             clientPrincipal = principal;
         }
 
 
+        /**
+         * Returns whether this {@link ReplayCacheEntry} is equal another {@link ReplayCacheEntry}.
+         * {@link ReplayCacheEntry}'s are equal when the client time and the client principal
are equal.
+         *
+         * @param other
+         * @return true if the ReplayCacheEntry's are equal.
+         */
         public boolean equals( ReplayCacheEntry other )
         {
             return clientTime.equals( other.clientTime ) && clientPrincipal.equals(
other.clientPrincipal );
         }
 
 
+        /**
+         * Return whether this {@link ReplayCacheEntry} is older than a given time.
+         *
+         * @param time
+         * @return true if the {@link ReplayCacheEntry} is older.
+         */
         public boolean olderThan( KerberosTime time )
         {
             return time.greaterThan( clientTime );

Modified: directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/replay/ReplayCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/replay/ReplayCache.java?view=diff&rev=537074&r1=537073&r2=537074
==============================================================================
--- directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/replay/ReplayCache.java
(original)
+++ directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/replay/ReplayCache.java
Thu May 10 20:13:37 2007
@@ -31,8 +31,21 @@
  */
 public interface ReplayCache
 {
+    /**
+     * Returns whether a request is a replay, based on the client time and client principal.
+     *
+     * @param clientTime
+     * @param clientPrincipal
+     * @return true if the request is a replay.
+     */
     boolean isReplay( KerberosTime clientTime, KerberosPrincipal clientPrincipal );
 
 
+    /**
+     * Saves the client time and client principal to the replay cache.
+     *
+     * @param clientTime
+     * @param clientPrincipal
+     */
     void save( KerberosTime clientTime, KerberosPrincipal clientPrincipal );
 }



Mime
View raw message