directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r385277 - in /directory/trunks/mina/core/src/main/java/org/apache/mina/common: IoSessionConfig.java support/BaseIoSessionConfig.java
Date Sun, 12 Mar 2006 11:34:32 GMT
Author: trustin
Date: Sun Mar 12 03:34:28 2006
New Revision: 385277

URL: http://svn.apache.org/viewcvs?rev=385277&view=rev
Log:
Removed unnecessary attribute access methods introduced mistakenly.

Modified:
    directory/trunks/mina/core/src/main/java/org/apache/mina/common/IoSessionConfig.java
    directory/trunks/mina/core/src/main/java/org/apache/mina/common/support/BaseIoSessionConfig.java

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/common/IoSessionConfig.java
URL: http://svn.apache.org/viewcvs/directory/trunks/mina/core/src/main/java/org/apache/mina/common/IoSessionConfig.java?rev=385277&r1=385276&r2=385277&view=diff
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/common/IoSessionConfig.java (original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/common/IoSessionConfig.java Sun
Mar 12 03:34:28 2006
@@ -18,8 +18,6 @@
  */
 package org.apache.mina.common;
 
-import java.util.Set;
-
 /**
  * The configuration of {@link IoSession}.
  * 
@@ -32,49 +30,4 @@
      * Returns a deep clone of this configuration.
      */
     Object clone();
-    
-    /**
-     * Returns the value of user-defined attribute of this session.
-     * 
-     * @param key the key of the attribute
-     * @return <tt>null</tt> if there is no attribute with the specified key
-     */
-    Object getAttribute( String key );
-    
-    /**
-     * Sets a user-defined attribute.
-     * 
-     * @param key the key of the attribute
-     * @param value the value of the attribute
-     * @return The old value of the attribute.  <tt>null</tt> if it is new.
-     */
-    Object setAttribute( String key, Object value );
-    
-    /**
-     * Sets a user defined attribute without a value.  This is useful when
-     * you just want to put a 'mark' attribute.  Its value is set to
-     * {@link Boolean#TRUE}.
-     * 
-     * @param key the key of the attribute
-     * @return The old value of the attribute.  <tt>null</tt> if it is new.
-     */
-    Object setAttribute( String key );
-    
-    /**
-     * Removes a user-defined attribute with the specified key.
-     * 
-     * @return The old value of the attribute.  <tt>null</tt> if not found.
-     */
-    Object removeAttribute( String key );
-    
-    /**
-     * Returns <tt>true</tt> if this session contains the attribute with
-     * the specified <tt>key</tt>.
-     */
-    boolean containsAttribute( String key );
-    
-    /**
-     * Returns the set of keys of all user-defined attributes.
-     */
-    Set getAttributeKeys();    
 }

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/common/support/BaseIoSessionConfig.java
URL: http://svn.apache.org/viewcvs/directory/trunks/mina/core/src/main/java/org/apache/mina/common/support/BaseIoSessionConfig.java?rev=385277&r1=385276&r2=385277&view=diff
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/common/support/BaseIoSessionConfig.java
(original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/common/support/BaseIoSessionConfig.java
Sun Mar 12 03:34:28 2006
@@ -18,11 +18,6 @@
  */
 package org.apache.mina.common.support;
 
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
 import org.apache.mina.common.IoSessionConfig;
 
 /**
@@ -33,8 +28,6 @@
  */
 public abstract class BaseIoSessionConfig implements IoSessionConfig, Cloneable
 {
-    private Map attributes = new HashMap();
-    
     protected BaseIoSessionConfig()
     {
     }
@@ -45,8 +38,6 @@
         try
         {
             ret = ( BaseIoSessionConfig ) super.clone();
-            ret.attributes = new HashMap();
-            ret.attributes.putAll( attributes );
         }
         catch( CloneNotSupportedException e )
         {
@@ -55,62 +46,4 @@
         
         return ret;
     }
-    
-    public Object getAttachment()
-    {
-        synchronized( attributes )
-        {
-            return attributes.get( "" );
-        }
-    }
-
-    public Object setAttachment( Object attachment )
-    {
-        synchronized( attributes )
-        {
-            return attributes.put( "", attachment );
-        }
-    }
-
-    public Object getAttribute( String key )
-    {
-        synchronized( attributes )
-        {
-            return attributes.get( key );
-        }
-    }
-
-    public Object setAttribute( String key, Object value )
-    {
-        synchronized( attributes )
-        {
-            return attributes.put( key, value );
-        }
-    }
-    
-    public Object setAttribute( String key )
-    {
-        return setAttribute( key, Boolean.TRUE );
-    }
-    
-    public Object removeAttribute( String key )
-    {
-        synchronized( attributes )
-        {
-            return attributes.remove( key );
-        }
-    }
-    
-    public boolean containsAttribute( String key )
-    {
-        return getAttribute( key ) != null;
-    }
-
-    public Set getAttributeKeys()
-    {
-        synchronized( attributes )
-        {
-            return new HashSet( attributes.keySet() );
-        }
-    }    
 }



Mime
View raw message