You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2003/11/29 19:06:36 UTC

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session StandardManager.java StandardSession.java

remm        2003/11/29 10:06:35

  Modified:    catalina/src/share/org/apache/catalina/session
                        StandardManager.java StandardSession.java
  Log:
  - private -> protected. A lot of this package should be protected, as there could
    be an good use case to reuse code by extending.
  - No functional change.
  
  Revision  Changes    Path
  1.15      +12 -12    jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StandardManager.java
  
  Index: StandardManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StandardManager.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- StandardManager.java	9 Sep 2003 15:27:00 -0000	1.14
  +++ StandardManager.java	29 Nov 2003 18:06:35 -0000	1.15
  @@ -145,7 +145,7 @@
       /**
        * The descriptive information about this implementation.
        */
  -    private static final String info = "StandardManager/1.0";
  +    protected static final String info = "StandardManager/1.0";
   
   
       /**
  @@ -157,7 +157,7 @@
       /**
        * The maximum number of active Sessions allowed, or -1 for no limit.
        */
  -    private int maxActiveSessions = -1;
  +    protected int maxActiveSessions = -1;
   
   
       /**
  @@ -174,13 +174,13 @@
        * temporary working directory provided by our context, available via
        * the <code>javax.servlet.context.tempdir</code> context attribute.
        */
  -    private String pathname = "SESSIONS.ser";
  +    protected String pathname = "SESSIONS.ser";
   
   
       /**
        * Has this component been started yet?
        */
  -    private boolean started = false;
  +    protected boolean started = false;
   
   
       int rejectedSessions=0;
  @@ -388,7 +388,7 @@
        *  found during the reload
        * @exception IOException if an input/output error occurs
        */
  -    private void doLoad() throws ClassNotFoundException, IOException {    
  +    protected void doLoad() throws ClassNotFoundException, IOException {    
           if (log.isDebugEnabled())
               log.debug("Start: Loading persisted sessions");
   
  @@ -527,7 +527,7 @@
        *
        * @exception IOException if an input/output error occurs
        */
  -    private void doUnload() throws IOException {   
  +    protected void doUnload() throws IOException {   
   
           if (log.isDebugEnabled())
               log.debug("Unloading persisted sessions");
  @@ -773,14 +773,14 @@
       }
   
   
  -    // -------------------------------------------------------- Private Methods
  +    // ------------------------------------------------------ Protected Methods
   
   
       /**
        * Return a File object representing the pathname to our
        * persistence file, if any.
        */
  -    private File file() {
  +    protected File file() {
   
           if ((pathname == null) || (pathname.length() == 0))
               return (null);
  
  
  
  1.26      +37 -37    jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StandardSession.java
  
  Index: StandardSession.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StandardSession.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- StandardSession.java	25 Nov 2003 07:56:27 -0000	1.25
  +++ StandardSession.java	29 Nov 2003 18:06:35 -0000	1.26
  @@ -149,14 +149,14 @@
        * The dummy attribute value serialized when a NotSerializableException is
        * encountered in <code>writeObject()</code>.
        */
  -    private static final String NOT_SERIALIZED =
  +    protected static final String NOT_SERIALIZED =
           "___NOT_SERIALIZABLE_EXCEPTION___";
   
   
       /**
        * The collection of user data attributes associated with this Session.
        */
  -    private HashMap attributes = new HashMap();
  +    protected HashMap attributes = new HashMap();
   
   
       /**
  @@ -164,7 +164,7 @@
        * if any.  NOTE:  This value is not included in the serialized
        * version of this object.
        */
  -    private transient String authType = null;
  +    protected transient String authType = null;
   
   
       /**
  @@ -175,13 +175,13 @@
        * computed dynamically the first time it is needed, or after
        * a session reload (since it is declared transient).
        */
  -    private transient Method containerEventMethod = null;
  +    protected transient Method containerEventMethod = null;
   
   
       /**
        * The method signature for the <code>fireContainerEvent</code> method.
        */
  -    private static final Class containerEventTypes[] =
  +    protected static final Class containerEventTypes[] =
       { String.class, Object.class };
   
   
  @@ -189,14 +189,14 @@
        * The time this session was created, in milliseconds since midnight,
        * January 1, 1970 GMT.
        */
  -    private long creationTime = 0L;
  +    protected long creationTime = 0L;
   
   
       /**
        * The debugging detail level for this component.  NOTE:  This value
        * is not included in the serialized version of this object.
        */
  -    private transient int debug = 0;
  +    protected transient int debug = 0;
   
   
       /**
  @@ -204,44 +204,44 @@
        * certain IllegalStateException tests.  NOTE:  This value is not
        * included in the serialized version of this object.
        */
  -    private transient boolean expiring = false;
  +    protected transient boolean expiring = false;
   
   
       /**
        * The facade associated with this session.  NOTE:  This value is not
        * included in the serialized version of this object.
        */
  -    private transient StandardSessionFacade facade = null;
  +    protected transient StandardSessionFacade facade = null;
   
   
       /**
        * The session identifier of this Session.
        */
  -    private String id = null;
  +    protected String id = null;
   
   
       /**
        * Descriptive information describing this Session implementation.
        */
  -    private static final String info = "StandardSession/1.0";
  +    protected static final String info = "StandardSession/1.0";
   
   
       /**
        * The last accessed time for this Session.
        */
  -    private long lastAccessedTime = creationTime;
  +    protected long lastAccessedTime = creationTime;
   
   
       /**
        * The session event listeners for this Session.
        */
  -    private transient ArrayList listeners = new ArrayList();
  +    protected transient ArrayList listeners = new ArrayList();
   
   
       /**
        * The Manager with which this Session is associated.
        */
  -    private Manager manager = null;
  +    protected Manager manager = null;
   
   
       /**
  @@ -249,19 +249,19 @@
        * the servlet container may invalidate this session.  A negative time
        * indicates that the session should never time out.
        */
  -    private int maxInactiveInterval = -1;
  +    protected int maxInactiveInterval = -1;
   
   
       /**
        * Flag indicating whether this session is new or not.
        */
  -    private boolean isNew = false;
  +    protected boolean isNew = false;
   
   
       /**
        * Flag indicating whether this session is valid or not.
        */
  -    private boolean isValid = false;
  +    protected boolean isValid = false;
   
   
       /**
  @@ -269,7 +269,7 @@
        * and event listeners.  <b>IMPLEMENTATION NOTE:</b> This object is
        * <em>not</em> saved and restored across session serializations!
        */
  -    private transient HashMap notes = new HashMap();
  +    protected transient HashMap notes = new HashMap();
   
   
       /**
  @@ -277,34 +277,34 @@
        * <b>IMPLEMENTATION NOTE:</b>  This object is <i>not</i> saved and
        * restored across session serializations!
        */
  -    private transient Principal principal = null;
  +    protected transient Principal principal = null;
   
   
       /**
        * The string manager for this package.
        */
  -    private static StringManager sm =
  +    protected static StringManager sm =
           StringManager.getManager(Constants.Package);
   
   
       /**
        * The HTTP session context associated with this session.
        */
  -    private static HttpSessionContext sessionContext = null;
  +    protected static HttpSessionContext sessionContext = null;
   
   
       /**
        * The property change support for this component.  NOTE:  This value
        * is not included in the serialized version of this object.
        */
  -    private transient PropertyChangeSupport support =
  +    protected transient PropertyChangeSupport support =
           new PropertyChangeSupport(this);
   
   
       /**
        * The current accessed time for this session.
        */
  -    private long thisAccessedTime = creationTime;
  +    protected long thisAccessedTime = creationTime;
   
   
       // ----------------------------------------------------- Session Properties
  @@ -1358,7 +1358,7 @@
       }
   
   
  -    // -------------------------------------------- HttpSession Private Methods
  +    // ------------------------------------------ HttpSession Protected Methods
   
   
       /**
  @@ -1373,7 +1373,7 @@
        * @exception ClassNotFoundException if an unknown class is specified
        * @exception IOException if an input/output error occurs
        */
  -    private void readObject(ObjectInputStream stream)
  +    protected void readObject(ObjectInputStream stream)
           throws ClassNotFoundException, IOException {
   
           // Deserialize the scalar instance variables (except Manager)
  @@ -1432,7 +1432,7 @@
        *
        * @exception IOException if an input/output error occurs
        */
  -    private void writeObject(ObjectOutputStream stream) throws IOException {
  +    protected void writeObject(ObjectOutputStream stream) throws IOException {
   
           // Write the scalar instance variables (except Manager)
           stream.writeObject(new Long(creationTime));
  @@ -1485,7 +1485,7 @@
       }
   
   
  -    private void evaluateIfValid() {
  +    protected void evaluateIfValid() {
           /*
   	 * If this session has expired or is in the process of expiring or
   	 * will never expire, return
  @@ -1504,7 +1504,7 @@
       }
   
   
  -    // -------------------------------------------------------- Private Methods
  +    // ------------------------------------------------------ Protected Methods
   
   
       /**
  @@ -1517,7 +1517,7 @@
        *
        * @exception Exception occurred during event firing
        */
  -    private void fireContainerEvent(Context context,
  +    protected void fireContainerEvent(Context context,
                                       String type, Object data)
           throws Exception {
   
  @@ -1569,7 +1569,7 @@
        * as an array of Strings.  If there are no defined attributes, a
        * zero-length array is returned.
        */
  -    private String[] keys() {
  +    protected String[] keys() {
   
           String results[] = new String[0];
           synchronized (attributes) {
  @@ -1582,7 +1582,7 @@
       /**
        * Return the value of an attribute without a check for validity.
        */
  -    private Object getAttributeInternal(String name) {
  +    protected Object getAttributeInternal(String name) {
   
           synchronized (attributes) {
               return (attributes.get(name));
  @@ -1628,7 +1628,7 @@
   }
   
   
  -// -------------------------------------------------------------- Private Class
  +// ------------------------------------------------------------ Protected Class
   
   
   /**
  @@ -1645,7 +1645,7 @@
   final class StandardSessionContext implements HttpSessionContext {
   
   
  -    private HashMap dummy = new HashMap();
  +    protected HashMap dummy = new HashMap();
   
       /**
        * Return the session identifiers of all sessions defined
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org