You are viewing a plain text version of this content. The canonical link for it is here.
Posted to servletapi-dev@jakarta.apache.org by da...@apache.org on 2001/04/24 22:05:00 UTC

cvs commit: jakarta-servletapi-4/src/share/javax/servlet/http HttpServletRequest.java HttpSession.java HttpSessionAttributeListener.java HttpSessionBindingEvent.java

dannyc      01/04/24 13:05:00

  Modified:    src/share/javax/servlet/http HttpServletRequest.java
                        HttpSession.java HttpSessionAttributeListener.java
                        HttpSessionBindingEvent.java
  Log:
  Javadoc comment changes to sync up with Proposed Final Draft 2
  
  request.getAuthType() - can use == on statics
  listener notification ordering
  added couple of missing @since v2.3
  typo in HttpSessionBindingListener class comment and ref to deprecated method
  setAttribute("foo", null) behavior comment
  getSession() when using cookies and headers sent
  
  Revision  Changes    Path
  1.3       +12 -7     jakarta-servletapi-4/src/share/javax/servlet/http/HttpServletRequest.java
  
  Index: HttpServletRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-servletapi-4/src/share/javax/servlet/http/HttpServletRequest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HttpServletRequest.java	2001/03/16 23:45:35	1.2
  +++ HttpServletRequest.java	2001/04/24 20:04:59	1.3
  @@ -101,17 +101,20 @@
   
       /**
        * Returns the name of the authentication scheme used to protect
  -     * the servlet. All servlet containers support BASIC_AUTH, 
  -     * FORM_AUTH, and CLIENT_CERT_AUTH and may support DIGEST_AUTH.
  +     * the servlet. All servlet containers support basic, form and client 
  +     * certificate authentication, and may additionally support digest 
  +     * authentication.
        * If the servlet is not authenticated <code>null</code> is returned. 
        *
        * <p>Same as the value of the CGI variable AUTH_TYPE.
        *
        *
  -     * @return		a <code>String</code> specifying the name of
  -     *			the authentication scheme, or
  -     *			<code>null</code> if the request was not
  -     *			authenticated
  +     * @return		one of the static members BASIC_AUTH, 
  +     *			FORM_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH
  +     *			(suitable for == comparison) 
  +     *			indicating the authentication scheme, or 
  +     *			<code>null</code> if the request was 
  +     *			not authenticated.     
        *
        */
      
  @@ -571,7 +574,9 @@
        *
        * <p>To make sure the session is properly maintained,
        * you must call this method before 
  -     * the response is committed.
  +     * the response is committed. If the container is using cookies
  +     * to maintain session integrity and is asked to create a new session
  +     * when the response is committed, an IllegalStateException is thrown.
        *
        *
        *
  
  
  
  1.3       +11 -3     jakarta-servletapi-4/src/share/javax/servlet/http/HttpSession.java
  
  Index: HttpSession.java
  ===================================================================
  RCS file: /home/cvs/jakarta-servletapi-4/src/share/javax/servlet/http/HttpSession.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HttpSession.java	2001/03/16 23:45:36	1.2
  +++ HttpSession.java	2001/04/24 20:04:59	1.3
  @@ -334,16 +334,22 @@
        * <p>After this method executes, and if the new object
        * implements <code>HttpSessionBindingListener</code>,
        * the container calls 
  -     * <code>HttpSessionBindingListener.valueBound</code>.
  +     * <code>HttpSessionBindingListener.valueBound</code>. The container then   
  +     * notifies any <code>HttpSessionAttributeListener</code>s in the web 
  +     * application.
        
        * <p>If an object was already bound to this session of this name
        * that implements <code>HttpSessionBindingListener</code>, its 
        * <code>HttpSessionBindingListener.valueUnbound</code> method is called.
        *
  +     * <p>If the value passed in is null, this has the same effect as calling 
  +     * <code>removeAttribute()<code>.
  +     *
  +     *
        * @param name			the name to which the object is bound;
        *					cannot be null
        *
  -     * @param value			the object to be bound; cannot be null
  +     * @param value			the object to be bound
        *
        * @exception IllegalStateException	if this method is called on an
        *					invalidated session
  @@ -386,7 +392,9 @@
        * <p>After this method executes, and if the object
        * implements <code>HttpSessionBindingListener</code>,
        * the container calls 
  -     * <code>HttpSessionBindingListener.valueUnbound</code>.
  +     * <code>HttpSessionBindingListener.valueUnbound</code>. The container
  +     * then notifies any <code>HttpSessionAttributeListener</code>s in the web 
  +     * application.
        * 
        * 
        *
  
  
  
  1.2       +3 -3      jakarta-servletapi-4/src/share/javax/servlet/http/HttpSessionAttributeListener.java
  
  Index: HttpSessionAttributeListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-servletapi-4/src/share/javax/servlet/http/HttpSessionAttributeListener.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HttpSessionAttributeListener.java	2001/03/16 23:45:36	1.1
  +++ HttpSessionAttributeListener.java	2001/04/24 20:04:59	1.2
  @@ -69,11 +69,11 @@
   */
   
   public interface HttpSessionAttributeListener extends EventListener {
  -	/** Notification that an attribute has been added to a session.*/
  +	/** Notification that an attribute has been added to a session. Called after the attribute is added.*/
       public void attributeAdded ( HttpSessionBindingEvent se );
  -	/** Notification that an attribute has been removed from a session.*/
  +	/** Notification that an attribute has been removed from a session. Called after the attribute is removed. */
       public void attributeRemoved ( HttpSessionBindingEvent se );
  -	/** Notification that an attribute has been replaced in a session.*/
  +	/** Notification that an attribute has been replaced in a session. Called after the attribute is replaced. */
       public void attributeReplaced ( HttpSessionBindingEvent se );
   
   }
  
  
  
  1.3       +9 -8      jakarta-servletapi-4/src/share/javax/servlet/http/HttpSessionBindingEvent.java
  
  Index: HttpSessionBindingEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-servletapi-4/src/share/javax/servlet/http/HttpSessionBindingEvent.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HttpSessionBindingEvent.java	2001/03/16 23:45:37	1.2
  +++ HttpSessionBindingEvent.java	2001/04/24 20:04:59	1.3
  @@ -66,21 +66,21 @@
   
   /**
    *
  - * Either Sent to an object that implements
  + * Events of this type are either sent to an object that implements
    * {@link HttpSessionBindingListener} when it is bound or 
    * unbound from a session, or to a {@link HttpSessionAttributeListener} 
  - * that has been configured in the deploymewnt descriptor when any attribute is
  + * that has been configured in the deployment descriptor when any attribute is
    * bound, unbound or replaced in a session.
    *
  - * <p>Yhe session binds the object by a call to
  - * <code>HttpSession.putValue</code> and unbinds the object
  - * by a call to <code>HttpSession.removeValue</code>.
  + * <p>The session binds the object by a call to
  + * <code>HttpSession.setAttribute</code> and unbinds the object
  + * by a call to <code>HttpSession.removeAttribute</code>.
    *
    *
    *
    * @author		Various
    * @version		$Version$
  - * @since v2.3
  + * 
    * @see 		HttpSession
    * @see 		HttpSessionBindingListener
    * @see			HttpSessionAttributeListener
  @@ -159,7 +159,7 @@
       
       /**
        *
  -     * Returns the name with which the object is bound to or
  +     * Returns the name with which the attribute is bound to or
        * unbound from the session.
        *
        *
  @@ -175,11 +175,12 @@
       }
       
       /**
  -	* Returns the value of the attribute being added, removed or replaced.
  +	* Returns the value of the attribute that has been added, removed or replaced.
   	* If the attribute was added (or bound), this is the value of the attribute. If the attrubute was
   	* removed (or unbound), this is the value of the removed attribute. If the attribute was replaced, this
   	* is the old value of the attribute.
   	*
  +        * @since 2.3
   	*/
   	
   	public Object getValue() {