Standard Jet DBnb` Ugr@?~1y0̝cÒFNjh7ל*(%`{6߱gC#<3y[~&|*|$Cf_Љ$g'DeFx -bT4.0G  dv YS  Y % Y%Y% Y%Y% Y %DY% Y % Y % Y % Y% Y% Y%2Y% Y % Y %Y%ConnectDatabaseDateCreateDateUpdate FlagsForeignNameIdLvLvExtraLvModule LvPropName OwnerParentIdRmtInfoLongRmtInfoShortTypeYYIdParentIdName        OY;SY%Y%Y% Y%2ACMFInheritableObjectIdSID  AtYObjectId YSY% Y%Y%Y% Y% Y%Y% Y%AttributeExpressionFlagLvExtra Name1 Name2ObjectId Order Y"ObjectIdAttribute -YSY%Y%Y% Y% Y% Y% Y% Y%ccolumn grbiticolumnszColumnszObject$szReferencedColumn$szReferencedObjectszRelationship   YYYszObject$szReferencedObjectszRelationshipYv1b N  : k & W  C t/ @@7   @ OJmJJMMQkkfJUQkOJmJLJkQkSdi`k `dOo^Qk iQ^JmYdbkWYfkiQfdimk kMiYfmk kvkiQ^ mJL^Qk+m`fM^f8HD:88WYbOQOWYbOQO+:^Jo^oO^YbUYO^YbUYO+:`kvkJMMQkkdL[QMmk`kvkJMQk`kvkdL[QMmk`kvkhoQiYQk`kvkiQ^JmYdbkWYfkfJ^^YOJMMQkk^Jvdom`kvkOLQ  @ @ @     x  @ @ @ @ @ @ @ !"#$%&'()* +,  -.x/x056?@CDEFGH      d _ Z c  ~ ! 3 Ʌ ɅɅɅ. .ɡRր@ր@hinded_2'22222222220 ր@ր@Lingid_2'22222222220 I/C@Nz@~TMPCLP197211'(MR2$ FilterOrderByppp<<<<<<<: @@|@hinded'@:::......., @Boˁ@#p@Lingid'/@:::......., @x َ}@67}@laulud')@:::......., @ z^O}@}9@AccessLayout'4MR2KeepLocal T@ zz:::::::8 @|N}@|N}@pallid'.........., UmK<}@UmK<}@DataAccessPages'@@@@@@@@@@> UmK<}@UmK<}@SysRel'.........., UmK<}@UmK<}@Modules'0000000000. UmK<}@UmK<}@Scripts'0000000000. UmK<}@UmK<}@Reports'0000000000. UmK<}@UmK<}@Forms',,,,,,,,,,* E@<}@jC<}@MSysAccessObjects'DDDDDDDDDDB X}@X}@MSysRelationships%DDDDDDDDDDB X}@X}@MSysQueries%88888888886 X}@X}@MSysACEs%22222222220 X}@X}@MSysObjects%88888888886 X}@X}@MSysDb'\@:::......., @X}@X}@Relationships%<<<<<<<<<<: X}@X}@Databases%44444444442 6V}@6V}@Tables%.........., {I{hUB/ 3  p I 6 #  s ` 9 &  %  ȳȳȳȳȳȳȳȠȍzgTA. ' ' ' ' ' ' ' ' ' ' x' x' ' ' TFoP_?*RBR ݢA_ \k~ 3?wQUJf>Owl #lB@]{{8;w~V ~t8?1gp @FoP_?*RBR ݢA_ \k~ 3?wQUJf>Owl #lB@]{{8;w~V ~t8?1gp " ' FoP_?*RBR ݢA_ \k~ 3?wQUJf>Owl #lB@]{{8;w~V ~t8?1gp ' " ' FoP_?*RBR ݢA_ \k~ 3?wQUJf>Owl #lB@]{{8;w~V ~t8?1gp ' " ' FoP_?*RBR ݢA_ \k~ 3?wQUJf>Owl #lB@]{{8;w~V ~t8?1gp ' " ' FoP_?*RBR ݢA_ \k~ 3?wQUJf>Owl #lB@]{{8;w~V ~t8?1gp ' " ' FoP_?*RBR ݢA_ \k~ 3?wQUJf>Owl #lB@]{{8;w~V ~t8?1gp ' " ' FoP_?*RBR ݢA_ \k~ 3?wQUJf>Owl #lB@]{{8;w~V ~t8?1gp ' FoP_?*RBR ݢA_ \k~ 3?wQUJf>Owl #lB@]{{8;w~V ~t8?1gp ' ' ' ' ' ' ' ' ' ' ' " ' " ' ' ' '  LVALФϤϤϤϤ{ {{{{{{{{{{{{{{L LLLLLLLYMR2ValidationRuleValidationTextOrientation FilterOrderByOrderByOnNameMapColumnWidthColumnOrderColumnHiddenDescription FormatCaptionDecimalPlacesInputMaskDefaultValueRequiredDisplayControlGUID    U+znP s@hinded-znP +znP id.znP +znP lingi_id,znP +znP hinne B\nP I id     C\nP {lingi_id        0  m D\nP u hinne        0  mMR2ValidationRuleValidationTextOrientation FilterOrderByOrderByOnNameMapColumnWidthColumnOrderColumnHiddenDescription FormatCaptionDecimalPlacesInputMaskDefaultValueRequiredDisplayControlGUID    U+znP s@hinded-znP +znP id.znP +znP lingi_id,znP +znP hinne B\nP I id     C\nP {lingi_id        0  m D\nP u hinne        0  m E\nP MR2ValidationRuleValidationTextOrientation FilterOrderByOrderByOnNameMapColumnWidthColumnOrderColumnHiddenDescription FormatCaptionInputMaskDefaultValueRequiredAllowZeroLengthDisplayControl$UnicodeCompressionDecimalPlacesGUID    U0HknP \K@Lingid0HknP 0HknP ID0HknP 0HknP Link0HknP 0HknP aadress 0HknP I ID     0HknP rLink       m  0HknP xaadress v      m  0HknP MR2 FilterOrderByOrderByOnNameMapColumnWidthColumnOrderColumnHiddenGUID   U0nP nߎ}@laulud0nP 0nP pealkiri0nP 0nP esineja 0nP Upealkiri    0nP Sesineja    0nP MR2.AccessVersion Build* 08.50   Y$6PNY%Y%bkDataIDYAOIndexv1     K[{hUB/ &b9Tpp̼p؉bsvDDDDS@D `\T {|{Pz[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[rs`} ~@T[MSysAccounts  K[ @ @ࡱ>   DirData-Root Entry ԷrPropData Forms ӷrӷrReportsӷrӷrijModulesӷrӷrScriptsӷrӷrVBA ӷri׷rCmdbarsӷrӷrDataAccessPages ӷrӷrDatabases ӷr& r0 Էr& rBlob CustomGroups  Էr ԷrVBAProjectYc׷rYc׷rAcessVBADataK[v1CustomGroups  Էr ԷrVBAProjectYc׷r׷rAcessVBADataVBAj׷r׷r  PROJECTwmPROJECT_VBA_PROJECTdir|  !"#$%&'()*+,Root Entry& r PropData Forms ӷrӷrReportsӷrӷrijID="{3A5193A3-DEC4-11D7-806E-0050BF06200D}" Name="Baas1" HelpContextID="0" VersionCompatible32="393222000" CMG="83812CB3ABB7ABB7ABB7ABB7" DPB="0604A930AF303331333133" GC="898B263B273B27C4" [Host Extender Info] &H00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H00000000 x0* pHd Baas1 @8= Vh @ܭ@ J< rstdole>stdole f%\*\G{00020430-C 0046}#2.0#0#C:\WINDOWS\S@YSTEM\c2.tlb#OLE AutomatXion^ADODB> ADOBCCD1C10-8CAA006D2EA4C1CPROGRAM FILES\COMMONL9\msado15.dll#Microsoft ActiveX Data Objects 2.1 LibraryHS am% *\G{000204EF-0000-0000-C000-000000000046}#4.0#9#C:\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\VBA\VBA6\VBE6.DLL#Visual Basic For Applications*\G{4AFFC9A0-5F99-101B-AF4E-00AA003F0F07}#9.0#0#CK[N:\Program Files\Microsoft Office\Office\MSACC9.OLB#Microsoft Access 9.0 Object Library*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\SYSTEM\stdole2.tlb#OLE Automation*\G{00000201-0000-0010-8000-00AA006D2EA4}#2.1#0#C:\PROGRAM FILES\COMMON FILES\SYSTEM\ADO\msado15.dll#Microsoft ActiveX Data Objects 2.1 Libraryܭ@Sx %AccessVBAWin16~Win32MacVBA6#Project1 stdole`Baas1ADODBs<  MSysDbfYNY% kogus  #dv _ Z c  ~ ! 3  p I 6 #  s ` 9 &  %  ' TFoP_?*RBR ݢA_ \k~ 3?wQUJf>Owl #lB@]{{8;w~V ~t8?1gp @FoP_?*RBR ݢA_ \k~ 3?wQUJf>Owl #lB@]{{8;w~V ~t8?1gp " ' FoP_?*RBR ݢA_ \k~ 3?wQUJf>Owl #lB@]{{8;w~V ~t8?1gp ' " |N}@|N}@pallid'.........., UmK<}@UmK<}@DataAccessPages'@@@@@@@@@@> UmK<}@UmK<}@SysRel'.........., UmK<}@UmK<}@Modules'0000000000. UmK<}@UmK<}@Scripts'0000000000. UmK<}@UmK<}@Reports'0000000000. UmK<}@UmK<}@Forms',,,,,,,,,,* E@<}@jC<}@MSysAccessObjects'DDDDDDDDDDB X}@X}@MSysRelationships%DDDDDDDDDDB X}@X}@MSysQueries%88888888886 X}@X}@MSysACEs%22222222220 X}@X}@MSysObjects%88888888886 X}@X}@MSysDb'\@:::......., @X}@X}@Relationships%<<<<<<<<<<: X}@X}@Databases%44444444442 6V}@6V  LVAL > ~ !  ʾlaulud f^3ʾlaulud f^3) { // Validate the source of this event if (!(event.getSource() instanceof Context)) return; Context context = (Context) event.getSource(); // Process a relevant property change if (event.getPropertyName().equals("sessionTimeout")) { try { setMaxInactiveInterval ( ((Integer) event.getNewValue()).intValue()*60 ); } catch (NumberFormatException e) { log(sm.getString("standardManager.sessionTimeout", event.getNewValue().toString())); } } } // -------------------------------------------------------- Private Methods /** * Return a File object representing the pathname to our * persistence file, if any. */ private File file() { if ((pathname == null) || (pathname.length() == 0)) return (null); File file = new File(pathname); if (!file.isAbsolute()) { if (container instanceof Context) { ServletContext servletContext = ((Context) container).getServletContext(); File tempdir = (File) servletContext.getAttribute(Globals.WORK_DIR_ATTR); if (tempdir != null) file = new File(tempdir, pathname); } } // if (!file.isAbsolute()) // return (null); return (file); } /** * Invalidate all sessions that have expired. */ private void processExpires() { long timeNow = System.currentTimeMillis(); Session sessions[] = findSessions(); for (int i = 0; i < sessions.length; i++) { StandardSession session = (StandardSession) sessions[i]; if (!session.isValid()) continue; int maxInactiveInterval = session.getMaxInactiveInterval(); if (maxInactiveInterval < 0) continue; int timeIdle = // Truncate, do not round up (int) ((timeNow - session.getLastAccessedTime()) / 1000L); if (timeIdle >= maxInactiveInterval) { try { expiredSessions++; session.expire(); } catch (Throwable t) { log(sm.getString("standardManager.expireException"), t); } } } } /** * Sleep for the duration specified by the checkInterval * property. */ private void threadSleep() { try { Thread.sleep(checkInterval * 1000L); } catch (InterruptedException e) { ; } } /** * Start the background thread that will periodically check for * session timeouts. */ private void threadStart() { if (thread != null) return; threadDone = false; threadName = "StandardManager[" + container.getName() + "]"; thread = new Thread(this, threadName); thread.setDaemon(true); thread.setContextClassLoader(container.getLoader().getClassLoader()); thread.start(); } /** * Stop the background thread that is periodically checking for * session timeouts. */ private void threadStop() { if (thread == null) return; threadDone = true; thread.interrupt(); try { thread.join(); } catch (InterruptedException e) { ; } thread = null; } // ------------------------------------------------------ Background Thread /** * The background thread that checks for session timeouts and shutdown. */ public void run() { // Loop until the termination semaphore is set while (!threadDone) { threadSleep(); processExpires(); } } } KapplicationSession.session.ise=tat de session invalide applicationSession.value.iae=valeur nulle fileStore.alreadyStarted=Le "File Store" a dj t dmarr fileStore.notStarted=Le "File Store" n''a pas encore t dmarr fileStore.saving=Sauvegarde de la Session {0} vers le fichier {1} fileStore.loading=Chargement de la Session {0} depuis le fichier {1} fileStore.removing=Retrait de la Session {0} du fichier {1} JDBCStore.alreadyStarted=Le "JDBC Store" a dj t dmarr JDBCStore.notStarted=Le "JDBC Store" n''a pas encore t dmarr JDBCStore.saving=Sauvegarde de la Session {0} vers la base de donnes {1} JDBCStore.loading=Chargement de la Session {0} depuis la base de donnes {1} JDBCStore.removing=Retrait de la Session {0} de la base de donnes {1} JDBCStore.SQLException=Erreur SQL {0} JDBCStore.checkConnectionDBClosed=La connexion la base de donnes est nulle ou a t trouv ferm. Tentative de rouverture. JDBCStore.checkConnectionDBReOpenFail=La tentative de rouverture re-open de la base de donnes a chou. La base de donnes est peut tre arrte. JDBCStore.checkConnectionSQLException=Une exception SQL s''est produite {0} JDBCStore.checkConnectionClassNotFoundException=La classe du driver JDBC n''a pas t trouve {0} managerBase.complete=L''alimentation du gnrateur de nombre alatoire est termin managerBase.getting=Prise du composant d''algorithme empreinte de message (message digest) pour l''algorithme {0} managerBase.gotten=Prise du composant d''algorithme empreinte de message (message digest) termine managerBase.random=Exception durant l''initialisation de la classe du gnrateur de nombre alatoire {0} managerBase.seeding=Alimentation de la classe du gnrateur de nombre alatoire {0} serverSession.value.iae=valeur nulle standardManager.alreadyStarted=Le "Manager" a t dmarr standardManager.createSession.ise="createSession": Trop de sessions actives standardManager.expireException="processsExpire": Exception lors de l''expiration de la session standardManager.loading=Chargement des sessions qui ont persists depuis {0} standardManager.loading.cnfe="ClassNotFoundException" lors du chargement de sessions persistantes: {0} standardManager.loading.ioe="IOException" lors du chargement des sessions persistantes: {0} standardManager.notStarted=Le "Manager" n''a pas encore t dmarr standardManager.sessionTimeout=Rglage du dlai d''inactivit (timeout) de session invalide {0} standardManager.unloading=Sauvegarde des sessions ayant persistes vers {0} standardManager.unloading.ioe="IOException" lors de la sauvegarde de sessions persistantes: {0} standardManager.managerLoad=Exception au chargement des sessions depuis le stockage persistant (persistent storage) standardManager.managerUnload=Exception au dchargement des sessions vers le stockage persistant (persistent storage) standardSession.attributeEvent=L''couteur d''vnement Attribut de Session (attribute event listener) a gnr une exception standardSession.invalidate.ise="invalidate": Session dj invalide standardSession.isNew.ise="isNew": Session dj invalide standardSession.getAttribute.ise="getAttribute": Session dj invalide standardSession.getAttributeNames.ise="getAttributeNames": Session dj invalide standardSession.getCreationTime.ise="getCreationTime": Session dj invalide standardSession.getMaxInactiveInterval.ise="getMaxInactiveInterval": Session dj invalide standardSession.getValueNames.ise="getAttributeNames": Session dj invalide standardSession.notSerializable=Impossible de srialiser l''attribut de session {0} pour la session {1} standardSession.removeAttribute.ise="removeAttribute": Session dj invalide standardSession.sessionEvent=L''couteur d''vnement de session (session event listener) a gnr une exception standardSession.setAttribute.iae="setAttribute": attribut non srialisable standardSession.setAttribute.ise="setAttribute": Session dj invalide standardSession.setAttribute.namenull="setAttribute": le nom de paramtre ne peut tre nul standardSession.sessionCreated=Cration de l'Id de Session = {0} persistentManager.loading=Chargement de {0} sessions persistantes persistentManager.unloading=Sauvegarde de {0} sessions persistantes persistentManager.expiring=Expiration de {0} sessions avant leur sauvegarde persistentManager.deserializeError=Erreur lors de la dsrialisation de la session {0}: {1} persistentManager.serializeError=Erreur lors de la srialisation de la session {0}: {1} persistentManager.swapMaxIdle=Basculement de la session {0} vers le stockage (Store), en attente pour {1} secondes persistentManager.backupMaxIdle=Sauvegarde de la session {0} vers le stockage (Store), en attente pour {1} secondes persistentManager.backupException=Exception lors de la sauvegarde de la session {0}: {1} persistentManager.tooManyActive=Trop de sessions actives, {0}, la recherche de sessions en attente pour basculement vers stockage (swap out) persistentManager.swapTooManyActive=Basculement vers stockage (swap out) de la session {0}, en attente pour {1} secondes trop de sessions actives persistentManager.processSwaps=Recherche de sessions basculer vers stockage (swap out), {0} sessions actives en mmoire persistentManager.activeSession=La session {0} a t en attente durant {1} secondes persistentManager.swapIn=Basculement depuis le stockage (swap in) de la session {0} /* * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java,v 1.35 2003/02/11 11:54:12 jfclere Exp $ * $Revision: 1.35 $ * $Date: 2003/02/11 11:54:12 $ * * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * * [Additional notices, if required by prior licensing conditions] * */ package org.apache.catalina.session; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.io.IOException; import java.io.NotSerializableException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import java.lang.reflect.Method; import java.security.Principal; import java.util.ArrayList; import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSessionActivationListener; import javax.servlet.http.HttpSessionAttributeListener; import javax.servlet.http.HttpSessionBindingEvent; import javax.servlet.http.HttpSessionBindingListener; import javax.servlet.http.HttpSessionContext; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener; import org.apache.catalina.Context; import org.apache.catalina.Manager; import org.apache.catalina.Session; import org.apache.catalina.SessionEvent; import org.apache.catalina.SessionListener; import org.apache.catalina.util.Enumerator; import org.apache.catalina.util.StringManager; /** * Standard implementation of the Session interface. This object is * serializable, so that it can be stored in persistent storage or transferred * to a different JVM for distributable session support. *

* IMPLEMENTATION NOTE: An instance of this class represents both the * internal (Session) and application level (HttpSession) view of the session. * However, because the class itself is not declared public, Java logic outside * of the org.apache.catalina.session package cannot cast an * HttpSession view of this instance back to a Session view. *

* IMPLEMENTATION NOTE: If you add fields to this class, you must * make sure that you carry them over in the read/writeObject methods so * that this class is properly serialized. * * @author Craig R. McClanahan * @author Sean Legassick * @author Jon S. Stevens * @version $Revision: 1.35 $ $Date: 2003/02/11 11:54:12 $ */ class StandardSession implements HttpSession, Session, Serializable { // ----------------------------------------------------------- Constructors /** * Construct a new Session associated with the specified Manager. * * @param manager The manager with which this Session is associated */ public StandardSession(Manager manager) { super(); this.manager = manager; if (manager instanceof ManagerBase) this.debug = ((ManagerBase) manager).getDebug(); } // ----------------------------------------------------- Instance Variables /** * The dummy attribute value serialized when a NotSerializableException is * encountered in writeObject(). */ private static final String NOT_SERIALIZED = "___NOT_SERIALIZABLE_EXCEPTION___"; /** * The collection of user data attributes associated with this Session. */ private HashMap attributes = new HashMap(); /** * The authentication type used to authenticate our cached Principal, * if any. NOTE: This value is not included in the serialized * version of this object. */ private transient String authType = null; /** * The java.lang.Method for the * fireContainerEvent() method of the * org.apache.catalina.core.StandardContext method, * if our Context implementation is of this class. This value is * computed dynamically the first time it is needed, or after * a session reload (since it is declared transient). */ private transient Method containerEventMethod = null; /** * The method signature for the fireContainerEvent method. */ private static final Class containerEventTypes[] = { String.class, Object.class }; /** * The time this session was created, in milliseconds since midnight, * January 1, 1970 GMT. */ private 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; /** * We are currently processing a session expiration, so bypass * certain IllegalStateException tests. NOTE: This value is not * included in the serialized version of this object. */ private 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; /** * The session identifier of this Session. */ private String id = null; /** * Descriptive information describing this Session implementation. */ private static final String info = "StandardSession/1.0"; /** * The last accessed time for this Session. */ private long lastAccessedTime = creationTime; /** * The session event listeners for this Session. */ private transient ArrayList listeners = new ArrayList(); /** * The Manager with which this Session is associated. */ private Manager manager = null; /** * The maximum time interval, in seconds, between client requests before * the servlet container may invalidate this session. A negative time * indicates that the session should never time out. */ private int maxInactiveInterval = -1; /** * Flag indicating whether this session is new or not. */ private boolean isNew = false; /** * Flag indicating whether this session is valid or not. */ private boolean isValid = false; /** * Internal notes associated with this session by Catalina components * and event listeners. IMPLEMENTATION NOTE: This object is * not saved and restored across session serializations! */ private transient HashMap notes = new HashMap(); /** * The authenticated Principal associated with this session, if any. * IMPLEMENTATION NOTE: This object is not saved and * restored across session serializations! */ private transient Principal principal = null; /** * The string manager for this package. */ private static StringManager sm = StringManager.getManager(Constants.Package); /** * The HTTP session context associated with this session. */ private 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 = new PropertyChangeSupport(this); /** * The current accessed time for this session. */ private long thisAccessedTime = creationTime; // ----------------------------------------------------- Session Properties /** * Return the authentication type used to authenticate our cached * Principal, if any. */ public String getAuthType() { return (this.authType); } /** * Set the authentication type used to authenticate our cached * Principal, if any. * * @param authType The new cached authentication type */ public void setAuthType(String authType) { String oldAuthType = this.authType; this.authType = authType; support.firePropertyChange("authType", oldAuthType, this.authType); } /** * Set the creation time for this session. This method is called by the * Manager when an existing Session instance is reused. * * @param time The new creation time */ public void setCreationTime(long time) { this.creationTime = time; this.lastAccessedTime = time; this.thisAccessedTime = time; } /** * Return the session identifier for this session. */ public String getId() { return (this.id); } /** * Set the session identifier for this session. * * @param id The new session identifier */ public void setId(String id) { if ((this.id != null) && (manager != null)) manager.remove(this); this.id = id; if (manager != null) manager.add(this); tellNew(); } /** * Inform the listener about the new session. * */ public void tellNew() { // Notify interested session event listeners fireSessionEvent(Session.SESSION_CREATED_EVENT, null); // Notify interested application event listeners Context context = (Context) manager.getContainer(); Object listeners[] = context.getApplicationListeners(); if (listeners != null) { HttpSessionEvent event = new HttpSessionEvent(getSession()); for (int i = 0; i < listeners.length; i++) { if (!(listeners[i] instanceof HttpSessionListener)) continue; HttpSessionListener listener = (HttpSessionListener) listeners[i]; try { fireContainerEvent(context, "beforeSessionCreated", listener); listener.sessionCreated(event); fireContainerEvent(context, "afterSessionCreated", listener); } catch (Throwable t) { try { fireContainerEvent(context, "afterSessionCreated", listener); } catch (Exception e) { ; } // FIXME - should we do anything besides log these? log(sm.getString("standardSession.sessionEvent"), t); } } } } /** * Return descriptive information about this Session implementation and * the corresponding version number, in the format * <description>/<version>. */ public String getInfo() { return (this.info); } /** * Return the last time the client sent a request associated with this * session, as the number of milliseconds since midnight, January 1, 1970 * GMT. Actions that your application takes, such as getting or setting * a value associated with the session, do not affect the access time. */ public long getLastAccessedTime() { return (this.lastAccessedTime); } /** * Return the Manager within which this Session is valid. */ public Manager getManager() { return (this.manager); } /** * Set the Manager within which this Session is valid. * * @param manager The new Manager */ public void setManager(Manager manager) { this.manager = manager; } /** * Return the maximum time interval, in seconds, between client requests * before the servlet container will invalidate the session. A negative * time indicates that the session should never time out. */ public int getMaxInactiveInterval() { return (this.maxInactiveInterval); } /** * Set the maximum time interval, in seconds, between client requests * before the servlet container will invalidate the session. A negative * time indicates that the session should never time out. * * @param interval The new maximum interval */ public void setMaxInactiveInterval(int interval) { this.maxInactiveInterval = interval; } /** * Set the isNew flag for this session. * * @param isNew The new value for the isNew flag */ public void setNew(boolean isNew) { this.isNew = isNew; } /** * Return the authenticated Principal that is associated with this Session. * This provides an Authenticator with a means to cache a * previously authenticated Principal, and avoid potentially expensive * Realm.authenticate() calls on every request. If there * is no current associated Principal, return null. */ public Principal getPrincipal() { return (this.principal); } /** * Set the authenticated Principal that is associated with this Session. * This provides an Authenticator with a means to cache a * previously authenticated Principal, and avoid potentially expensive * Realm.authenticate() calls on every request. * * @param principal The new Principal, or null if none */ public void setPrincipal(Principal principal) { Principal oldPrincipal = this.principal; this.principal = principal; support.firePropertyChange("principal", oldPrincipal, this.principal); } /** * Return the HttpSession for which this object * is the facade. */ public HttpSession getSession() { if (facade == null) facade = new StandardSessionFacade(this); return (facade); } /** * Return the isValid flag for this session. */ public boolean isValid() { return (this.isValid); } /** * Set the isValid flag for this session. * * @param isValid The new value for the isValid flag */ public void setValid(boolean isValid) { this.isValid = isValid; } // ------------------------------------------------- Session Public Methods /** * Update the accessed time information for this session. This method * should be called by the context when a request comes in for a particular * session, even if the application does not reference it. */ public void access() { this.isNew = false; this.lastAccessedTime = this.thisAccessedTime; this.thisAccessedTime = System.currentTimeMillis(); } /** * Add a session event listener to this component. */ public void addSessionListener(SessionListener listener) { synchronized (listeners) { listeners.add(listener); } } /** * Perform the internal processing required to invalidate this session, * without triggering an exception if the session has already expired. */ public void expire() { expire(true); } /** * Perform the internal processing required to invalidate this session, * without triggering an exception if the session has already expired. * * @param notify Should we notify listeners about the demise of * this session? */ public void expire(boolean notify) { // Mark this session as "being expired" if needed if (expiring) return; expiring = true; setValid(false); // Remove this session from our manager's active sessions if (manager != null) manager.remove(this); // Unbind any objects associated with this session String keys[] = keys(); for (int i = 0; i < keys.length; i++) removeAttribute(keys[i], notify); // Notify interested session event listeners if (notify) { fireSessionEvent(Session.SESSION_DESTROYED_EVENT, null); } // Notify interested application event listeners // FIXME - Assumes we call listeners in reverse order Context context = (Context) manager.getContainer(); Object listeners[] = context.getApplicationListeners(); if (notify && (listeners != null)) { HttpSessionEvent event = new HttpSessionEvent(getSession()); for (int i = 0; i < listeners.length; i++) { int j = (listeners.length - 1) - i; if (!(listeners[j] instanceof HttpSessionListener)) continue; HttpSessionListener listener = (HttpSessionListener) listeners[j]; try { fireContainerEvent(context, "beforeSessionDestroyed", listener); listener.sessionDestroyed(event); fireContainerEvent(context, "afterSessionDestroyed", listener); } catch (Throwable t) { try { fireContainerEvent(context, "afterSessionDestroyed", listener); } catch (Exception e) { ; } // FIXME - should we do anything besides log these? log(sm.getString("standardSession.sessionEvent"), t); } } } // We have completed expire of this session expiring = false; if ((manager != null) && (manager instanceof ManagerBase)) { recycle(); } } /** * Perform the internal processing required to passivate * this session. */ public void passivate() { // Notify ActivationListeners HttpSessionEvent event = null; String keys[] = keys(); for (int i = 0; i < keys.length; i++) { Object attribute = getAttribute(keys[i]); if (attribute instanceof HttpSessionActivationListener) { if (event == null) event = new HttpSessionEvent(this); // FIXME: Should we catch throwables? ((HttpSessionActivationListener)attribute).sessionWillPassivate(event); } } } /** * Perform internal processing required to activate this * session. */ public void activate() { // Notify ActivationListeners HttpSessionEvent event = null; String keys[] = keys(); for (int i = 0; i < keys.length; i++) { Object attribute = getAttribute(keys[i]); if (attribute instanceof HttpSessionActivationListener) { if (event == null) event = new HttpSessionEvent(this); // FIXME: Should we catch throwables? ((HttpSessionActivationListener)attribute).sessionDidActivate(event); } } } /** * Return the object bound with the specified name to the internal notes * for this session, or null if no such binding exists. * * @param name Name of the note to be returned */ public Object getNote(String name) { synchronized (notes) { return (notes.get(name)); } } /** * Return an Iterator containing the String names of all notes bindings * that exist for this session. */ public Iterator getNoteNames() { synchronized (notes) { return (notes.keySet().iterator()); } } /** * Release all object references, and initialize instance variables, in * preparation for reuse of this object. */ public void recycle() { // Reset the instance variables associated with this Session attributes.clear(); setAuthType(null); creationTime = 0L; expiring = false; id = null; lastAccessedTime = 0L; maxInactiveInterval = -1; notes.clear(); setPrincipal(null); isNew = false; isValid = false; // Disable session recycling manager = null; /* Manager savedManager = manager; manager = null; // Tell our Manager that this Session has been recycled if ((savedManager != null) && (savedManager instanceof ManagerBase)) ((ManagerBase) savedManager).recycle(this); */ } /** * Remove any object bound to the specified name in the internal notes * for this session. * * @param name Name of the note to be removed */ public void removeNote(String name) { synchronized (notes) { notes.remove(name); } } /** * Remove a session event listener from this component. */ public void removeSessionListener(SessionListener listener) { synchronized (listeners) { listeners.remove(listener); } } /** * Bind an object to a specified name in the internal notes associated * with this session, replacing any existing binding for this name. * * @param name Name to which the object should be bound * @param value Object to be bound to the specified name */ public void setNote(String name, Object value) { synchronized (notes) { notes.put(name, value); } } /** * Return a string representation of this object. */ public String toString() { StringBuffer sb = new StringBuffer(); sb.append("StandardSession["); sb.append(id); sb.append("]"); return (sb.toString()); } // ------------------------------------------------ Session Package Methods /** * Read a serialized version of the contents of this session object from * the specified object input stream, without requiring that the * StandardSession itself have been serialized. * * @param stream The object input stream to read from * * @exception ClassNotFoundException if an unknown class is specified * @exception IOException if an input/output error occurs */ void readObjectData(ObjectInputStream stream) throws ClassNotFoundException, IOException { readObject(stream); } /** * Write a serialized version of the contents of this session object to * the specified object output stream, without requiring that the * StandardSession itself have been serialized. * * @param stream The object output stream to write to * * @exception IOException if an input/output error occurs */ void writeObjectData(ObjectOutputStream stream) throws IOException { writeObject(stream); } // ------------------------------------------------- HttpSession Properties /** * Return the time when this session was created, in milliseconds since * midnight, January 1, 1970 GMT. * * @exception IllegalStateException if this method is called on an * invalidated session */ public long getCreationTime() { if (!isValid) throw new IllegalStateException (sm.getString("standardSession.getCreationTime.ise")); return (this.creationTime); } /** * Return the ServletContext to which this session belongs. */ public ServletContext getServletContext() { if (manager == null) return (null); Context context = (Context) manager.getContainer(); if (context == null) return (null); else return (context.getServletContext()); } /** * Return the session context with which this session is associated. * * @deprecated As of Version 2.1, this method is deprecated and has no * replacement. It will be removed in a future version of the * Java Servlet API. */ public HttpSessionContext getSessionContext() { if (sessionContext == null) sessionContext = new StandardSessionContext(); return (sessionContext); } // ----------------------------------------------HttpSession Public Methods /** * Return the object bound with the specified name in this session, or * null if no object is bound with that name. * * @param name Name of the attribute to be returned * * @exception IllegalStateException if this method is called on an * invalidated session */ public Object getAttribute(String name) { if (!isValid) throw new IllegalStateException (sm.getString("standardSession.getAttribute.ise")); synchronized (attributes) { return (attributes.get(name)); } } /** * Return an Enumeration of String objects * containing the names of the objects bound to this session. * * @exception IllegalStateException if this method is called on an * invalidated session */ public Enumeration getAttributeNames() { if (!isValid) throw new IllegalStateException (sm.getString("standardSession.getAttributeNames.ise")); synchronized (attributes) { return (new Enumerator(attributes.keySet())); } } /** * Return the object bound with the specified name in this session, or * null if no object is bound with that name. * * @param name Name of the value to be returned * * @exception IllegalStateException if this method is called on an * invalidated session * * @deprecated As of Version 2.2, this method is replaced by * getAttribute() */ public Object getValue(String name) { return (getAttribute(name)); } /** * Return the set of names of objects bound to this session. If there * are no such objects, a zero-length array is returned. * * @exception IllegalStateException if this method is called on an * invalidated session * * @deprecated As of Version 2.2, this method is replaced by * getAttributeNames() */ public String[] getValueNames() { if (!isValid) throw new IllegalStateException (sm.getString("standardSession.getValueNames.ise")); return (keys()); } /** * Invalidates this session and unbinds any objects bound to it. * * @exception IllegalStateException if this method is called on * an invalidated session */ public void invalidate() { if (!isValid) throw new IllegalStateException (sm.getString("standardSession.invalidate.ise")); // Cause this session to expire expire(); } /** * Return true if the client does not yet know about the * session, or if the client chooses not to join the session. For * example, if the server used only cookie-based sessions, and the client * has disabled the use of cookies, then a session would be new on each * request. * * @exception IllegalStateException if this method is called on an * invalidated session */ public boolean isNew() { if (!isValid) throw new IllegalStateException (sm.getString("standardSession.isNew.ise")); return (this.isNew); } /** * Bind an object to this session, using the specified name. If an object * of the same name is already bound to this session, the object is * replaced. *

* After this method executes, and if the object implements * HttpSessionBindingListener, the container calls * valueBound() on the object. * * @param name Name to which the object is bound, cannot be null * @param value Object to be bound, cannot be null * * @exception IllegalStateException if this method is called on an * invalidated session * * @deprecated As of Version 2.2, this method is replaced by * setAttribute() */ public void putValue(String name, Object value) { setAttribute(name, value); } /** * Remove the object bound with the specified name from this session. If * the session does not have an object bound with this name, this method * does nothing. *

* After this method executes, and if the object implements * HttpSessionBindingListener, the container calls * valueUnbound() on the object. * * @param name Name of the object to remove from this session. * * @exception IllegalStateException if this method is called on an * invalidated session */ public void removeAttribute(String name) { removeAttribute(name, true); } /** * Remove the object bound with the specified name from this session. If * the session does not have an object bound with this name, this method * does nothing. *

* After this method executes, and if the object implements * HttpSessionBindingListener, the container calls * valueUnbound() on the object. * * @param name Name of the object to remove from this session. * @param notify Should we notify interested listeners that this * attribute is being removed? * * @exception IllegalStateException if this method is called on an * invalidated session */ public void removeAttribute(String name, boolean notify) { // Validate our current state if (!expiring && !isValid) throw new IllegalStateException (sm.getString("standardSession.removeAttribute.ise")); // Remove this attribute from our collection Object value = null; boolean found = false; synchronized (attributes) { found = attributes.containsKey(name); if (found) { value = attributes.get(name); attributes.remove(name); } else { return; } } // Do we need to do valueUnbound() and attributeRemoved() notification? if (!notify) { return; } // Call the valueUnbound() method if necessary HttpSessionBindingEvent event = new HttpSessionBindingEvent((HttpSession) this, name, value); if ((value != null) && (value instanceof HttpSessionBindingListener)) ((HttpSessionBindingListener) value).valueUnbound(event); // Notify interested application event listeners Context context = (Context) manager.getContainer(); Object listeners[] = context.getApplicationListeners(); if (listeners == null) return; for (int i = 0; i < listeners.length; i++) { if (!(listeners[i] instanceof HttpSessionAttributeListener)) continue; HttpSessionAttributeListener listener = (HttpSessionAttributeListener) listeners[i]; try { fireContainerEvent(context, "beforeSessionAttributeRemoved", listener); listener.attributeRemoved(event); fireContainerEvent(context, "afterSessionAttributeRemoved", listener); } catch (Throwable t) { try { fireContainerEvent(context, "afterSessionAttributeRemoved", listener); } catch (Exception e) { ; } // FIXME - should we do anything besides log these? log(sm.getString("standardSession.attributeEvent"), t); } } } /** * Remove the object bound with the specified name from this session. If * the session does not have an object bound with this name, this method * does nothing. *

* After this method executes, and if the object implements * HttpSessionBindingListener, the container calls * valueUnbound() on the object. * * @param name Name of the object to remove from this session. * * @exception IllegalStateException if this method is called on an * invalidated session * * @deprecated As of Version 2.2, this method is replaced by * removeAttribute() */ public void removeValue(String name) { removeAttribute(name); } /** * Bind an object to this session, using the specified name. If an object * of the same name is already bound to this session, the object is * replaced. *

* After this method executes, and if the object implements * HttpSessionBindingListener, the container calls * valueBound() on the object. * * @param name Name to which the object is bound, cannot be null * @param value Object to be bound, cannot be null * * @exception IllegalArgumentException if an attempt is made to add a * non-serializable object in an environment marked distributable. * @exception IllegalStateException if this method is called on an * invalidated session */ public void setAttribute(String name, Object value) { // Name cannot be null if (name == null) throw new IllegalArgumentException (sm.getString("standardSession.setAttribute.namenull")); // Null value is the same as removeAttribute() if (value == null) { removeAttribute(name); return; } // Validate our current state if (!isValid) throw new IllegalStateException (sm.getString("standardSession.setAttribute.ise")); if ((manager != null) && manager.getDistributable() && !(value instanceof Serializable)) throw new IllegalArgumentException (sm.getString("standardSession.setAttribute.iae")); // Replace or add this attribute Object unbound = null; synchronized (attributes) { unbound = attributes.get(name); attributes.put(name, value); } // Call the valueUnbound() method if necessary if ((unbound != null) && (unbound instanceof HttpSessionBindingListener)) { ((HttpSessionBindingListener) unbound).valueUnbound (new HttpSessionBindingEvent((HttpSession) this, name)); } // Call the valueBound() method if necessary HttpSessionBindingEvent event = null; if (unbound != null) event = new HttpSessionBindingEvent ((HttpSession) this, name, unbound); else event = new HttpSessionBindingEvent ((HttpSession) this, name, value); if (value instanceof HttpSessionBindingListener) ((HttpSessionBindingListener) value).valueBound(event); // Notify interested application event listeners Context context = (Context) manager.getContainer(); Object listeners[] = context.getApplicationListeners(); if (listeners == null) return; for (int i = 0; i < listeners.length; i++) { if (!(listeners[i] instanceof HttpSessionAttributeListener)) continue; HttpSessionAttributeListener listener = (HttpSessionAttributeListener) listeners[i]; try { if (unbound != null) { fireContainerEvent(context, "beforeSessionAttributeReplaced", listener); listener.attributeReplaced(event); fireContainerEvent(context, "afterSessionAttributeReplaced", listener); } else { fireContainerEvent(context, "beforeSessionAttributeAdded", listener); listener.attributeAdded(event); fireContainerEvent(context, "afterSessionAttributeAdded", listener); } } catch (Throwable t) { try { if (unbound != null) { fireContainerEvent(context, "afterSessionAttributeReplaced", listener); } else { fireContainerEvent(context, "afterSessionAttributeAdded", listener); } } catch (Exception e) { ; } // FIXME - should we do anything besides log these? log(sm.getString("standardSession.attributeEvent"), t); } } } // -------------------------------------------- HttpSession Private Methods /** * Read a serialized version of this session object from the specified * object input stream. *

* IMPLEMENTATION NOTE: The reference to the owning Manager * is not restored by this method, and must be set explicitly. * * @param stream The input stream to read from * * @exception ClassNotFoundException if an unknown class is specified * @exception IOException if an input/output error occurs */ private void readObject(ObjectInputStream stream) throws ClassNotFoundException, IOException { // Deserialize the scalar instance variables (except Manager) authType = null; // Transient only creationTime = ((Long) stream.readObject()).longValue(); lastAccessedTime = ((Long) stream.readObject()).longValue(); maxInactiveInterval = ((Integer) stream.readObject()).intValue(); isNew = ((Boolean) stream.readObject()).booleanValue(); isValid = ((Boolean) stream.readObject()).booleanValue(); thisAccessedTime = ((Long) stream.readObject()).longValue(); principal = null; // Transient only // setId((String) stream.readObject()); id = (String) stream.readObject(); if (debug >= 2) log("readObject() loading session " + id); // Deserialize the attribute count and attribute values if (attributes == null) attributes = new HashMap(); int n = ((Integer) stream.readObject()).intValue(); boolean isValidSave = isValid; isValid = true; for (int i = 0; i < n; i++) { String name = (String) stream.readObject(); Object value = (Object) stream.readObject(); if ((value instanceof String) && (value.equals(NOT_SERIALIZED))) continue; if (debug >= 2) log(" loading attribute '" + name + "' with value '" + value + "'"); synchronized (attributes) { attributes.put(name, value); } } isValid = isValidSave; } /** * Write a serialized version of this session object to the specified * object output stream. *

* IMPLEMENTATION NOTE: The owning Manager will not be stored * in the serialized representation of this Session. After calling * readObject(), you must set the associated Manager * explicitly. *

* IMPLEMENTATION NOTE: Any attribute that is not Serializable * will be unbound from the session, with appropriate actions if it * implements HttpSessionBindingListener. If you do not want any such * attributes, be sure the distributable property of the * associated Manager is set to true. * * @param stream The output stream to write to * * @exception IOException if an input/output error occurs */ private void writeObject(ObjectOutputStream stream) throws IOException { // Write the scalar instance variables (except Manager) stream.writeObject(new Long(creationTime)); stream.writeObject(new Long(lastAccessedTime)); stream.writeObject(new Integer(maxInactiveInterval)); stream.writeObject(new Boolean(isNew)); stream.writeObject(new Boolean(isValid)); stream.writeObject(new Long(thisAccessedTime)); stream.writeObject(id); if (debug >= 2) log("writeObject() storing session " + id); // Accumulate the names of serializable and non-serializable attributes String keys[] = keys(); ArrayList saveNames = new ArrayList(); ArrayList saveValues = new ArrayList(); for (int i = 0; i < keys.length; i++) { Object value = null; synchronized (attributes) { value = attributes.get(keys[i]); } if (value == null) continue; else if (value instanceof Serializable) { saveNames.add(keys[i]); saveValues.add(value); } } // Serialize the attribute count and the Serializable attributes int n = saveNames.size(); stream.writeObject(new Integer(n)); for (int i = 0; i < n; i++) { stream.writeObject((String) saveNames.get(i)); try { stream.writeObject(saveValues.get(i)); if (debug >= 2) log(" storing attribute '" + saveNames.get(i) + "' with value '" + saveValues.get(i) + "'"); } catch (NotSerializableException e) { log(sm.getString("standardSession.notSerializable", saveNames.get(i), id), e); stream.writeObject(NOT_SERIALIZED); if (debug >= 2) log(" storing attribute '" + saveNames.get(i) + "' with value NOT_SERIALIZED"); } } } // -------------------------------------------------------- Private Methods /** * Fire container events if the Context implementation is the * org.apache.catalina.core.StandardContext. * * @param context Context for which to fire events * @param type Event type * @param data Event data * * @exception Exception occurred during event firing */ private void fireContainerEvent(Context context, String type, Object data) throws Exception { if (!"org.apache.catalina.core.StandardContext".equals (context.getClass().getName())) { return; // Container events are not supported } // NOTE: Race condition is harmless, so do not synchronize if (containerEventMethod == null) { containerEventMethod = context.getClass().getMethod("fireContainerEvent", containerEventTypes); } Object containerEventParams[] = new Object[2]; containerEventParams[0] = type; containerEventParams[1] = data; containerEventMethod.invoke(context, containerEventParams); } /** * Notify all session event listeners that a particular event has * occurred for this Session. The default implementation performs * this notification synchronously using the calling thread. * * @param type Event type * @param data Event data */ public void fireSessionEvent(String type, Object data) { if (listeners.size() < 1) return; SessionEvent event = new SessionEvent(this, type, data); SessionListener list[] = new SessionListener[0]; synchronized (listeners) { list = (SessionListener[]) listeners.toArray(list); } for (int i = 0; i < list.length; i++) ((SessionListener) list[i]).sessionEvent(event); } /** * Return the names of all currently defined session attributes * as an array of Strings. If there are no defined attributes, a * zero-length array is returned. */ private String[] keys() { String results[] = new String[0]; synchronized (attributes) { return ((String[]) attributes.keySet().toArray(results)); } } /** * Log a message on the Logger associated with our Manager (if any). * * @param message Message to be logged */ private void log(String message) { if ((manager != null) && (manager instanceof ManagerBase)) { ((ManagerBase) manager).log(message); } else { System.out.println("StandardSession: " + message); } } /** * Log a message on the Logger associated with our Manager (if any). * * @param message Message to be logged * @param throwable Associated exception */ private void log(String message, Throwable throwable) { if ((manager != null) && (manager instanceof ManagerBase)) { ((ManagerBase) manager).log(message, throwable); } else { System.out.println("StandardSession: " + message); throwable.printStackTrace(System.out); } } } // -------------------------------------------------------------- Private Class /** * This class is a dummy implementation of the HttpSessionContext * interface, to conform to the requirement that such an object be returned * when HttpSession.getSessionContext() is called. * * @author Craig R. McClanahan * * @deprecated As of Java Servlet API 2.1 with no replacement. The * interface will be removed in a future version of this API. */ final class StandardSessionContext implements HttpSessionContext { private HashMap dummy = new HashMap(); /** * Return the session identifiers of all sessions defined * within this context. * * @deprecated As of Java Servlet API 2.1 with no replacement. * This method must return an empty Enumeration * and will be removed in a future version of the API. */ public Enumeration getIds() { return (new Enumerator(dummy)); } /** * Return the HttpSession associated with the * specified session identifier. * * @param id Session identifier for which to look up a session * * @deprecated As of Java Servlet API 2.1 with no replacement. * This method must return null and will be removed in a * future version of the API. */ public HttpSession getSession(String id) { return (null); } } /* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * * [Additional notices, if required by prior licensing conditions] * */ package org.apache.catalina.session; /** * Manifest constants for the org.apache.catalina.session * package. * * @author Craig R. McClanahan */ public class Constants { public static final String Package = "org.apache.catalina.session"; } q$/* * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/DistributedManager.java,v 1.5 2002/01/03 08:52:57 remm Exp $ * $Revision: 1.5 $ * $Date: 2002/01/03 08:52:57 $ * * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * * [Additional notices, if required by prior licensing conditions] * */ package org.apache.catalina.session; import java.io.InputStream; import java.io.OutputStream; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.ObjectStreamClass; import org.apache.catalina.Cluster; import org.apache.catalina.Container; import org.apache.catalina.LifecycleException; import org.apache.catalina.Loader; import org.apache.catalina.Session; import org.apache.catalina.cluster.ClusterSender; import org.apache.catalina.cluster.ClusterReceiver; import org.apache.catalina.cluster.ReplicationWrapper; import org.apache.catalina.util.CustomObjectInputStream; /** * This manager is responsible for in memory replication of * Sessions across a defined Cluster. It could also utilize a * Store to make Sessions persistence. * * @author Bip Thelin * @version $Revision: 1.5 $, $Date: 2002/01/03 08:52:57 $ */ public final class DistributedManager extends PersistentManagerBase { // ----------------------------------------------------- Instance Variables /** * The descriptive information about this implementation. */ private static final String info = "DistributedManager/1.0"; /** * The descriptive name of this Manager implementation (for logging). */ protected static String name = "DistributedManager"; /** * Our ClusterSender, used when replicating sessions */ private ClusterSender clusterSender = null; /** * Our ClusterReceiver */ private ClusterReceiver clusterReceiver = null; // ------------------------------------------------------------- Properties /** * Return descriptive information about this Manager implementation and * the corresponding version number, in the format * <description>/<version>. */ public String getInfo() { return (this.info); } /** * Return the descriptive short name of this Manager implementation. */ public String getName() { return (this.name); } // --------------------------------------------------------- Public Methods /** * Create a Session and replicate it in our Cluster * * @return The newly created Session */ public Session createSession() { Session session = super.createSession(); ObjectOutputStream oos = null; ByteArrayOutputStream bos = null; ByteArrayInputStream bis = null; try { bos = new ByteArrayOutputStream(); oos = new ObjectOutputStream(new BufferedOutputStream(bos)); ((StandardSession)session).writeObjectData(oos); oos.close(); byte[] obs = bos.toByteArray(); clusterSender.send(obs); if(debug > 0) log("Replicating Session: "+session.getId()); } catch (IOException e) { log("An error occurred when replicating Session: "+session.getId()); } return (session); } /** * Start this manager * * @exception LifecycleException if an error occurs */ public void start() throws LifecycleException { Container container = getContainer(); Cluster cluster = null; if(container != null) cluster = container.getCluster(); if(cluster != null) { this.clusterSender = cluster.getClusterSender(getName()); this.clusterReceiver = cluster.getClusterReceiver(getName()); } super.start(); } /** * Called from our background thread to process new received Sessions * */ public void processClusterReceiver() { Object[] objs = clusterReceiver.getObjects(); StandardSession _session = null; ByteArrayInputStream bis = null; Loader loader = null; ClassLoader classLoader = null; ObjectInputStream ois = null; byte[] buf = new byte[5000]; ReplicationWrapper repObj = null; for(int i=0; i < objs.length;i++) { try { bis = new ByteArrayInputStream(buf); repObj = (ReplicationWrapper)objs[i]; buf = repObj.getDataStream(); bis = new ByteArrayInputStream(buf, 0, buf.length); if (container != null) loader = container.getLoader(); if (loader != null) classLoader = loader.getClassLoader(); if (classLoader != null) ois = new CustomObjectInputStream(bis, classLoader); else ois = new ObjectInputStream(bis); _session = (StandardSession) super.createSession(); _session.readObjectData(ois); _session.setManager(this); if (debug > 0) log("Loading replicated session: "+_session.getId()); } catch (IOException e) { log("Error occurred when trying to read replicated session: "+ e.toString()); } catch (ClassNotFoundException e) { log("Error occurred when trying to read replicated session: "+ e.toString()); } finally { if (ois != null) { try { ois.close(); bis = null; } catch (IOException e) { ; } } } } } /** * The background thread that checks for session timeouts and shutdown. */ public void run() { // Loop until the termination semaphore is set while (!threadDone) { threadSleep(); processClusterReceiver(); processExpires(); processPersistenceChecks(); } } } q/* * JDBCStore.java * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/JDBCStore.java,v 1.11 2003/03/12 01:19:03 glenn Exp $ * $Revision: 1.11 $ * $Date: 2003/03/12 01:19:03 $ * * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * * [Additional notices, if required by prior licensing conditions] * */ package org.apache.catalina.session; import java.io.InputStream; import java.io.OutputStream; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.ObjectStreamClass; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import org.apache.catalina.Container; import org.apache.catalina.LifecycleException; import org.apache.catalina.Loader; import org.apache.catalina.Session; import org.apache.catalina.Store; import org.apache.catalina.util.CustomObjectInputStream; /** * Implementation of the Store interface that stores * serialized session objects in a database. Sessions that are * saved are still subject to being expired based on inactivity. * * @author Bip Thelin * @version $Revision: 1.11 $, $Date: 2003/03/12 01:19:03 $ */ public class JDBCStore extends StoreBase implements Store { /** * The descriptive information about this implementation. */ protected static String info = "JDBCStore/1.0"; /** * Context name associated with this Store */ private String name = null; /** * Name to register for this Store, used for logging. */ protected static String storeName = "JDBCStore"; /** * Name to register for the background thread. */ protected String threadName = "JDBCStore"; /** * Connection string to use when connecting to the DB. */ protected String connString = null; /** * The database connection. */ private Connection conn = null; /** * Driver to use. */ protected String driverName = null; // ------------------------------------------------------------- Table & cols /** * Table to use. */ protected String sessionTable = "tomcat$sessions"; /** * Column to use for /Engine/Host/Context name */ protected String sessionAppCol = "app"; /** * Id column to use. */ protected String sessionIdCol = "id"; /** * Data column to use. */ protected String sessionDataCol = "data"; /** * Is Valid column to use. */ protected String sessionValidCol = "valid"; /** * Max Inactive column to use. */ protected String sessionMaxInactiveCol = "maxinactive"; /** * Last Accessed column to use. */ protected String sessionLastAccessedCol = "lastaccess"; // ------------------------------------------------------------- SQL Variables /** * Variable to hold the getSize() prepared statement. */ protected PreparedStatement preparedSizeSql = null; /** * Variable to hold the keys() prepared statement. */ protected PreparedStatement preparedKeysSql = null; /** * Variable to hold the save() prepared statement. */ protected PreparedStatement preparedSaveSql = null; /** * Variable to hold the clear() prepared statement. */ protected PreparedStatement preparedClearSql = null; /** * Variable to hold the remove() prepared statement. */ protected PreparedStatement preparedRemoveSql = null; /** * Variable to hold the load() prepared statement. */ protected PreparedStatement preparedLoadSql = null; // ------------------------------------------------------------- Properties /** * Return the info for this Store. */ public String getInfo() { return(info); } /** * Return the name for this instance (built from container name) */ public String getName() { if (name == null) { Container container = manager.getContainer(); String contextName = container.getName(); String hostName = ""; String engineName = ""; if (container.getParent() != null) { Container host = container.getParent(); hostName = host.getName(); if (host.getParent() != null) { engineName = host.getParent().getName(); } } name = "/" + engineName + "/" + hostName + contextName; } return name; } /** * Return the thread name for this Store. */ public String getThreadName() { return(threadName); } /** * Return the name for this Store, used for logging. */ public String getStoreName() { return(storeName); } /** * Set the driver for this Store. * * @param driverName The new driver */ public void setDriverName(String driverName) { String oldDriverName = this.driverName; this.driverName = driverName; support.firePropertyChange("driverName", oldDriverName, this.driverName); this.driverName = driverName; } /** * Return the driver for this Store. */ public String getDriverName() { return(this.driverName); } /** * Set the Connection URL for this Store. * * @param connectionURL The new Connection URL */ public void setConnectionURL(String connectionURL) { String oldConnString = this.connString; this.connString = connectionURL; support.firePropertyChange("connString", oldConnString, this.connString); } /** * Return the Connection URL for this Store. */ public String getConnectionURL() { return(this.connString); } /** * Set the table for this Store. * * @param sessionTable The new table */ public void setSessionTable(String sessionTable) { String oldSessionTable = this.sessionTable; this.sessionTable = sessionTable; support.firePropertyChange("sessionTable", oldSessionTable, this.sessionTable); } /** * Return the table for this Store. */ public String getSessionTable() { return(this.sessionTable); } /** * Set the App column for the table. * * @param sessionAppCol the column name */ public void setSessionAppCol(String sessionAppCol) { String oldSessionAppCol = this.sessionAppCol; this.sessionAppCol = sessionAppCol; support.firePropertyChange("sessionAppCol", oldSessionAppCol, this.sessionAppCol); } /** * Return the Id column for the table. */ public String getSessionAppCol() { return(this.sessionAppCol); } /** * Set the Id column for the table. * * @param sessionIdCol the column name */ public void setSessionIdCol(String sessionIdCol) { String oldSessionIdCol = this.sessionIdCol; this.sessionIdCol = sessionIdCol; support.firePropertyChange("sessionIdCol", oldSessionIdCol, this.sessionIdCol); } /** * Return the Id column for the table. */ public String getSessionIdCol() { return(this.sessionIdCol); } /** * Set the Data column for the table * * @param sessionDataCol the column name */ public void setSessionDataCol(String sessionDataCol) { String oldSessionDataCol = this.sessionDataCol; this.sessionDataCol = sessionDataCol; support.firePropertyChange("sessionDataCol", oldSessionDataCol, this.sessionDataCol); } /** * Return the data column for the table */ public String getSessionDataCol() { return(this.sessionDataCol); } /** * Set the Is Valid column for the table * * @param sessionValidCol The column name */ public void setSessionValidCol(String sessionValidCol) { String oldSessionValidCol = this.sessionValidCol; this.sessionValidCol = sessionValidCol; support.firePropertyChange("sessionValidCol", oldSessionValidCol, this.sessionValidCol); } /** * Return the Is Valid column */ public String getSessionValidCol() { return(this.sessionValidCol); } /** * Set the Max Inactive column for the table * * @param sessionMaxInactiveCol The column name */ public void setSessionMaxInactiveCol(String sessionMaxInactiveCol) { String oldSessionMaxInactiveCol = this.sessionMaxInactiveCol; this.sessionMaxInactiveCol = sessionMaxInactiveCol; support.firePropertyChange("sessionMaxInactiveCol", oldSessionMaxInactiveCol, this.sessionMaxInactiveCol); } /** * Return the Max Inactive column */ public String getSessionMaxInactiveCol() { return(this.sessionMaxInactiveCol); } /** * Set the Last Accessed column for the table * * @param sessionLastAccessedCol The column name */ public void setSessionLastAccessedCol(String sessionLastAccessedCol) { String oldSessionLastAccessedCol = this.sessionLastAccessedCol; this.sessionLastAccessedCol = sessionLastAccessedCol; support.firePropertyChange("sessionLastAccessedCol", oldSessionLastAccessedCol, this.sessionLastAccessedCol); } /** * Return the Last Accessed column */ public String getSessionLastAccessedCol() { return(this.sessionLastAccessedCol); } // --------------------------------------------------------- Public Methods /** * Return an array containing the session identifiers of all Sessions * currently saved in this Store. If there are no such Sessions, a * zero-length array is returned. * * @exception IOException if an input/output error occurred */ public String[] keys() throws IOException { String keysSql = "SELECT " + sessionIdCol + " FROM " + sessionTable + " WHERE " + sessionAppCol + " = ?"; ResultSet rst = null; String keys[] = null; int i; synchronized(this) { Connection _conn = getConnection(); if(_conn == null) { return(new String[0]); } try { if(preparedKeysSql == null) { preparedKeysSql = _conn.prepareStatement(keysSql); } preparedKeysSql.setString(1, getName()); rst = preparedKeysSql.executeQuery(); ArrayList tmpkeys = new ArrayList(); if (rst != null) { while(rst.next()) { tmpkeys.add(rst.getString(1)); } } keys = (String[]) tmpkeys.toArray(new String[tmpkeys.size()]); } catch(SQLException e) { log(sm.getString(getStoreName()+".SQLException", e)); } finally { try { if(rst != null) { rst.close(); } } catch(SQLException e) { ; } release(_conn); } } return(keys); } /** * Return an integer containing a count of all Sessions * currently saved in this Store. If there are no Sessions, * 0 is returned. * * @exception IOException if an input/output error occurred */ public int getSize() throws IOException { int size = 0; String sizeSql = "SELECT COUNT(" + sessionIdCol + ") FROM " + sessionTable + " WHERE " + sessionAppCol + " = ?"; ResultSet rst = null; synchronized(this) { Connection _conn = getConnection(); if(_conn == null) { return(size); } try { if(preparedSizeSql == null) { preparedSizeSql = _conn.prepareStatement(sizeSql); } preparedSizeSql.setString(1, getName()); rst = preparedSizeSql.executeQuery(); if (rst.next()) { size = rst.getInt(1); } } catch(SQLException e) { log(sm.getString(getStoreName()+".SQLException", e)); } finally { try { if(rst != null) rst.close(); } catch(SQLException e) { ; } release(_conn); } } return(size); } /** * Load the Session associated with the id id. * If no such session is found null is returned. * * @param id a value of type String * @return the stored Session * @exception ClassNotFoundException if an error occurs * @exception IOException if an input/output error occurred */ public Session load(String id) throws ClassNotFoundException, IOException { ResultSet rst = null; StandardSession _session = null; Loader loader = null; ClassLoader classLoader = null; ObjectInputStream ois = null; BufferedInputStream bis = null; Container container = manager.getContainer(); String loadSql = "SELECT " + sessionIdCol + ", " + sessionDataCol + " FROM " + sessionTable + " WHERE " + sessionIdCol + " = ? AND " + sessionAppCol + " = ?"; synchronized(this) { Connection _conn = getConnection(); if(_conn == null) { return(null); } try { if(preparedLoadSql == null) { preparedLoadSql = _conn.prepareStatement(loadSql); } preparedLoadSql.setString(1, id); preparedLoadSql.setString(2, getName()); rst = preparedLoadSql.executeQuery(); if (rst.next()) { bis = new BufferedInputStream(rst.getBinaryStream(2)); if (container != null) { loader = container.getLoader(); } if (loader != null) { classLoader = loader.getClassLoader(); } if (classLoader != null) { ois = new CustomObjectInputStream(bis, classLoader); } else { ois = new ObjectInputStream(bis); } if (debug > 0) { log(sm.getString(getStoreName()+".loading", id, sessionTable)); } _session = (StandardSession) manager.createEmptySession(); _session.readObjectData(ois); _session.setManager(manager); } else if (debug > 0) { log(getStoreName()+": No persisted data object found"); } } catch(SQLException e) { log(sm.getString(getStoreName()+".SQLException", e)); } finally { try { if(rst != null) { rst.close(); } } catch(SQLException e) { ; } if (ois != null) { try { ois.close(); } catch (IOException e) { ; } } release(_conn); } } return(_session); } /** * Remove the Session with the specified session identifier from * this Store, if present. If no such Session is present, this method * takes no action. * * @param id Session identifier of the Session to be removed * * @exception IOException if an input/output error occurs */ public void remove(String id) throws IOException { String removeSql = "DELETE FROM " + sessionTable + " WHERE " + sessionIdCol + " = ? AND " + sessionAppCol + " = ?"; synchronized(this) { Connection _conn = getConnection(); if(_conn == null) { return; } try { if(preparedRemoveSql == null) { preparedRemoveSql = _conn.prepareStatement(removeSql); } preparedRemoveSql.setString(1, id); preparedRemoveSql.setString(2, getName()); preparedRemoveSql.execute(); } catch(SQLException e) { log(sm.getString(getStoreName()+".SQLException", e)); } finally { release(_conn); } } if (debug > 0) { log(sm.getString(getStoreName()+".removing", id, sessionTable)); } } /** * Remove all of the Sessions in this Store. * * @exception IOException if an input/output error occurs */ public void clear() throws IOException { String clearSql = "DELETE FROM " + sessionTable + " WHERE " + sessionAppCol + " = ?"; synchronized(this) { Connection _conn = getConnection(); if(_conn == null) { return; } try { if(preparedClearSql == null) { preparedClearSql = _conn.prepareStatement(clearSql); } preparedClearSql.setString(1, getName()); preparedClearSql.execute(); } catch(SQLException e) { log(sm.getString(getStoreName()+".SQLException", e)); } finally { release(_conn); } } } /** * Save a session to the Store. * * @param session the session to be stored * @exception IOException if an input/output error occurs */ public void save(Session session) throws IOException { String saveSql = "INSERT INTO " + sessionTable + " (" + sessionIdCol + ", " + sessionAppCol + ", " + sessionDataCol + ", " + sessionValidCol + ", " + sessionMaxInactiveCol + ", " + sessionLastAccessedCol + ") VALUES (?, ?, ?, ?, ?, ?)"; ObjectOutputStream oos = null; ByteArrayOutputStream bos = null; ByteArrayInputStream bis = null; InputStream in = null; synchronized(this) { Connection _conn = getConnection(); if(_conn == null) { return; } // If sessions already exist in DB, remove and insert again. // TODO: // * Check if ID exists in database and if so use UPDATE. remove(session.getId()); try { bos = new ByteArrayOutputStream(); oos = new ObjectOutputStream(new BufferedOutputStream(bos)); ((StandardSession)session).writeObjectData(oos); oos.close(); byte[] obs = bos.toByteArray(); int size = obs.length; bis = new ByteArrayInputStream(obs, 0, size); in = new BufferedInputStream(bis, size); if(preparedSaveSql == null) { preparedSaveSql = _conn.prepareStatement(saveSql); } preparedSaveSql.setString(1, session.getId()); preparedSaveSql.setString(2, getName()); preparedSaveSql.setBinaryStream(3, in, size); preparedSaveSql.setString(4, session.isValid()?"1":"0"); preparedSaveSql.setInt(5, session.getMaxInactiveInterval()); preparedSaveSql.setLong(6, session.getLastAccessedTime()); preparedSaveSql.execute(); } catch(SQLException e) { log(sm.getString(getStoreName()+".SQLException", e)); } catch (IOException e) { ; } finally { if(bis != null) { bis.close(); } if(in != null) { in.close(); } release(_conn); } } if (debug > 0) { log(sm.getString(getStoreName()+".saving", session.getId(), sessionTable)); } } // --------------------------------------------------------- Protected Methods /** * Check the connection associated with this store, if it's * null or closed try to reopen it. * Returns null if the connection could not be established. * * @return Connection if the connection suceeded */ protected Connection getConnection(){ try { if(conn == null || conn.isClosed()) { Class.forName(driverName); log(sm.getString(getStoreName()+".checkConnectionDBClosed")); conn = DriverManager.getConnection(connString); conn.setAutoCommit(true); if(conn == null || conn.isClosed()) { log(sm.getString(getStoreName()+".checkConnectionDBReOpenFail")); } } } catch (SQLException ex){ log(sm.getString(getStoreName()+".checkConnectionSQLException", ex.toString())); } catch (ClassNotFoundException ex) { log(sm.getString(getStoreName()+".checkConnectionClassNotFoundException", ex.toString())); } return conn; } /** * Release the connection, not needed here since the * connection is not associated with a connection pool. * * @param conn The connection to be released */ protected void release(Connection conn) { ; } /** * Called once when this Store is first started. */ public void start() throws LifecycleException { super.start(); // Open connection to the database this.conn = getConnection(); } /** * Gracefully terminate everything associated with our db. * Called once when this Store is stoping. * */ public void stop() throws LifecycleException { super.stop(); // Close and release everything associated with our db. if(conn != null) { try { conn.commit(); } catch (SQLException e) { ; } if( preparedSizeSql != null ) { try { preparedSizeSql.close(); } catch (SQLException e) { ; } } if( preparedKeysSql != null ) { try { preparedKeysSql.close(); } catch (SQLException e) { ; } } if( preparedSaveSql != null ) { try { preparedSaveSql.close(); } catch (SQLException e) { ; } } if( preparedClearSql != null ) { try { preparedClearSql.close(); } catch (SQLException e) { ; } } if( preparedRemoveSql != null ) { try { preparedRemoveSql.close(); } catch (SQLException e) { ; } } if( preparedLoadSql != null ) { try { preparedLoadSql.close(); } catch (SQLException e) { ; } } try { conn.close(); } catch (SQLException e) { ; } this.preparedSizeSql = null; this.preparedKeysSql = null; this.preparedSaveSql = null; this.preparedClearSql = null; this.preparedRemoveSql = null; this.preparedLoadSql = null; this.conn = null; } } } ?'applicationSession.session.ise=\u7121\u52b9\u306a\u30bb\u30c3\u30b7\u30e7\u30f3\u72b6\u614b\u3067\u3059 applicationSession.value.iae=null\u5024\u3067\u3059 fileStore.alreadyStarted=\u30d5\u30a1\u30a4\u30eb\u30b9\u30c8\u30a2\u304c\u3059\u3067\u306b\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u3059 fileStore.notStarted=\u30d5\u30a1\u30a4\u30eb\u30b9\u30c8\u30a2\u304c\u307e\u3060\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u305b\u3093 fileStore.saving=\u30bb\u30c3\u30b7\u30e7\u30f3 {0} \u3092\u30d5\u30a1\u30a4\u30eb {1} \u306b\u4fdd\u5b58\u3057\u307e\u3059 fileStore.loading=\u30bb\u30c3\u30b7\u30e7\u30f3 {0} \u3092\u30d5\u30a1\u30a4\u30eb {1} \u304b\u3089\u30ed\u30fc\u30c9\u3057\u307e\u3059 fileStore.removing=\u30bb\u30c3\u30b7\u30e7\u30f3 {0} \u3092\u30d5\u30a1\u30a4\u30eb {1} \u304b\u3089\u524a\u9664\u3057\u307e\u3059 JDBCStore.alreadyStarted=JDBC\u30b9\u30c8\u30a2\u306f\u3059\u3067\u306b\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u3059 JDBCStore.notStarted=JDBC\u30b9\u30c8\u30a2\u306f\u307e\u3060\u8d77\u52d5\u3055\u308c\u3066\u307e\u305b\u3093 JDBCStore.saving=\u30bb\u30c3\u30b7\u30e7\u30f3 {0} \u3092\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 {1} \u306b\u4fdd\u5b58\u3057\u307e\u3059 JDBCStore.loading=\u30bb\u30c3\u30b7\u30e7\u30f3 {0} \u3092\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 {1} \u304b\u3089\u30ed\u30fc\u30c9\u3057\u307e\u3059 JDBCStore.removing= \u30bb\u30c3\u30b7\u30e7\u30f3 {0} \u3092\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 {1} \u304b\u3089\u524a\u9664\u3057\u307e\u3059 JDBCStore.SQLException=SQL\u30a8\u30e9\u30fc {0} JDBCStore.checkConnectionDBClosed=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u63a5\u7d9a\u304cnull\u3067\u3042\u308b\u304b\u3001\u30af\u30ed\u30fc\u30ba\u3055\u308c\u3066\u3044\u308b\u306e\u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002\u518d\u30aa\u30fc\u30d7\u30f3\u3057\u3066\u304f\u3060\u3055\u3044\u3002 JDBCStore.checkConnectionDBReOpenFail=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u518d\u30aa\u30fc\u30d7\u30f3\u304c\u5931\u6557\u3057\u307e\u3057\u305f\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u30c0\u30a6\u30f3\u3057\u3066\u3044\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 JDBCStore.checkConnectionSQLException=SQL\u4f8b\u5916\u304c\u767a\u751f\u3057\u307e\u3057\u305f {0} JDBCStore.checkConnectionClassNotFoundException=JDBC\u30c9\u30e9\u30a4\u30d0\u30af\u30e9\u30b9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093 {0} managerBase.complete=\u4e71\u6570\u767a\u751f\u5668\u306e\u30b7\u30fc\u30c9\u306e\u751f\u6210\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f managerBase.getting=\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0 {0} \u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u30c0\u30a4\u30b8\u30a7\u30b9\u30c8\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u53d6\u5f97\u3057\u307e\u3059 managerBase.gotten=\u30e1\u30c3\u30bb\u30fc\u30b8\u30c0\u30a4\u30b8\u30a7\u30b9\u30c8\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u53d6\u5f97\u3092\u5b8c\u4e86\u3057\u307e\u3057\u305f managerBase.random=\u30af\u30e9\u30b9 {0} \u306e\u4e71\u6570\u767a\u751f\u5668\u306e\u521d\u671f\u5316\u306e\u4f8b\u5916\u3067\u3059 managerBase.seeding=\u4e71\u6570\u767a\u751f\u5668\u30af\u30e9\u30b9 {0} \u306e\u30b7\u30fc\u30c9\u3092\u751f\u6210\u3057\u3066\LF ƶr|V^rQշrpO :i+00#C:\4/My DocumentsMYDOCU~1 E%671$/;Hypermeediumiprogrameerimine_IIHYPERM~1"2p$/= Baas1.mdbBAAS1.MDBk0jh%SYSC:\My Documents\Hypermeediumiprogrameerimine_II\Baas1.mdb<..\..\My Documents\Hypermeediumiprogrameerimine_II\Baas1.mdb/C:\My Documents\Hypermeediumiprogrameerimine_IIag={0} \u304b\u3089\u6301\u7d9a\u3055\u308c\u305f\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u30ed\u30fc\u30c9\u3057\u3066\u3044\u307e\u3059 standardManager.loading.cnfe=\u6301\u7d9a\u3055\u308c\u305f\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u30ed\u30fc\u30c9\u4e2d\u306bClassNotFoundException\u304c\u767a\u751f\u3057\u307e\u3057\u305f: {0} standardManager.loading.ioe=\u6301\u7d9a\u3055\u308c\u305f\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u30ed\u30fc\u30c9\u4e2d\u306eIOException\u3067\u3059: {0} standardManager.notStarted=\u30de\u30cd\u30fc\u30b8\u30e3\u306f\u307e\u3060\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u305b\u3093 standardManager.sessionTimeout=\u7121\u52b9\u306a\u30bb\u30c3\u30b7\u30e7\u30f3\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u8a2d\u5b9a\u3067\u3059 {0} standardManager.unloading=\u6301\u7d9a\u3055\u308c\u305f\u30bb\u30c3\u30b7\u30e7\u30f3\u3092 {0} \u306b\u4fdd\u5b58\u3057\u307e\u3059 standardManager.unloading.ioe=\u6301\u7d9a\u3055\u308c\u305f\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u4fdd\u5b58\u4e2d\u306eIOException\u3067\u3059: {0} standardManager.managerLoad=\u6c38\u7d9a\u8a18\u61b6\u88c5\u7f6e\u304b\u3089\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u30ed\u30fc\u30c9\u4e2d\u306e\u4f8b\u5916\u3067\u3059 standardManager.managerUnload=\u6c38\u7d9a\u8a18\u61b6\u88c5\u7f6e\u306b\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u30a2\u30f3\u30ed\u30fc\u30c9\u4e2d\u306e\u4f8b\u5916\u3067\u3059 standardSession.attributeEvent=\u30bb\u30c3\u30b7\u30e7\u30f3\u5c5e\u6027\u30a4\u30d9\u30f3\u30c8\u30ea\u30b9\u30ca\u304c\u4f8b\u5916\u3092\u6295\u3052\u307e\u3057\u305f standardSession.invalidate.ise=invalidate: \u30bb\u30c3\u30b7\u30e7\u30f3\u306f\u3059\u3067\u306b\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059 standardSession.isNew.ise=isNew: \u30bb\u30c3\u30b7\u30e7\u30f3\u306f\u3059\u3067\u306b\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059 standardSession.getAttribute.ise=getAttribute: \u30bb\u30c3\u30b7\u30e7\u30f3\u306f\u3059\u3067\u306b\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059 standardSession.getAttributeNames.ise=getAttributeNames: \u30bb\u30c3\u30b7\u30e7\u30f3\u306f\u3059\u3067\u306b\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059 standardSession.getCreationTime.ise=getCreationTime: \u30bb\u30c3\u30b7\u30e7\u30f3\u306f\u3059\u3067\u306b\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059 standardSession.getMaxInactiveInterval.ise=getMaxInactiveInterval: \u30bb\u30c3\u30b7\u30e7\u30f3\u306f\u3059\u3067\u306b\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059 standardSession.getValueNames.ise=getAttributeNames: \u30bb\u30c3\u30b7\u30e7\u30f3\u306f\u3059\u3067\u306b\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059 standardSession.notSerializable=\u30bb\u30c3\u30b7\u30e7\u30f3 {1} \u306e\u305f\u3081\u306b\u30bb\u30c3\u30b7\u30e7\u30f3\u5c5e\u6027 {0} \u3092\u30b7\u30ea\u30a2\u30e9\u30a4\u30ba\u3067\u304d\u307e\u305b\u3093 standardSession.removeAttribute.ise=removeAttribute: \u30bb\u30c3\u30b7\u30e7\u30f3\u306f\u3059\u3067\u306b\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059 standardSession.sessionEvent=\u30bb\u30c3\u30b7\u30e7\u30f3\u30a4\u30d9\u30f3\u30c8\u30ea\u30b9\u30ca\u304c\u4f8b\u5916\u3092\u6295\u3052\u307e\u3057\u305f standardSession.setAttribute.iae=setAttribute: \u30b7\u30ea\u30a2\u30e9\u30a4\u30ba\u3067\u304d\u306a\u3044\u5c5e\u6027\u3067\u3059 standardSession.setAttribute.ise=setAttribute: \u30bb\u30c3\u30b7\u30e7\u30f3\u306f\u3059\u3067\u306b\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059 standardSession.setAttribute.namenull=setAttribute: name\u30d1\u30e9\u30e1\u30bf\u306fnull\u3067\u304 r c1752210 ad000 1000 o c1765040 22c0 "C:\J2SDK1~1.2_0\JRE\LIB\EXT\DNSNS.JAR" R c1765040 22aa 16 R c1765040 1e5c 44e R c1763f70 11fd429 1e R c1763f70 11fd447 17 R c1763f70 11fd45e 11d4 R c1763f70 11fe632 1e R c1763f70 11fe650 22 R c1763f70 11fe672 209b R c1765040 3d 1e R c1765040 5b 14 R c1763f70 120070d 1e R c1763f70 120072b 1c R c1763f70 1200747 1014 R c1763f70 1201aa2 1e R c1763f70 1201ac0 28 R c1763f70 1201ae8 5c4 R c1763f70 120175b 1e R c1763f70 1201779 1c R c1763f70 1201795 30d R c1763f70 1202392 1e R c1763f70 12023b0 1d R c1763f70 12023cd ee5 R c1763f70 12020ac 1e R c1763f70 12020ca 17 R c1763f70 12020e1 2b1 R c1763f70 12032b2 1e R c1763f70 12032d0 2e R c1763f70 12032fe 667 R c1763f70 120444b 1e R c1763f70 1204469 1d R c1763f70 1204486 571 R c1763f70 1203965 1e R c1763f70 1203983 27 R c1763f70 12039aa aa1 R c1763f70 12049f7 1e R c1763f70 1204a15 1c R c1763f70 1204a31 9b5 R c1763ef0 4000 1000 R c1763ef0 5000 1000 R c1765040 6f 47 R c1763f70 11c0389 1e R c1763f70 11c03a7 14 R c1763f70 11c03bb b3c o c1764530 cfff "C:\J2SDK1~1.2_0\JRE\LIB\EXT\LDAPSEC.JAR" R c1764530 cfe9 16 R c1764530 bfca 101f R c1764530 3d 1e R c1764530 5b 14 R c1764530 6f b3 o c1764400 1b30e "C:\J2SDK1~1.2_0\JRE\LIB\EXT\SUNJCE~1.JAR" R c1764400 1b2f8 16 R c1764400 1993b 19bd R c1764400 0 1e R c1764400 1e 14 R c1764400 32 200 R c1764400 232 200 R c1764400 432 200 R c1764400 632 200 R c1764400 832 2c o c1766350 bbd37 "C:\J2SDK1~1.2_0\JRE\LIB\EXT\LOCALE~1.JAR" R c1766350 bbd21 16 R c1766350 bad5a fc7 R c1766350 0 1e R c1766350 1e 14 R c1766350 32 47 R c1763f70 120afb8 1e R c1763f70 120afd6 2d R c1763f70 120b003 3d1 R c1763f70 120b3d4 1e R c1763f70 120b3f2 26 R c1763f70 120b418 6dc R c1763f70 dbb190 1e R c1763f70 dbb1ae 1d R c1763f70 dbb1cb 500 R c1763f70 120baf4 1e R c1763f70 120bb12 17 R c1763f70 120bb29 4bc o c1752940 3d5 "C:\MYDOCU~1\HYPERM~1\LAULUB~1.CLA" R c1752940 0 100 R c1752940 1d5 200 R c1752940 7 100 R c1752940 aa 100 R c1752940 97 100 R c1752940 0 200 R c1752940 200 1d5 R c1752940 0 2 R c1752940 0 3d5 R c1752940 0 1000 C c1752940 o c17664d0 3d5 "C:\MYDOCU~1\HYPERM~1\LAULUB~1.CLA" R c17664d0 0 3d5 C c17664d0 R c1763f70 120c3e1 1e R c1763f70 120c3ff 1e R c1763f70 120c41d 1406 R c1763f70 120dcd8 1e R c1763f70 120dcf6 1f R c1763f70 120dd15 1460 R c1763f70 120d823 1e R c1763f70 120d841 28 R c1763f70 120d869 46f R c1763f70 1212b34 1e R c1763f70 1212b52 31 R c1763f70 1212b83 1227 R c1763f70 1211ff2 1e R c1763f70 1212010 1f R c1763f70 121202f b05 R c1763f70 120f175 1e R c1763f70 120f193 1c R c1763f70 120f1af 2e43 R c1763f70 1214024 1e R c1763f70 1214042 24 R c1763f70 1214066 1c8 R c1763f70 1213daa 1e R c1763f70 1213dc8 1d R c1763f70 1213de5 23f R c1763f70 121422e 1e R c1763f70 121424c 1f R c1763f70 121426b 162e R c1763f70 1215899 1e R c1763f70 12158b7 1c R c1763f70 12158d3 1484 R c1763f70 1216d57 1e R c1763f70 1216d75 1e R c1763f70 1216d93 465 R c1763f70 1218c17 1e R c1763f70 1218c35 26 R c1763f70 1218c5b cea R c1763f70 5ed8ed 1e R c1763f70 5ed90b 21 R c1763f70 5ed92c 34e R c1763f70 12171f8 1e R c1763f70 1217216 28 R c1763f70 121723e 19d9 R c1763f70 1219945 1e R c1763f70 1219963 2d R c1763f70 1219990 1120 R c1763f70 121aab0 1e R c1763f70 121aace 1d R c1763f70 121aaeb ef R c1763f70 121abda 1e R c1763f70 121abf8 24 R c1763f70 121ac1c 77d R c175e890 5000 1000 R c175e890 4000 1000 R c175e890 b000 1000 R c175e890 1000 1000 d9e0 138890 1e R c173d9e0 1388ae 31 R c173d9e0 13ac87 1e R c173d9e0 13aca5 34 R c173d9e0 13e32c 1e R c173d9e0 13e34a 37 R c173d9e0 13f1d9 1e R c173d9e0 13f1f7 33 R c173d9e0 13f6c5 1e R c173d9e0 13f6e3 33 R c173d9e0 13f8c6 1e R c173d9e0 13f8e4 2f R c173d9e0 140b8e 1e R c173d9e0 140bac 35 R c173d9e0 140d27 1e R c173d9e0 140d45 32 R c173d9e0 14855f 1e R c173d9e0 14857d 38 R c173d9e0 148cb2 1e R c173d9e0 148cd0 39 R c173d9e0 149947 1e R c173d9e0 149965 3a R c173d9e0 14a8dd 1e R c173d9e0 14a8fb 34 R c173d9e0 14ab94 1e R c173d9e0 14abb2 38 R c173d9e0 14c4a7 1e R c173d9e0 14c4c5 2f R c173d9e0 14c664 1e R c173d9e0 14c682 32 R c173d9e0 14c7eb 1e R c173d9e0 14c809 33 R c173d9e0 14c9bc 1e R c173d9e0 14c9da 36 R c173d9e0 14cd79 1e R c173d9e0 14cd97 2c R c173d9e0 14ce6b 1e R c173d9e0 14ce89 33 R c173d9e0 14d0f4 1e R c173d9e0 14d112 31 R c173d9e0 14d6e1 1e R c173d9e0 14d6ff 4a R c173d9e0 14ddca 1e R c173d9e0 14dde8 48 R c173d9e0 14e3c7 1e R c173d9e0 14e3e5 39 R c173d9e0 14f36c 1e R c173d9e0 14f38a 38 R c173d9e0 14f4bd 1e R c173d9e0 14f4db 43 R c173d9e0 14f6f9 1e R c173d9e0 14f717 43 R c173d9e0 14f982 1e R c173d9e0 14f9a0 4e R c173d9e0 14fc32 1e R c173d9e0 14fc50 47 R c173d9e0 150854 1e R c173d9e0 150872 47 R c173d9e0 151639 1e R c173d9e0 151657 48 R c173d9e0 151dcd 1e R c173d9e0 151deb 48 R c173d9e0 152231 1e R c173d9e0 15224f 36 R c173d9e0 153453 1e R c173d9e0 153471 3a R c173d9e0 153bfa 1e R c173d9e0 153c18 2d R c173d9e0 153df1 1e R c173d9e0 153e0f 3c R c173d9e0 153f9f 1e R c173d9e0 153fbd 2d R c173d9e0 154144 1e R c173d9e0 154162 2b R c173d9e0 1543f5 1e R c173d9e0 154413 30 R c173d9e0 155210 1e R c173d9e0 15522e 36 R c173d9e0 155526 1e R c173d9e0 155544 36 R c173d9e0 15566f 1e R c173d9e0 15568d 4a R c173d9e0 15590f 1e R c173d9e0 15592d 34 R c173d9e0 155eec 1e R c173d9e0 155f0a 45 R c173d9e0 15620f 1e R c173d9e0 15622d 28 R c173d9e0 158c6d 1e R c173d9e0 158c8b 42 R c173d9e0 158e3c 1e R c173d9e0 158e5a 37 R c173d9e0 15943a 1e R c173d9e0 159458 38 R c173d9e0 159a67 1e R c173d9e0 159a85 39 R c173d9e0 159c0c 1e R c173d9e0 159c2a 28 R c173d9e0 15a16f 1e R c173d9e0 15a18d 2f R c173d9e0 15a35b 1e R c173d9e0 15a379 36 R c173d9e0 15a77a 1e R c173d9e0 15a798 33 R c173d9e0 15adad 1e R c173d9e0 15adcb 3d R c173d9e0 15b4c7 1e R c173d9e0 15b4e5 39 R c173d9e0 15b61c 1e R c173d9e0 15b63a 3d R c173d9e0 15bb40 1e R c173d9e0 15bb5e 37 R c173d9e0 15c142 1e R c173d9e0 15c160 2c R c173d9e0 15c3ad 1e R c173d9e0 15c3cb 33 R c173d9e0 15c591 1e R c173d9e0 15c5af 2d R c173d9e0 15c801 1e R c173d9e0 15c81f 41 R c173d9e0 15ce11 1e R c173d9e0 15ce2f 2f R c173d9e0 15d131 1e R c173d9e0 15d14f 32 R c173d9e0 15d65a 1e R c173d9e0 15d678 33 R c173d9e0 15d7a0 1e R c173d9e0 15d7be 36 R c173d9e0 15db1d 1e R c173d9e0 15db3b 33 R c173d9e0 15e265 1e R c173d9e0 15e283 37 R c173d9e0 15f47f 1e R c173d9e0 15f49d 3b R c173d9e0 15fcb6 1e R c173d9e0 15fcd4 34 R c173d9e0 1619d8 1e R c173d9e0 1619f6 40 R c173d9e0 161e35 1e R c173d9e0 161e53 38 R c173d9e0 1630a0 1e R c173d9e0 1630be 39 R c173d9e0 1637a3 1e R c173d9e0 1637c1 3a R c173d9e0 163cb6 1e R c173d9e0 163cd4 43 R c173d9e0 163ea1 1e R c173d9e0 163ebf 39 R c173d9e0 16483c 1e R c173d9e0 16485a 36 R c173d9e0 164abe 1e R c173d9e0 164adc 3a R c173d9e0 16527e 1e R c173d9e0 16529c 3c R c173d9e0 166100 1e R c173d9e0 16611e 37 R c173d9e0 1663ed 1e R c173d9e0 16640b 40 R c173d9e0 16655e 1e R c173d9e0 16657c 60 R c173d9e0 166b15 1e R c173d9e0 166b33 3e R c173d9e0 16774e 1e R c173d9e0 16776c 3b R c173d9e0 167ee3 1e R c173d9e0 167f01 3d R c173d9e0 1688ca 1e R c173d9e0 1688e8 30 R c173d9e0 168ca7 1e R c173d9e0 168cc5 37 R c173d9e0 169289 1e R c173d9e0 1692a7 46 R c173d9e0 16965b 1e R c173d9e0 169679 33 R c173d9e0 16bf43 1e R c173d9e0 16bf61 37 R c173d9e0 16d15c 1e R c173d9e0 16d17a 39 R c173d9e0 16d36b 1e R c173d9e0 16d389 39 R c173d9e0 16d762 1e R c173d9e0 16d780 45 R c173d9e0 16e077 1e R c173d9e0 16e095 37 R c173d9e0 176c0c 1e R c173d9e0 176c2a 51 R c173d9e0 177033 1e R c173d9e0 177051 37 R c173d9e0 177dba 1e R c173d9e0 177dd8 37 R c173d9e0 178568 1e R c173d9e0 178586 48 R c173d9e0 178946 1e R c173d9e0 178964 34 R c173d9e0 17ae22 1e R c173d9e0 17ae40 38 R c173d9e0 17bd95 1e R c173d9e0 17bdb3 3a R c173d9e0 17c192 1e R c173d9e0 17c1b0 38 R c173d9e0 182f49 1e R c173d9e0 182f67 38 R c173d9e0 1838b8 1e R c173d9e0 1838d6 38 R c173d9e0 1847ad 1e R c173d9e0 1847cb 33 R c173d9e0 18570f 1e R c173d9e0 18572d 36 R c173d9e0 1862ad 1e R c173d9e0 1862cb 37 R c173d9e0 186ce7 1e R c173d9e0 186d05 2f R c173d9e0 1880eb 1e R c173d9e0 188109 34 R c173d9e0 189e7e 1e R c173d9e0 189e9c 39 R c173d9e0 18a78f 1e R c173d9e0 18a7ad 31 R c173d9e0 18ada1 1e R c173d9e0 18adbf 35 R c173d9e0 18afc0 1e R c173d9e0 18afde 2f R c173d9e0 18b41b 1e R c173d9e0 18b439 2d R c173d9e0 18d251 1e R c173d9e0 18d26f 35 R c173d9e0 18d726 1e R c173d9e0 18d744 35 R c173d9e0 18db7a 1e R c173d9e0 18db98 35 R c173d9e0 18de78 1e R c173d9e0 18de96 35 R c173d9e0 18e176 1e R c173d9e0 18e194 3e R c173d9e0 18e35e 1e R c173d9e0 18e37c 3f R c173d9e0 18e5df 1e R c173d9e0 18e5fd 33 R c173d9e0 191fb6 1e R c173d9e0 191fd4 34 R c173d9e0 193526 1e R c173d9e0 193544 35 R c173d9e0 195492 1e R c173d9e0 1954b0 33 R c173d9e0 195bef 1e R c173d9e0 195c0d 3b R c173d9e0 196a4e 1e R c173d9e0 196a6c 3c R c173d9e0 19752a 1e R c173d9e0 197548 3b R c173d9e0 198aa3 1e R c173d9e0 198ac1 3c R c173d9e0 199b2f 1e R c173d9e0 199b4d 38 R c173d9e0 199cd4 1e R c173d9e0 199cf2 47 R c173d9e0 19a25e 1e R c173d9e0 19a27c 34 R c173d9e0 19cee2 1e R c173d9e0 19cf00 28 R c173d9e0 19fd69 1e R c173d9e0 19fd87 2e R c173d9e0 19fe94 1e R c173d9e0 19feb2 31 R c173d9e0 1a08ad 1e R c173d9e0 1a08cb 3d R c173d9e0 1a0a8e 1e R c173d9e0 1a0aac 35 R c173d9e0 1a20f8 1e R c173d9e0 1a2116 3a R c173d9e0 1a2256 1e R c173d9e0 1a2274 36 R c173d9e0 1a3f86 1e R c173d9e0 1a3fa4 37 R c173d9e0 1a50ea 1e R c173d9e0 1a5108 39 R c173d9e0 1a6810 1e R c173d9e0 1a682e 49 R c173d9e0 1a6ff9 1e R c173d9e0 1a7017 42 R c173d9e0 1a718d 1e R c173d9e0 1a71ab 46 R c173d9e0 1a76d9 1e R c173d9e0 1a76f7 46 R c173d9e0 1a7cc4 1e R c173d9e0 1a7ce2 46 R c173d9e0 1a82af 1e R c173d9e0 1a82cd 3d R c173d9e0 1a840f 1e R c173d9e0 1a842d 41 R c173d9e0 1a899a 1e R c173d9e0 1a89b8 41 R c173d9e0 1a92ac 1e R c173d9e0 1a92ca 3f R c173d9e0 1a9505 1e R c173d9e0 1a9523 45 R c173d9e0 1aa272 1e R c173d9e0 1aa290 35 R c173d9e0 1aa37d 1e R c173d9e0 1aa39b 40 R c173d9e0 1aa68e 1e R c173d9e0 1aa6ac 44 R c173d9e0 1ab0bd 1e R c173d9e0 1ab0db 44 R c173d9e0 1abb8a 1e R c173d9e0 1abba8 44 R c173d9e0 1acbf7 1e R c173d9e0 1acc15 42 R c173d9e0 1acd91 1e R c173d9e0 1acdaf 46 R c173d9e0 1ad64e 1e R c173d9e0 1ad66c 46 R c173d9e0 1adfaa 1e R c173d9e0 1adfc8 46 R c173d9e0 1aea16 1e R c173d9e0 1aea34 35 R c173d9e0 1aef35 1e R c173d9e0 1aef53 39 R c173d9e0 1b2518 1e R c173d9e0 1b2536 39 R c173d9e0 1b2db4 1e R c173d9e0 1b2dd2 39 R c173d9e0 1b382c 1e R c173d9e0 1b384a 39 R c173d9e0 1b3b50 1e R c173d9e0 1b3b6e 39 R c173d9e0 1b3c67 1e R c173d9e0 1b3c85 3b R c173d9e0 1b3d84 1e R c173d9e0 1b3da2 3a R c173d9e0 1b4160 1e R c173d9e0 1b417e 3e R c173d9e0 1b5444 1e R c173d9e0 1b5462 3e R c173d9e0 1b6757 1e R c173d9e0 1b6775 3e R c173d9e0 1b7ba3 1e R c173d9e0 1b7bc1 3c R c173d9e0 1b7e61 1e R c173d9e0 1b7e7f 40 R c173d9e0 1b8dca 1e R c173d9e0 1b8de8 40 R c173d9e0 1b9f04 1e R c173d9e0 1b9f22 40 R c173d9e0 1bb0c7 1e R c173d9e0 1bb0e5 3b R c173d9e0 1bb7bb 1e R c173d9e0 1bb7d9 41 R c173d9e0 1bc88d 1e R c173d9e0 1bc8ab 32 R c173d9e0 1bd765 1e R c173d9e0 1bd783 49 R c173d9e0 1bdd5d 1e R c173d9e0 1bdd7b 32 R c173d9e0 1c45e6 1e R c173d9e0 1c4604 33 R c173d9e0 1c74bc 1e R c173d9e0 1c74da 40 R c173d9e0 1c7f3a 1e R c173d9e0 1c7f58 32 R c173d9e0 1c8356 1e R c173d9e0 1c8374 31 R c173d9e0 1c8a6a 1e R c173d9e0 1c8a88 34 R c173d9e0 1c8ca0 1e R c173d9e0 1c8cbe 36 R c173d9e0 1c96e6 1e R c173d9e0 1c9704 36 R c173d9e0 1ca287 1e R c173d9e0 1ca2a5 36 R c173d9e0 1ca50a 1e R c173d9e0 1ca528 47 R c173d9e0 1ca86b 1e R c173d9e0 1ca889 48 R c173d9e0 1cadb0 1e R c173d9e0 1cadce 4e R c173d9e0 1cb145 1e R c173d9e0 1cb163 44 R c173d9e0 1cb85c 1e R c173d9e0 1cb87a 4b R c173d9e0 1cbb62 1e R c173d9e0 1cbb80 34 R c173d9e0 1d04fb 1e R c173d9e0 1d0519 3e R c173d9e0 1d0798 1e R c173d9e0 1d07b6 3c R c173d9e0 1d1058 1e R c173d9e0 1d1076 34 R c173d9e0 1d2090 1e R c173d9e0 1d20ae 38 R c173d9e0 1d227e 1e R c173d9e0 1d229c 35 R c173d9e0 1d23c5 1e R c173d9e0 1d23e3 41 R c173d9e0 1d2df9 1e R c173d9e0 1d2e17 33 R c173d9e0 1d3314 1e R c173d9e0 1d3332 38 R c173d9e0 1d34b4 1e R c173d9e0 1d34d2 41 R c173d9e0 1d3a13 1e R c173d9e0 1d3a31 33 R c173d9e0 1d7090 1e R c173d9e0 1d70ae 31 R c173d9e0 1d71c7 1e R c173d9e0 1d71e5 52 R c173d9e0 1d751a 1e R c173d9e0 1d7538 45 R c173d9e0 1d7a48 1e R c173d9e0 1d7a66 2f R c173d9e0 1d9fb5 1e R c173d9e0 1d9fd3 41 R c173d9e0 1da4da 1e R c173d9e0 1da4f8 2e R c173d9e0 1dac64 1e R c173d9e0 1dac82 35 R c173d9e0 1db113 1e R c173d9e0 1db131 38 R c173d9e0 1db464 1e R c173d9e0 1db482 43 R c173d9e0 1db8bd 1e R c173d9e0 1db8db 47 R c173d9e0 1dbef6 1e R c173d9e0 1dbf14 31 R c173d9e0 1dcd67 1e R c173d9e0 1dcd85 3a R c173d9e0 1dd3bd 1e R c173d9e0 1dd3db 3a R c173d9e0 1dd6af 1e R c173d9e0 1dd6cd 38 R c173d9e0 1ddb50 1e R c173d9e0 1ddb6e 2f R c173d9e0 1ddca2 1e R c173d9e0 1ddcc0 33 R c173d9e0 1de1ba 1e R c173d9e0 1de1d8 33 R c173d9e0 1de552 1e R c173d9e0 1de570 2f R c173d9e0 1df8d9 1e R c173d9e0 1df8f7 37 R c173d9e0 1e03dc 1e R c173d9e0 1e03fa 27 R c173d9e0 1e16ea 1e R c173d9e0 1e1708 2f R c173d9e0 1e1993 1e R c173d9e0 1e19b1 33 R c173d9e0 1e1ad2 1e R c173d9e0 1e1af0 37 R c173d9e0 1e213a 1e R c173d9e0 1e2158 40 R c173d9e0 1e26d2 1e R c173d9e0 1e26f0 3a R c173d9e0 1e2833 1e R c173d9e0 1e2851 40 R c173d9e0 1e29a6 1e R c173d9e0 1e29c4 30 R c173d9e0 1e2a91 1e R c173d9e0 1e2aaf 3f R c173d9e0 1e2f9b 1e R c173d9e0 1e2fb9 3d R c173d9e0 1e3255 1e R c173d9e0 1e3273 39 R c173d9e0 1e378b 1e R c173d9e0 1e37a9 39 R c173d9e0 1e3c0e 1e R c173d9e0 1e3c2c 2e R c173d9e0 1e3d3a 1e R c173d9e0 1e3d58 3c R c173d9e0 1e41bd 1e R c173d9e0 1e41db 34 R c173d9e0 1e4614 1e R c173d9e0 1e4632 2c R c173d9e0 1e483c 1e R c173d9e0 1e485a 2d R c173d9e0 1e4969 1e R c173d9e0 1e4987 2d R c173d9e0 1e4f54 1e R c173d9e0 1e4f72 36 R c173d9e0 1e509e 1e R c173d9e0 1e50bc 4b R c173d9e0 1e5342 1e R c173d9e0 1e5360 34 R c173d9e0 1e5cf2 1e R c173d9e0 1e5d10 35 R c173d9e0 1e5fde 1e R c173d9e0 1e5ffc 39 R c173d9e0 1e67c3 1e R c173d9e0 1e67e1 3c R c173d9e0 1e703d 1e R c173d9e0 1e705b 3c R c173d9e0 1e72fe 1e R c173d9e0 1e731c 3b R c173d9e0 1e7a06 1e R c173d9e0 1e7a24 29 R c173d9e0 1e7b4e 1e R c173d9e0 1e7b6c 30 R c173d9e0 1e7f02 1e R c173d9e0 1e7f20 2e R c173d9e0 1e8244 1e R c173d9e0 1e8262 2d R c173d9e0 1e879b 1e R c173d9e0 1e87b9 32 R c173d9e0 1e8b1d 1e R c173d9e0 1e8b3b 30 R c173d9e0 1e8f87 1e R c173d9e0 1e8fa5 38 R c173d9e0 1e9b16 1e R c173d9e0 1e9b34 2b R c173d9e0 1e9c63 1e R c173d9e0 1e9c81 35 R c173d9e0 1e9e65 1e R c173d9e0 1e9e83 33 R c173d9e0 1e9fc7 1e R c173d9e0 1e9fe5 37 R c173d9e0 1ea387 1e R c173d9e0 1ea3a5 3e R c173d9e0 1ea6b0 1e R c173d9e0 1ea6ce 3e R c173d9e0 1eaa36 1e R c173d9e0 1eaa54 3e R c173d9e0 1ead2a 1e R c173d9e0 1ead48 3e R c173d9e0 1eaff6 1e R c173d9e0 1eb014 3c R c173d9e0 1eb41b 1e R c173d9e0 1eb439 42 R c173d9e0 1eb595 1e R c173d9e0 1eb5b3 63 R c173d9e0 1eb8a5 1e R c173d9e0 1eb8c3 40 R c173d9e0 1ec2c6 1e R c173d9e0 1ec2e4 31 R c173d9e0 1ec470 1e R c173d9e0 1ec48e 40 R c173d9e0 1ec5e2 1e R c173d9e0 1ec600 5f R c173d9e0 1ec8e0 1e R c173d9e0 1ec8fe 3e R c173d9e0 1ece36 1e R c173d9e0 1ece54 39 R c173d9e0 1ecfd9 1e R c173d9e0 1ecff7 39 R c173d9e0 1ed6e0 1e R c173d9e0 1ed6fe 2d R c173d9e0 1ed7eb 1e R c173d9e0 1ed809 39 R c173d9e0 1eda63 1e R c173d9e0 1eda81 40 R c173d9e0 1eeafb 1e R c173d9e0 1eeb19 36 R c173d9e0 1eed9a 1e R c173d9e0 1eedb8 34 R c173d9e0 1f0e8e 1e R c173d9e0 1f0eac 3e R c173d9e0 1f1fa8 1e R c173d9e0 1f1fc6 32 R c173d9e0 1f2c3f 1e R c173d9e0 1f2c5d 31 R c173d9e0 1f2df4 1e R c173d9e0 1f2e12 31 R c173d9e0 1f31cf 1e R c173d9e0 1f31ed 39 R c173d9e0 1f3a87 1e R c173d9e0 1f3aa5 2f R c173d9e0 1f3fb5 1e R c173d9e0 1f3fd3 36 R c173d9e0 1f4cd2 1e R c173d9e0 1f4cf0 37 R c173d9e0 1f508e 1e R c173d9e0 1f50ac 3b R c173d9e0 1f5468 1e R c173d9e0 1f5486 3d R c173d9e0 1f5779 1e R c173d9e0 1f5797 3c R c173d9e0 1f5be6 1e R c173d9e0 1f5c04 3e R c173d9e0 1f5f81 1e R c173d9e0 1f5f9f 3b R c173d9e0 1f6906 1e R c173d9e0 1f6924 3b R c173d9e0 1f706e 1e R c173d9e0 1f708c 2c R c173d9e0 1f7312 1e R c173d9e0 1f7330 32 R c173d9e0 1f87c3 1e R c173d9e0 1f87e1 36 R c173d9e0 1f8aca 1e R c173d9e0 1f8ae8 34 R c173d9e0 1fa753 1e R c173d9e0 1fa771 32 R c173d9e0 1fde22 1e R c173d9e0 1fde40 43 R c173d9e0 1fe2e1 1e R c173d9e0 1fe2ff 43 R c173d9e0 1fe586 1e R c173d9e0 1fe5a4 43 R c173d9e0 1fea1f 1e R c173d9e0 1fea3d 54 R c173d9e0 1fedbc 1e R c173d9e0 1fedda 55 R c173d9e0 1ff348 1e R c173d9e0 1ff366 51 R c173d9e0 1ffaa6 1e R c173d9e0 1ffac4 41 R c173d9e0 201da7 1e R c173d9e0 201dc5 41 R c173d9e0 202859 1e R c173d9e0 202877 41 R c173d9e0 2034dc 1e R c173d9e0 2034fa 41 R c173d9e0 20377b 1e R c173d9e0 203799 52 R c173d9e0 203b0e 1e R c173d9e0 203b2c 53 R c173d9e0 204085 1e R c173d9e0 2040a3 4f R c173d9e0 2047ce 1e R c173d9e0 2047ec 56 R c173d9e0 204b1c 1e R c173d9e0 204b3a 3f R c173d9e0 2088ba 1e R c173d9e0 2088d8 39 R c173d9e0 20990c 1e R c173d9e0 20992a 36 R c173d9e0 20a715 1e R c173d9e0 20a733 3a R c173d9e0 20b59b 1e R c173d9e0 20b5b9 3c R c173d9e0 20c433 1e R c173d9e0 20c451 3d R c173d9e0 20c820 1e R c173d9e0 20c83e 3f R c173d9e0 20cc1d 1e R c173d9e0 20cc3b 3b R c173d9e0 20d343 1e R c173d9e0 20d361 3d R c173d9e0 20d584 1e R c173d9e0 20d5a2 3c R c173d9e0 20d9c1 1e R c173d9e0 20d9df 3e R c173d9e0 20de0c 1e R c173d9e0 20de2a 3b R c173d9e0 20e0f9 1e R c173d9e0 20e117 3b R c173d9e0 20e3bf 1e R c173d9e0 20e3dd 38 R c173d9e0 212c53 1e R c173d9e0 212c71 3a R c173d9e0 2179af 1e R c173d9e0 2179cd 48 R c173d9e0 217c2e 1e R c173d9e0 217c4c 37 R c173d9e0 21811e 1e R c173d9e0 21813c 34 R c173d9e0 21825c 1e R c173d9e0 21827a 3f R c173d9e0 21885c 1e R c173d9e0 21887a 43 R c173d9e0 218a91 1e R c173d9e0 218aaf 3c R c173d9e0 218eee 1e R c173d9e0 218f0c 32 R c173d9e0 21974f 1e R c173d9e0 21976d 3e R c173d9e0 21a34a 1e R c173d9e0 21a368 3c R c173d9e0 21b0b9 1e R c173d9e0 21b0d7 3e R c173d9e0 21b50b 1e R c173d9e0 21b529 2c R c173d9e0 21b611 1e R c173d9e0 21b62f 38 R c173d9e0 21d3bb 1e R c173d9e0 21d3d9 3b R c173d9e0 21f363 1e R c173d9e0 21f381 3b R c173d9e0 221515 1e R c173d9e0 221533 3b R c173d9e0 223422 1e R c173d9e0 223440 3b R c173d9e0 225319 1e R c173d9e0 225337 3b R c173d9e0 22751a 1e R c173d9e0 227538 3b R c173d9e0 22963a 1e R c173d9e0 229658 3b R c173d9e0 22b4ec 1e R c173d9e0 22b50a 3e R c173d9e0 22d310 1e R c173d9e0 22d32e 3e R c173d9e0 22f133 1e R c173d9e0 22f151 36 R c173d9e0 22fe59 1e R c173d9e0 22fe77 3b R c173d9e0 230035 1e R c173d9e0 230053 40 R c173d9e0 230513 1e R c173d9e0 230531 2e R c173d9e0 230fee 1e R c173d9e0 23100c 35 R c173d9e0 231549 1e R c173d9e0 231567 50 R c173d9e0 231973 1e R c173d9e0 231991 47 R c173d9e0 231f57 1e R c173d9e0 231f75 33 R c173d9e0 232b13 1e R c173d9e0 232b31 2f R c173d9e0 232dc5 1e R c173d9e0 232de3 32 R c173d9e0 23334a 1e R c173d9e0 233368 39 R c173d9e0 233914 1e R c173d9e0 233932 31 R c173d9e0 2383e8 1e R c173d9e0 238406 36 R c173d9e0 2387a0 1e R c173d9e0 2387be 35 R c173d9e0 238baf 1e R c173d9e0 238bcd 2d R c173d9e0 238cab 1e R c173d9e0 238cc9 2e R c173d9e0 238e5d 1e R c173d9e0 238e7b 2c R c173d9e0 23bf38 1e R c173d9e0 23bf56 2c R c173d9e0 23c271 1e R c173d9e0 23c28f 28 R c173d9e0 23c46e 1e R c173d9e0 23c48c 33 R c173d9e0 23c60e 1e R c173d9e0 23c62c 28 R c173d9e0 23cf20 1e R c173d9e0 23cf3e 2e R c173d9e0 23d869 1e R c173d9e0 23d887 2e R c173d9e0 23dc1f 1e R c173d9e0 23dc3d 2f R c173d9e0 23ee3f 1e R c173d9e0 23ee5d 2f R c173d9e0 23f0cb 1e R c173d9e0 23f0e9 2f R c173d9e0 23f5b7 1e R c173d9e0 23f5d5 29 R c173d9e0 23fdb0 1e R c173d9e0 23fdce 35 R c173d9e0 240141 1e R c173d9e0 24015f 37 R c173d9e0 2403fc 1e R c173d9e0 24041a 3b R c173d9e0 241a4c 1e R c173d9e0 241a6a 44 R c173d9e0 2437c3 1e R c173d9e0 2437e1 38 R c173d9e0 243c6f 1e R c173d9e0 243c8d 32 R c173d9e0 2457f7 1e R c173d9e0 245815 38 R c173d9e0 246416 1e R c173d9e0 246434 41 R c173d9e0 247354 1e R c173d9e0 247372 30 R c173d9e0 24ae47 1e R c173d9e0 24ae65 33 R c173d9e0 24b690 1e R c173d9e0 24b6ae 33 R c173d9e0 24c8ac 1e R c173d9e0 24c8ca 39 R c173d9e0 24d0bc 1e R c173d9e0 24d0da 42 R c173d9e0 24d93e 1e R c173d9e0 24d95c 35 R c173d9e0 24e5c6 1e R c173d9e0 24e5e4 33 R c173d9e0 24ef8e 1e R c173d9e0 24efac 3a R c173d9e0 24fdbe 1e R c173d9e0 24fddc 33 R c173d9e0 250d51 1e R c173d9e0 250d6f 3a R c173d9e0 252314 1e R c173d9e0 252332 33 R c173d9e0 2533c1 1e R c173d9e0 2533df 33 R c173d9e0 253b63 1e R c173d9e0 253b81 36 R c173d9e0 253cae 1e R c173d9e0 253ccc 45 R c173d9e0 254cec 1e R c173d9e0 254d0a 4a R c173d9e0 255004 1e R c173d9e0 255022 4f R c173d9e0 2565ee 1e R c173d9e0 25660c 3e R c173d9e0 256bf1 1e R c173d9e0 256c0f 58 R c173d9e0 25728a 1e R c173d9e0 2572a8 42 R c173d9e0 258cd3 1e R c173d9e0 258cf1 45 R c173d9e0 259aff 1e R c173d9e0 259b1d 41 R c173d9e0 25a66d 1e R c173d9e0 25a68b 4a R c173d9e0 25b811 1e R c173d9e0 25b82f 34 R c173d9e0 25ee03 1e R c173d9e0 25ee21 27 R c173d9e0 260352 1e R c173d9e0 260370 2d R c173d9e0 260f92 1e R c173d9e0 260fb0 3a R c173d9e0 2620ce 1e R c173d9e0 2620ec 43 R c173d9e0 26348c 1e R c173d9e0 2634aa 32 R c173d9e0 2683f0 1e R c173d9e0 26840e 3b R c173d9e0 26870e 1e R c173d9e0 26872c 35 R c173d9e0 269123 1e R c173d9e0 269141 32 R c173d9e0 26f6dd 1e R c173d9e0 26f6fb 3b R c173d9e0 26ff33 1e R c173d9e0 26ff51 35 R c173d9e0 2709b8 1e R c173d9e0 2709d6 2f R c173d9e0 278518 1e R c173d9e0 278536 35 R c173d9e0 2791f6 1e R c173d9e0 279214 3e R c173d9e0 279869 1e R c173d9e0 279887 3b R c173d9e0 279ba9 1e R c173d9e0 279bc7 44 R c173d9e0 279dc3 1e R c173d9e0 279de1 30 R c173d9e0 27ae26 1e R c173d9e0 27ae44 41 R c173d9e0 27b844 1e R c173d9e0 27b862 33 R c173d9e0 27ca3f 1e R c173d9e0 27ca5d 45 R c173d9e0 27d3cd 1e R c173d9e0 27d3eb 33 R c173d9e0 27e442 1e R c173d9e0 27e460 25 R c173d9e0 27e782 1e R c173d9e0 27e7a0 2d R c173d9e0 27ed4e 1e R c173d9e0 27ed6c 32 R c173d9e0 27f6fc 1e R c173d9e0 27f71a 39 R c173d9e0 27fbdb 1e R c173d9e0 27fbf9 30 R c173d9e0 285a1d 1e R c173d9e0 285a3b 33 R c173d9e0 286259 1e R c173d9e0 286277 34 R c173d9e0 28641c 1e R c173d9e0 28643a 30 R c173d9e0 28a7e4 1e R c173d9e0 28a802 33 R c173d9e0 28b159 1e R c173d9e0 28b177 2d R c173d9e0 291ef3 1e R c173d9e0 291f11 33 R c173d9e0 2934cb 1e R c173d9e0 2934e9 3c R c173d9e0 295a1a 1e R c173d9e0 295a38 2b R c173d9e0 2960a2 1e R c173d9e0 2960c0 31 R c173d9e0 2966e1 1e R c173d9e0 2966ff 32 R c173d9e0 296d4e 1e R c173d9e0 296d6c 38 R c173d9e0 2974f3 1e R c173d9e0 297511 3a R c173d9e0 297c90 1e R c173d9e0 297cae 30 R c173d9e0 29834a 1e R c173d9e0 298368 31 R c173d9e0 298a32 1e R c173d9e0 298a50 31 R c173d9e0 298d7d 1e R c173d9e0 298d9b 2a R c173d9e0 298f00 1e R c173d9e0 298f1e 28 R c173d9e0 29900d 1e R c173d9e0 29902b 29 R c173d9e0 299681 1e R c173d9e0 29969f 31 R c173d9e0 2998be 1e R c173d9e0 2998dc 36 R c173d9e0 299c18 1e R c173d9e0 299c36 28 R c173d9e0 299d33 1e R c173d9e0 299d51 2b R c173d9e0 29a0f4 1e R c173d9e0 29a112 33 R c173d9e0 29a226 1e R c173d9e0 29a244 28 R c173d9e0 29ab9c 1e R c173d9e0 29abba 3c R c173d9e0 29b1db 1e R c173d9e0 29b1f9 3d R c173d9e0 29bb39 1e R c173d9e0 29bb57 3c R c173d9e0 29c047 1e R c173d9e0 29c065 3c R c173d9e0 29ce1a 1e R c173d9e0 29ce38 44 R c173d9e0 29d743 1e R c173d9e0 29d761 3e R c173d9e0 29dd12 1e R c173d9e0 29dd30 45 R c173d9e0 29e71d 1e R c173d9e0 29e73b 43 R c173d9e0 29edd2 1e R c173d9e0 29edf0 30 R c173d9e0 29f514 1e R c173d9e0 29f532 37 R c173d9e0 29f712 1e R c173d9e0 29f730 31 R c173d9e0 2a04ee 1e R c173d9e0 2a050c 49 R c173d9e0 2a08c8 1e R c173d9e0 2a08e6 4d R c173d9e0 2a0fcd 1e R c173d9e0 2a0feb 3b R c173d9e0 2a17bf 1e R c173d9e0 2a17dd 33 R c173d9e0 2a1cfd 1e R c173d9e0 2a1d1b 35 R c173d9e0 2a2097 1e R c173d9e0 2a20b5 35 R c173d9e0 2a22bf 1e R c173d9e0 2a22dd 49 R c173d9e0 2a27f6 1e R c173d9e0 2a2814 4a R c173d9e0 2a2da5 1e R c173d9e0 2a2dc3 58 R c173d9e0 2a317f 1e R c173d9e0 2a319d 43 R c173d9e0 2a3609 1e R c173d9e0 2a3627 33 R c173d9e0 2a4e71 1e R c173d9e0 2a4e8f 38 R c173d9e0 2a5203 1e R c173d9e0 2a5221 38 R c173d9e0 2a5657 1e R c173d9e0 2a5675 38 R c173d9e0 2a59ed 1e R c173d9e0 2a5a0b 38 R c173d9e0 2a5f4e 1e R c173d9e0 2a5f6c 50 R c173d9e0 2a6411 1e R c173d9e0 2a642f 4f R c173d9e0 2a69c5 1e R c173d9e0 2a69e3 41 R c173d9e0 2a70f3 1e R c173d9e0 2a7111 40 R c173d9e0 2a7d71 1e R c173d9e0 2a7d8f 36 R c173d9e0 2a9682 1e R c173d9e0 2a96a0 38 R c173d9e0 2a97d4 1e R c173d9e0 2a97f2 3f R c173d9e0 2a9c0e 1e R c173d9e0 2a9c2c 4a R c173d9e0 2aaee8 1e R c173d9e0 2aaf06 36 R c173d9e0 2ab49d 1e R c173d9e0 2ab4bb 35 R c173d9e0 2ab6fd 1e R c173d9e0 2ab71b 38 R c173d9e0 2ac3b2 1e R c173d9e0 2ac3d0 38 R c173d9e0 2ac653 1e R c173d9e0 2ac671 38 R c173d9e0 2ac944 1e R c173d9e0 2ac962 38 R c173d9e0 2acc0f 1e R c173d9e0 2acc2d 38 R c173d9e0 2acedb 1e R c173d9e0 2acef9 38 R c173d9e0 2ad22b 1e R c173d9e0 2ad249 38 R c173d9e0 2ad57b 1e R c173d9e0 2ad599 38 R c173d9e0 2ad8cb 1e R c173d9e0 2ad8e9 38 R c173d9e0 2adc1b 1e R c173d9e0 2adc39 4c R c173d9e0 2ae031 1e R c173d9e0 2ae04f 47 R c173d9e0 2ae438 1e R c173d9e0 2ae456 4a R c173d9e0 2aec69 1e R c173d9e0 2aec87 4d R c173d9e0 2af041 1e R c173d9e0 2af05f 4e R c173d9e0 2af635 1e R c173d9e0 2af653 49 R c173d9e0 2afcd7 1e R c173d9e0 2afcf5 36 R c173d9e0 2b2c42 1e R c173d9e0 2b2c60 36 R c173d9e0 2b48fe 1e R c173d9e0 2b491c 36 R c173d9e0 2b4a48 1e R c173d9e0 2b4a66 41 R c173d9e0 2b5764 1e R c173d9e0 2b5782 42 R c173d9e0 2b61db 1e R c173d9e0 2b61f9 46 R c173d9e0 2b654c 1e R c173d9e0 2b656a 46 R c173d9e0 2b68bd 1e R c173d9e0 2b68db 44 R c173d9e0 2b7379 1e R c173d9e0 2b7397 34 R c173d9e0 2b79ec 1e R c173d9e0 2b7a0a 41 R c173d9e0 2b7ea6 1e R c173d9e0 2b7ec4 41 R c173d9e0 2b828f 1e R c173d9e0 2b82ad 41 R c173d9e0 2b8704 1e R c173d9e0 2b8722 41 R c173d9e0 2b8ac5 1e R c173d9e0 2b8ae3 41 R c173d9e0 2b8f48 1e R c173d9e0 2b8f66 4b R c173d9e0 2b95fd 1e } 2 => Name of the APXS script (as returned by WA_APXS) dnl $3 => Name of the APXS value to retrieve dnl -------------------------------------------------------------------------- AC_DEFUN( [WA_APXS_GET], [ AC_MSG_CHECKING([for apxs $3 variable]) wa_apxs_get_tempval=`"$2" -q "$3" 2> /dev/null` if test "$?" != "0" ; then WA_ERROR([cannot execute $2]) fi AC_MSG_RESULT([${wa_apxs_get_tempval}]) WA_APPEND([$1],[${wa_apxs_get_tempval}]) unset wa_apxs_get_tempval ]) dnl -------------------------------------------------------------------------- dnl WA_APXS_SERVER dnl Retrieve the HTTP server version via APXS dnl $1 => Environment variable where the info string will be stored dnl $2 => Name of the APXS script (as returned by WA_APXS) dnl -------------------------------------------------------------------------- AC_DEFUN( [WA_APXS_SERVER], [ WA_APXS_GET([wa_apxs_server_sbindir],[$2],[SBINDIR]) WA_APXS_GET([wa_apxs_server_target],[$2],[TARGET]) wa_apxs_server_daemon="${wa_apxs_server_sbindir}/${wa_apxs_server_target}" WA_PATH_PROG_FAIL([wa_apxs_server_daemon],[${wa_apxs_server_daemon}],[httpd]) AC_MSG_CHECKING([httpd version]) wa_apxs_server_info="`${wa_apxs_server_daemon} -v | head -1`" wa_apxs_server_info="`echo ${wa_apxs_server_info} | cut -d: -f2`" wa_apxs_server_info="`echo ${wa_apxs_server_info}`" AC_MSG_RESULT([${wa_apxs_server_info}]) $1="${wa_apxs_server_info}" unset wa_apxs_server_sbindir unset wa_apxs_server_target unset wa_apxs_server_daemon unset wa_apxs_server_info ]) ?/* ========================================================================= * * * * The Apache Software License, Version 1.1 * * * * Copyright (c) 1999-2001 The Apache Software Foundation. *.7    !" #$% &'(()VCodeLineNumberTablemain([Ljava/lang/String;)V Exceptions) SourceFileBaasilooja1.java sun.jdbc.odbc.JdbcOdbcDriver* +,jdbc:odbc:poebaas- ./0 12 CREATE TABLE pallid (kogus int);3 45(INSERT INTO pallid (kogus) values ('0'); 6 Baasilooja1java/lang/Objectjava/lang/Exceptionjava/lang/ClassforName%(Ljava/lang/String;)Ljava/lang/Class;java/sql/DriverManager getConnectionM(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/sql/Connection;java/sql/ConnectioncreateStatement()Ljava/sql/Statement;java/sql/Statement executeUpdate(Ljava/lang/String;)Iclose! * l4WL+MN,- W N,- W+ &   " % - 3istribution. * * * * 3. The end-user documentation included with the redistribution, if any, * * must include the following acknowlegement: * * * * "This product includes software developed by the Apache Software * * Foundation ." * * * * Alternately, this acknowlegement may appear in the software itself, if * * and wherever such third-party acknowlegements normally appear. * * * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * * Foundation" must not be used to endorse or promote products derived * * from this software without prior written permission. For written * * permission, please contact . * * * * 5. Products derived from this software may not be called "Apache" nor may * * "Apache" appear in their names without prior written permission of the * * Apache Software Foundation. * * * * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES * * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY * * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * * POSSIBILITY OF SUCH DAMAGE. * * * * ========================================================================= * * * * This software consists of voluntary contributions made by many indivi- * * duals on behalf of the Apache Software Foundation. For more information * * on the Apache Software Foundation, please see . * * * * ========================================================================= */ package org.apache.catalina.connector.warp; import java.io.File; import java.io.IOException; import java.net.URL; import org.apache.catalina.Container; import org.apache.catalina.Context; import org.apache.catalina.Deployer; import org.apache.catalina.Host; import org.apache.catalina.Wrapper; import org.apache.catalina.core.StandardHost; import org.apache.catalina.core.StandardContext; import org.apache.catalina.deploy.FilterMap; import org.apache.catalina.deploy.SecurityConstraint; import org.apache.catalina.deploy.SecurityCollection; public class WarpConfigurationHandler { private static final String DEFAULT_SERVLET = "org.apache.catalina.servlets.DefaultServlet"; /* ==================================================================== */ /* Constructor */ /* ==================================================================== */ public WarpConfigurationHandler() { super(); } public boolean handle(WarpConnection connection, WarpPacket packet) throws IOException { WarpLogger logger=new WarpLogger(this); logger.setContainer(connection.getConnector().getContainer()); // Prepare the Welcome packet packet.setType(Constants.TYPE_CONF_WELCOME); packet.writeUnsignedShort(Constants.VERS_MAJOR); packet.writeUnsignedShort(Constants.VERS_MINOR); packet.writeInteger(connection.getConnector().uniqueId); connection.send(packet); // Loop for configuration packets while (true) { connection.recv(packet); switch (packet.getType()) { case Constants.TYPE_CONF_DEPLOY: { String appl=packet.readString(); String host=packet.readString(); int port=packet.readUnsignedShort(); String path=packet.readString(); Context context=null; packet.reset(); if (Constants.DEBUG) logger.log("Deploying web application \""+appl+"\" "+ "under "); try { context=deploy(connection,logger,appl,host,path); } catch (Exception e) { logger.log(e); } if (context==null) { String msg="Error deploying web application \""+appl+ "\" under "; logger.log(msg); packet.setType(Constants.TYPE_ERROR); packet.writeString(msg); connection.send(packet); break; } int k=connection.getConnector().applicationId(context); packet.setType(Constants.TYPE_CONF_APPLIC); packet.writeInteger(k); packet.writeString(context.getDocBase()); connection.send(packet); if (Constants.DEBUG) logger.debug("Application \""+appl+"\" deployed "+ "under with root="+context.getDocBase()+ " ID="+k); break; } case Constants.TYPE_CONF_MAP: { int id=packet.readInteger(); Context context=connection.getConnector() .applicationContext(id); if (context==null) { String msg="Invalid application ID for mappings "+id; logger.log(msg); packet.reset(); packet.setType(Constants.TYPE_ERROR); packet.writeString(msg); connection.send(packet); break; } String smap[]=context.findServletMappings(); if (smap!=null) { for (int x=0; x." * * * * Alternately, this acknowlegement may appear in the software itself, if * * and wherever such third-party acknowlegements normally appear. * * * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * * Foundation" must not be used to endorse or promote products derived * * from this software without prior written permission. For written * * permission, please contact . * * * * 5. Products derived from this software may not be called "Apache" nor may * * "Apache" appear in their names without prior written permission of the * * Apache Software Foundation. * * * * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES * * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY * * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * * POSSIBILITY OF SUCH DAMAGE. * * * * ========================================================================= * * * * This software consists of voluntary contributions made by many indivi- * * duals on behalf of the Apache Software Foundation. For more information * * on the Apache Software Foundation, please see . * * * * ========================================================================= */ package org.apache.catalina.connector.warp; import java.security.cert.X509Certificate; import java.security.cert.CertificateFactory; import java.io.ByteArrayInputStream; /* * Certificates handling. */ public class WarpCertificates { X509Certificate jsseCerts[] = null; /** * Create the certificate using the String. */ public WarpCertificates(String certString) { if (certString == null) return; byte[] certData = certString.getBytes(); ByteArrayInputStream bais = new ByteArrayInputStream(certData); // Fill the first element. try { CertificateFactory cf = CertificateFactory.getInstance("X.509"); X509Certificate cert = (X509Certificate) cf.generateCertificate(bais); jsseCerts = new X509Certificate[1]; jsseCerts[0] = cert; } catch(java.security.cert.CertificateException e) { // Certificate convertion failed. return; } } public X509Certificate [] getCertificates() { return jsseCerts; } } )/* ========================================================================= * * * * The Apache Software License, Version 1.1 * * * * Copyright (c) 1999-2001 The Apache Software Foundation. * * All rights reserved. * * * * ========================================================================= * * * * Redistribution and use in source and binary forms, with or without modi- * * fication, are permitted provided that the following conditions are met: * * * * 1. Redistributions of source code must retain the above copyright notice * * notice, this list of conditions and the following disclaimer. * * * * 2. Redistributions in binary form must reproduce the above copyright * * notice, this list of conditions and the following disclaimer in the * * documentation and/or other materials provided with the distribution. * * * * 3. The end-user documentation included with the redistribution, if any, * * must include the following acknowlegement: * * * * "This product includes software developed by the Apache Software * * Foundation ." * * * * Alternately, this acknowlegement may appear in the software itself, if * * and wherever such third-party acknowlegements normally appear. * * * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * * Foundation" must not be used to endorse or promote products derived * * from this software without prior written permission. For written * * permission, please contact . * * * * 5. Products derived from this software may not be called "Apache" nor may * * "Apache" appear in their names without prior written permission of the * * Apache Software Foundation. * * * * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES * * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY * * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * * POSSIBILITY OF SUCH DAMAGE. * * * * ========================================================================= * * * * This software consists of voluntary contributions made by many indivi- * * duals on behalf of the Apache Software Foundation. For more information * * on the Apache Software Foundation, please see . * * * * ========================================================================= */ package org.apache.catalina.connector.warp; import java.io.UnsupportedEncodingException; public class WarpPacket { /** This packet's data buffer */ protected byte buffer[]=null; /** Number of bytes stored in the buffer */ protected int size=0; /* Pointer to the last byte read in the buffer */ protected int pointer=0; /* Type of this packet */ private int type=-1; /* Maximum value for a 16 bit unsigned value (0x0ffff +1) */ private static final int MAX_LENGTH=65535; /** * Construct a new WarpPacket instance. */ public WarpPacket() { super(); this.buffer=new byte[MAX_LENGTH]; this.reset(); } /** * Reset this packet. */ public void reset() { this.pointer=0; this.size=0; this.type=Constants.TYPE_INVALID; } /** * Set this packet type. * * @param type The type of this packet. */ public void setType(int type) { this.type=type; } /** * Return the type of this packet. * * @return The type of this packet. */ public int getType() { return(this.type); } /** * Write an unsigned short value (16 bit) in the packet buffer. * * @param value The unsigned short value to write. * @exception IllegalArgumentException If the value is negative or greater * than 65535. * @exception ArrayIndexOutOfBoundsException If the packet buffer cannot * contain the new value. */ public void writeUnsignedShort(int value) { if (value<0) throw new IllegalArgumentException("Negative unsigned short"); if (value>65535) throw new IllegalArgumentException("Unsigned short is too big"); if ((this.size+2)>=MAX_LENGTH) throw new ArrayIndexOutOfBoundsException("Too much data"); this.buffer[this.size++]=(byte) ((value>>8)&0x0ff); this.buffer[this.size++]=(byte) ((value>>0)&0x0ff); } /** * Write a signed integer value (32 bit) in the packet buffer. * * @param value The signed integer value to write. * @exception ArrayIndexOutOfBoundsException If the packet buffer cannot * contain the new value. */ public void writeInteger(int value) { if ((this.size+4)>=MAX_LENGTH) throw new ArrayIndexOutOfBoundsException("Too much data"); this.buffer[this.size++]=(byte) ((value>>24)&0x0ff); this.buffer[this.size++]=(byte) ((value>>16)&0x0ff); this.buffer[this.size++]=(byte) ((value>>8)&0x0ff); this.buffer[this.size++]=(byte) ((value>>0)&0x0ff); } /** * Write a string into the packet buffer. * * @param string The string to write into the packet buffer. * @exception ArrayIndexOutOfBoundsException If the packet buffer cannot * contain the new value. * @exception RuntimeException If the platform doesn't support UTF-8 * encoding. */ public void writeString(String string) { try { if (string==null) string=""; byte temp[]=string.getBytes("UTF-8"); if ((this.size+temp.length+2)>MAX_LENGTH) throw new ArrayIndexOutOfBoundsException("Too much data"); this.writeUnsignedShort(temp.length); System.arraycopy(temp,0,this.buffer,this.size,temp.length); this.size+=temp.length; } catch (UnsupportedEncodingException s) { throw new RuntimeException("Unsupported encoding UTF-8"); } } /** * Read an unsigned short value (16 bit) from the packet buffer. * * @return The unsigned short value as an integer. * @exception ArrayIndexOutOfBoundsException If no data is left in the * packet buffer to be read. */ public int readUnsignedShort() { if ((this.pointer+2)>this.size) throw new ArrayIndexOutOfBoundsException("No data available"); int k=(this.buffer[this.pointer++])&0xff; k=(k<<8)+((this.buffer[this.pointer++])&0xff); return(k); } /** * Read a signed integer value (32 bit) from the packet buffer. * * @return The signed integer value. * @exception ArrayIndexOutOfBoundsException If no data is left in the * packet buffer to be read. */ public int readInteger() { if ((this.pointer+4)>this.size) throw new ArrayIndexOutOfBoundsException("No data available"); int k=(this.buffer[this.pointer++])&0xff; k=(k<<8)+((this.buffer[this.pointer++])&0xff); k=(k<<8)+((this.buffer[this.pointer++])&0xff); k=(k<<8)+((this.buffer[this.pointer++])&0xff); return(k); } /** * Read a string from the packet buffer. * * @return The string red from the packet buffer. * @exception ArrayIndexOutOfBoundsException If no data is left in the * packet buffer to be read. */ public String readString() { int length=this.readUnsignedShort(); try { String ret=new String(this.buffer,this.pointer,length,"UTF-8"); this.pointer+=length; return(ret); } catch (UnsupportedEncodingException s) { throw new RuntimeException("Unsupported encoding UTF-8"); } } public String dump() { StringBuffer buf=new StringBuffer("DATA="); for (int x=0; x32)&&(this.buffer[x]<127)) { buf.append((char)this.buffer[x]); } else { buf.append("0x"); String digit=Integer.toHexString((int)this.buffer[x]); if (digit.length()<2) buf.append('0'); if (digit.length()>2) digit=digit.substring(digit.length()-2); buf.append(digit); } buf.append(" "); } return(buf.toString()); } } 45/* ========================================================================= * * * * The Apache Software License, Version 1.1 * * * * Copyright (c) 1999-2001 The Apache Software Foundation. * * All rights reserved. * * * * ========================================================================= * * * * Redistribution and use in source and binary forms, with or without modi- * * fication, are permitted provided that the following conditions are met: * * * * 1. Redistributions of source code must retain the above copyright notice * * notice, this list of conditions and the following disclaimer. * * * * 2. Redistributions in binary form must reproduce the above copyright * * notice, this list of conditions and the following disclaimer in the * * documentation and/or other materials provided with the distribution. * * * * 3. The end-user documentation included with the redistribution, if any, * * must include the following acknowlegement: * * * * "This product includes software developed by the Apache Software * * Foundation ." * * * * Alternately, this acknowlegement may appear in the software itself, if * * and wherever such third-party acknowlegements normally appear. * * * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * * Foundation" must not be used to endorse or promote products derived * * from this software without prior written permission. For written * * permission, please contact . * * * * 5. Products derived from this software may not be called "Apache" nor may * * "Apache" appear in their names without prior written permission of the * * Apache Software Foundation. * * * * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES * * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY * * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * * POSSIBILITY OF SUCH DAMAGE. * * * * ========================================================================= * * * * This software consists of voluntary contributions made by many indivi- * * duals on behalf of the Apache Software Foundation. For more information * * on the Apache Software Foundation, please see . * * * * ========================================================================= */ package org.apache.catalina.connector.warp; import java.io.IOException; import java.io.OutputStream; import java.io.PrintWriter; import java.net.MalformedURLException; import java.net.URL; import java.security.AccessController; import java.security.PrivilegedAction; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.Locale; import java.util.TimeZone; import javax.servlet.ServletResponse; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; //import javax.servlet.http.HttpUtils; import org.apache.catalina.HttpResponse; import org.apache.catalina.Globals; import org.apache.catalina.Logger; import org.apache.catalina.connector.HttpResponseBase; import org.apache.catalina.util.CookieTools; import org.apache.catalina.util.RequestUtil; public class WarpResponse extends HttpResponseBase { /** The local stream */ private Stream localstream; /** The packet used for processing headers */ private WarpPacket packet; /** The connection to which we are associated */ private WarpConnection connection; /** * Create a new instance of a WarpResponse. */ public WarpResponse() { super(); // A WarpResponse is _always_ associated with a Stream this.localstream=new Stream(this); this.setStream(localstream); } /** * Recycle this WarpResponse instance. */ public void recycle() { // Recycle our parent super.recycle(); // Recycle the stream this.localstream.recycle(); // Tell the parent that a stream is already in use. this.setStream(localstream); } /** * Set the WarpPacket instance used to process headers. */ public void setPacket(WarpPacket packet) { this.packet=packet; } /** * Return the WarpPacket instance used to process headers. */ public WarpPacket getPacket() { return(this.packet); } /** * Associate this WarpResponse instance with a specific * WarpConnection instance. */ public void setConnection(WarpConnection connection) { this.connection=connection; } /** * Return the WarpConnection associated this instance of * WarpResponse. */ public WarpConnection getConnection() { return(this.connection); } /** * Flush output and finish. */ public void finishResponse() throws IOException { super.finishResponse(); this.localstream.finish(); } /** * Send the HTTP response headers, if this has not already occurred. */ protected void sendHeaders() throws IOException { if (isCommitted()) return; if ("HTTP/0.9".equals(request.getRequest().getProtocol())) { committed = true; return; } this.packet.reset(); this.packet.setType(Constants.TYPE_RES_STATUS); this.packet.writeUnsignedShort(status); this.packet.writeString(message); this.connection.send(this.packet); if (getContentType() != null) { this.packet.reset(); this.packet.setType(Constants.TYPE_RES_HEADER); this.packet.writeString("Content-Type"); this.packet.writeString(getContentType()); this.connection.send(this.packet); } if (getContentLength() >= 0) { this.packet.reset(); this.packet.setType(Constants.TYPE_RES_HEADER); this.packet.writeString("Content-Length"); this.packet.writeString(Integer.toString(getContentLength())); this.connection.send(this.packet); } synchronized (headers) { Iterator names = headers.keySet().iterator(); while (names.hasNext()) { String name = (String) names.next(); ArrayList values = (ArrayList) headers.get(name); Iterator items = values.iterator(); while (items.hasNext()) { String value = (String) items.next(); this.packet.reset(); this.packet.setType(Constants.TYPE_RES_HEADER); this.packet.writeString(name); this.packet.writeString(value); this.connection.send(this.packet); } } } // Add the session ID cookie if necessary HttpServletRequest hreq = (HttpServletRequest) request.getRequest(); HttpSession session = hreq.getSession(false); if ((session != null) && session.isNew() && (getContext() != null) && getContext().getCookies()) { Cookie cookie = new Cookie(Globals.SESSION_COOKIE_NAME, session.getId()); cookie.setMaxAge(-1); String contextPath = null; if (context != null) contextPath = context.getPath(); if ((contextPath != null) && (contextPath.length() > 0)) cookie.setPath(contextPath); else cookie.setPath("/"); if (hreq.isSecure()) cookie.setSecure(true); addCookie(cookie); } // Send all specified cookies (if any) synchronized (cookies) { Iterator items = cookies.iterator(); while (items.hasNext()) { Cookie cookie = (Cookie) items.next(); String name=CookieTools.getCookieHeaderName(cookie); StringBuffer value=new StringBuffer(); CookieTools.getCookieHeaderValue(cookie,value); this.packet.reset(); this.packet.setType(Constants.TYPE_RES_HEADER); this.packet.writeString(name); this.packet.writeString(value.toString()); this.connection.send(this.packet); } } this.packet.reset(); this.packet.setType(Constants.TYPE_RES_COMMIT); this.connection.send(this.packet); committed = true; } /** * The OutputStream that will handle all response body * transmission. */ protected class Stream extends OutputStream { /** The response associated with this stream instance. */ private WarpResponse response=null; /** The packet used by this stream instance. */ private WarpPacket packet=null; /** Wether close() was called or not. */ private boolean closed=false; /** * Construct a new instance of a WarpResponse.Stream * associated with a parent WarpResponse. */ protected Stream(WarpResponse response) { super(); this.response=response; this.packet=new WarpPacket(); } /** * Write one byte of data to the WarpPacket nested * within this WarpResponse.Stream. All data is buffered * until the flush() or close() method is * not called. */ public void write(int b) throws IOException { if (closed) throw new IOException("Stream closed"); if (packet.size>=packet.buffer.length) this.flush(); packet.buffer[packet.size++]=(byte)b; } /** * Flush the current packet to the WARP client. */ public void flush() throws IOException { if (closed) throw new IOException("Stream closed"); packet.setType(Constants.TYPE_RES_BODY); response.getConnection().send(packet); packet.reset(); } /** * Flush this WarpResponse.Stream and close it. */ public void close() throws IOException { if (closed) throw new IOException("Stream closed"); flush(); packet.setType(Constants.TYPE_RES_DONE); response.getConnection().send(packet); packet.reset(); } /** * Flush this WarpResponse.Stream and close it. */ public void finish() throws IOException { if (closed) return; else this.close(); } /** * Recycle this WarpResponse.Stream instance. */ public void recycle() { this.packet.reset(); this.closed=false; } } } +/* ========================================================================= * * * * The Apache Software License, Version 1.1 * * * * Copyright (c) 1999-2001 The Apache Software Foundation. * * All rights reserved. * * * * ========================================================================= * * * * Redistribution and use in source and binary forms, with or without modi- * * fication, are permitted provided that the following conditions are met: * * * * 1. Redistributions of source code must retain the above copyright notice * * notice, this list of conditions and the following disclaimer. * * * * 2. Redistributions in binary form must reproduce the above copyright * * notice, this list of conditions and the following disclaimer in the * * documentation and/or other materials provided with the distribution. * * * * 3. The end-user documentation included with the redistribution, if any, * * must include the following acknowlegement: * * * * "This product includes software developed by the Apache Software * * Foundation ." * * * * Alternately, this acknowlegement may appear in the software itself, if * * and wherever such third-party acknowlegements normally appear. * * * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * * Foundation" must not be used to endorse or promote products derived * * from this software without prior written permission. For written * * permission, please contact . * * * * 5. Products derived from this software may not be called "Apache" nor may * * "Apache" appear in their names without prior written permission of the * * Apache Software Foundation. * * * * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES * * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY * * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * * POSSIBILITY OF SUCH DAMAGE. * * * * ========================================================================= * * * * This software consists of voluntary contributions made by many indivi- * * duals on behalf of the Apache Software Foundation. For more information * * on the Apache Software Foundation, please see . * * * * ========================================================================= */ package org.apache.catalina.connector.warp; import java.io.*; import org.apache.catalina.Context; import org.apache.catalina.Host; import org.apache.catalina.connector.HttpRequestBase; public class WarpRequest extends HttpRequestBase { /** The local stream */ private Stream localstream; /** The connection to which we are associated */ private WarpConnection connection; private Host host=null; public WarpRequest() { super(); this.localstream=new Stream(this); this.setStream(this.localstream); } /** Process the SSL attributes */ public Object getAttribute(String name) { /* Use cached values */ Object object = super.getAttribute(name); if (object != null) return object; /* Fill the cache and return value if possible */ if (!localstream.request.isSecure()) return null; /* Client Certificate */ if (name.equals("javax.servlet.request.X509Certificate")) { WarpCertificates cert = null; try { cert = new WarpCertificates(localstream.getX509Certificates()); } catch (IOException e) { return null; } super.setAttribute("javax.servlet.request.X509Certificate", cert.getCertificates()); } /* other ssl parameters */ if (name.equals("javax.servlet.request.cipher_suite") || name.equals("javax.servlet.request.key_size") || name.equals("javax.servlet.request.ssl_session")) { WarpSSLData ssldata = null; try { ssldata = localstream.getSSL(); } catch (IOException e) { return null; } if (ssldata == null) return null; super.setAttribute("javax.servlet.request.cipher_suite", ssldata.ciph); if (ssldata.size!=0) super.setAttribute("javax.servlet.request.key_size", new Integer (ssldata.size)); super.setAttribute("javax.servlet.request.ssl_session", ssldata.sess); } return(super.getAttribute(name)); } public void setHost(Host host) { this.host=host; } public Host getHost() { return(this.host); } /** * Recycle this WarpResponse instance. */ public void recycle() { // Recycle our parent super.recycle(); // Recycle the stream this.localstream.recycle(); // Tell the parent that a stream is already in use. this.setStream(localstream); } /** * Associate this WarpResponse instance with a specific * WarpConnection instance. */ public void setConnection(WarpConnection connection) { this.connection=connection; } /** * Return the WarpConnection associated this instance of * WarpResponse. */ public WarpConnection getConnection() { return(this.connection); } protected class Stream extends InputStream { /** The response associated with this stream instance. */ private WarpRequest request=null; /** The packet used by this stream instance. */ private WarpPacket packet=null; /** Wether close() was called or not. */ private boolean closed=false; protected Stream(WarpRequest request) { super(); this.request=request; this.packet=new WarpPacket(); this.packet.setType(Constants.TYPE_CBK_DATA); } public int read() throws IOException { if (closed) throw new IOException("Stream closed"); if (this.packet.pointer." * * * * Alternately, this acknowlegement may appear in the software itself, if * * and wherever such third-party acknowlegements normally appear. * * * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * * Foundation" must not be used to endorse or promote products derived * * from this software without prior written permission. For written * * permission, please contact . * * * * 5. Products derived from this software may not be called "Apache" nor may * * "Apache" appear in their names without prior written permission of the * * Apache Software Foundation. * * * * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES * * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY * * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * * POSSIBILITY OF SUCH DAMAGE. * * * * ========================================================================= * * * * This software consists of voluntary contributions made by many indivi- * * duals on behalf of the Apache Software Foundation. For more information * * on the Apache Software Foundation, please see . * * * * ========================================================================= */ package org.apache.catalina.connector.warp; import java.io.File; import java.io.IOException; import java.net.URL; import java.util.*; import java.util.Locale; import java.util.TreeMap; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import org.apache.catalina.Container; import org.apache.catalina.Context; import org.apache.catalina.Deployer; import org.apache.catalina.Globals; import org.apache.catalina.Host; import org.apache.catalina.core.StandardHost; import org.apache.catalina.util.RequestUtil; import org.apache.catalina.util.StringParser; import java.security.Principal; public class WarpRequestHandler { private StringParser parser = new StringParser(); private static final String match=";"+Globals.SESSION_PARAMETER_NAME+"="; /* ==================================================================== */ /* Constructor */ /* ==================================================================== */ public WarpRequestHandler() { super(); } public boolean handle(WarpConnection connection, WarpPacket packet) throws IOException { WarpLogger logger=new WarpLogger(this); WarpConnector connector=connection.getConnector(); logger.setContainer(connector.getContainer()); WarpRequest request=new WarpRequest(); WarpResponse response=new WarpResponse(); response.setRequest(request); response.setConnection(connection); response.setPacket(packet); request.setConnection(connection); request.setConnector(connector); // Prepare the Proceed packet packet.reset(); packet.setType(Constants.TYPE_CONF_PROCEED); connection.send(packet); // Loop for configuration packets while (true) { connection.recv(packet); switch (packet.getType()) { case Constants.TYPE_REQ_INIT: { int id=packet.readInteger(); String meth=packet.readString(); String ruri=packet.readString(); String args=packet.readString(); String prot=packet.readString(); if (Constants.DEBUG) logger.debug("Request ID="+id+" \""+meth+" "+ruri+ "?"+args+" "+prot+"\""); request.recycle(); response.recycle(); response.setRequest(request); response.setConnection(connection); response.setPacket(packet); request.setMethod(meth); this.processUri(logger,request,ruri); if (args.length()>0) request.setQueryString(args); else request.setQueryString(null); request.setProtocol(prot); request.setConnection(connection); Context ctx=connector.applicationContext(id); if (ctx!=null) { request.setContext(ctx); request.setContextPath(ctx.getPath()); request.setHost((Host)ctx.getParent()); } break; } case Constants.TYPE_REQ_CONTENT: { String ctyp=packet.readString(); int clen=packet.readInteger(); if (Constants.DEBUG) logger.debug("Request content type="+ctyp+" length="+ clen); if (ctyp.length()>0) request.setContentType(ctyp); if (clen>0) request.setContentLength(clen); break; } case Constants.TYPE_REQ_SCHEME: { String schm=packet.readString(); if (Constants.DEBUG) logger.debug("Request scheme="+schm); request.setScheme(schm); if (schm.equals("https")) request.setSecure(true); break; } case Constants.TYPE_REQ_AUTH: { String user=packet.readString(); String auth=packet.readString(); if (Constants.DEBUG) logger.debug("Request user="+user+" auth="+auth); request.setAuthType(auth); // What to do for user name? if(user != null && auth != null && auth.equals("Basic")) { Principal prin = new BasicPrincipal(user); request.setUserPrincipal(prin); } break; } case Constants.TYPE_REQ_HEADER: { String hnam=packet.readString(); String hval=packet.readString(); this.processHeader(logger,request,hnam,hval); break; } case Constants.TYPE_REQ_SERVER: { String host=packet.readString(); String addr=packet.readString(); int port=packet.readUnsignedShort(); if (Constants.DEBUG) logger.debug("Server detail "+host+":"+port+ " ("+addr+")"); request.setServerName(host); request.setServerPort(port); break; } case Constants.TYPE_REQ_CLIENT: { String host=packet.readString(); String addr=packet.readString(); int port=packet.readUnsignedShort(); if (Constants.DEBUG) logger.debug("Client detail "+host+":"+port+ " ("+addr+")"); request.setRemoteHost(host); request.setRemoteAddr(addr); break; } case Constants.TYPE_REQ_PROCEED: { if (Constants.DEBUG) logger.debug("Request is about to be processed"); try { connector.getContainer().invoke(request,response); } catch (Exception e) { logger.log(e); } request.finishRequest(); response.finishResponse(); if (Constants.DEBUG) logger.debug("Request has been processed"); break; } default: { String msg="Invalid packet "+packet.getType(); logger.log(msg); packet.reset(); packet.setType(Constants.TYPE_FATAL); packet.writeString(msg); connection.send(packet); return(false); } } } } private void processUri(WarpLogger logger, WarpRequest req, String uri) { // Parse any requested session ID out of the request URI int semicolon = uri.indexOf(match); if (semicolon >= 0) { String rest = uri.substring(semicolon + match.length()); int semicolon2 = rest.indexOf(';'); if (semicolon2 >= 0) { req.setRequestedSessionId(rest.substring(0, semicolon2)); rest = rest.substring(semicolon2); } else { req.setRequestedSessionId(rest); rest = ""; } req.setRequestedSessionURL(true); uri = uri.substring(0, semicolon) + rest; if (Constants.DEBUG) { logger.log("Requested URL session id is " + ((HttpServletRequest) req.getRequest()) .getRequestedSessionId()); } } else { req.setRequestedSessionId(null); req.setRequestedSessionURL(false); } req.setRequestURI(uri); } private void processHeader(WarpLogger logger, WarpRequest req, String name, String value) { if (Constants.DEBUG) logger.debug("Request header "+name+": "+value); if ("cookie".equalsIgnoreCase(name)) { Cookie cookies[] = RequestUtil.parseCookieHeader(value); for (int i = 0; i < cookies.length; i++) { if (cookies[i].getName().equals (Globals.SESSION_COOKIE_NAME)) { // Override anything requested in the URL if (!req.isRequestedSessionIdFromCookie()) { // Accept only the first session id cookie req.setRequestedSessionId (cookies[i].getValue()); req.setRequestedSessionCookie(true); req.setRequestedSessionURL(false); if (Constants.DEBUG) { logger.debug("Requested cookie session id is " + ((HttpServletRequest) req.getRequest()) .getRequestedSessionId()); } } } if (Constants.DEBUG) { logger.debug("Adding cookie "+cookies[i].getName()+"="+ cookies[i].getValue()); } req.addCookie(cookies[i]); } } if (name.equalsIgnoreCase("Accept-Language")) parseAcceptLanguage(logger,req,value); if (name.equalsIgnoreCase("Authorization")) req.setAuthorization(value); req.addHeader(name,value); } /** * Parse the value of an Accept-Language header, and add * the corresponding Locales to the current request. * * @param value The value of the Accept-Language header. */ private void parseAcceptLanguage(WarpLogger logger, WarpRequest request, String value) { // Store the accumulated languages that have been requested in // a local collection, sorted by the quality value (so we can // add Locales in descending order). The values will be ArrayLists // containing the corresponding Locales to be added TreeMap locales = new TreeMap(); // Preprocess the value to remove all whitespace int white = value.indexOf(' '); if (white < 0) white = value.indexOf('\t'); if (white >= 0) { StringBuffer sb = new StringBuffer(); int len = value.length(); for (int i = 0; i < len; i++) { char ch = value.charAt(i); if ((ch != ' ') && (ch != '\t')) sb.append(ch); } value = sb.toString(); } // Process each comma-delimited language specification parser.setString(value); // ASSERT: parser is available to us int length = parser.getLength(); while (true) { // Extract the next comma-delimited entry int start = parser.getIndex(); if (start >= length) break; int end = parser.findChar(','); String entry = parser.extract(start, end).trim(); parser.advance(); // For the following entry // Extract the quality factor for this entry double quality = 1.0; int semi = entry.indexOf(";q="); if (semi >= 0) { try { quality = Double.parseDouble(entry.substring(semi + 3)); } catch (NumberFormatException e) { quality = 0.0; } entry = entry.substring(0, semi); } // Skip entries we are not going to keep track of if (quality < 0.00005) continue; // Zero (or effectively zero) quality factors if ("*".equals(entry)) continue; // FIXME - "*" entries are not handled // Extract the language and country for this entry String language = null; String country = null; int dash = entry.indexOf('-'); if (dash < 0) { language = entry; country = ""; } else { language = entry.substring(0, dash); country = entry.substring(dash + 1); } // Add a new Locale to the list of Locales for this quality level Locale locale = new Locale(language, country); Double key = new Double(-quality); // Reverse the order ArrayList values = (ArrayList) locales.get(key); if (values == null) { values = new ArrayList(); locales.put(key, values); } values.add(locale); } // Process the quality values in highest->lowest order (due to // negating the Double value when creating the key) Iterator keys = locales.keySet().iterator(); while (keys.hasNext()) { Double key = (Double) keys.next(); ArrayList list = (ArrayList) locales.get(key); Iterator values = list.iterator(); while (values.hasNext()) { Locale locale = (Locale) values.next(); if (Constants.DEBUG) { logger.debug("Adding locale '" + locale + "'"); } request.addLocale(locale); } } } class BasicPrincipal implements Principal { private String user; BasicPrincipal(String user) { this.user = user; } public boolean equals(Object another) { return (another instanceof Principal && ((Principal)another).getName().equals(user)); } public String getName() { return user; } public String toString() { return getName(); } } } +/* ========================================================================= * * * * The Apache Software License, Version 1.1 * * * * Copyright (c) 1999-2001 The Apache Software Foundation. * * All rights reserved. * * * * ========================================================================= * * * * Redistribution and use in source and binary forms, with or without modi- * * fication, are permitted provided that the following conditions are met: * * * * 1. Redistributions of source code must retain the above copyright notice * * notice, this list of conditions and the following disclaimer. * * * * 2. Redistributions in binary form must reproduce the above copyright * * notice, this list of conditions and the following disclaimer in the * * documentation and/or other materials provided with the distribution. * * * * 3. The end-user documentation included with the redistribution, if any, * * must include the following acknowlegement: * * * * "This product includes software developed by the Apache Software * * Foundation ." * * * * Alternately, this acknowlegement may appear in the software itself, if * * and wherever such third-party acknowlegements normally appear. * * * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * * Foundation" must not be used to endorse or promote products derived * * from this software without prior written permission. For written * * permission, please contact . * * * * 5. Products derived from this software may not be called "Apache" nor may * * "Apache" appear in their names without prior written permission of the * * Apache Software Foundation. * * * * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES * * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY * * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * * POSSIBILITY OF SUCH DAMAGE. * * * * ========================================================================= * * * * This software consists of voluntary contributions made by many indivi- * * duals on behalf of the Apache Software Foundation. For more information * * on the Apache Software Foundation, please see . * * * * ========================================================================= */ package org.apache.catalina.connector.warp; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.Socket; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.LifecycleListener; public class WarpConnection implements LifecycleListener, Runnable { /* ==================================================================== */ /* Instance variables */ /* ==================================================================== */ /* -------------------------------------------------------------------- */ /* Local variables */ /** Our socket input stream. */ private InputStream input=null; /** Our socket output stream. */ private OutputStream output=null; /** The started flag. */ private boolean started=false; /** The local thread. */ private Thread thread=null; /** Our logger. */ private WarpLogger logger=null; /* -------------------------------------------------------------------- */ /* Bean variables */ /** The socket this connection is working on. */ private Socket socket=null; /** The connector instance. */ private WarpConnector connector=null; /* ==================================================================== */ /* Constructor */ /* ==================================================================== */ /** * Construct a new instance of a WarpConnection. */ public WarpConnection() { super(); this.logger=new WarpLogger(this); } /* ==================================================================== */ /* Bean methods */ /* ==================================================================== */ /** * Set the socket this connection is working on. */ public void setSocket(Socket socket) { this.socket=socket; } /** * Return the socket this connection is working on. */ public Socket getSocket() { return(this.socket); } /** * Set the WarpConnector associated with this connection. */ public void setConnector(WarpConnector connector) { this.connector=connector; this.logger.setContainer(connector.getContainer()); } /** * Return the WarpConnector associated with this connection. */ public WarpConnector getConnector() { return(this.connector); } /* ==================================================================== */ /* Lifecycle methods */ /* ==================================================================== */ /** * Get notified of events in the connector. */ public void lifecycleEvent(LifecycleEvent event) { if (Lifecycle.STOP_EVENT.equals(event.getType())) this.stop(); } /** * Start working on this connection. */ public void start() { synchronized(this) { this.started=true; this.thread=new Thread(this); this.thread.start(); } } /** * Stop all we're doing on the connection. */ public void stop() { synchronized(this) { try { this.started=false; this.socket.close(); this.getConnector().removeLifecycleListener(this); } catch (IOException e) { logger.log("Cannot close socket",e); } } } /** * Process data from the socket. */ public void run() { WarpPacket packet=new WarpPacket(); if (Constants.DEBUG) logger.debug("Connection starting"); try { this.input=this.socket.getInputStream(); this.output=this.socket.getOutputStream(); if (!new WarpConfigurationHandler().handle(this,packet)) { logger.log("Configuration handler returned false"); this.stop(); } WarpRequestHandler requestHandler=new WarpRequestHandler(); while (requestHandler.handle(this,packet)); } catch (IOException e) { logger.log("Exception on socket",e); } finally { this.stop(); } if (Constants.DEBUG) logger.debug("Connection terminated"); } /* ==================================================================== */ /* Public methods */ /* ==================================================================== */ /** * Send a WARP packet over this connection. */ public void send(WarpPacket packet) throws IOException { if (Constants.DEBUG) { String typ=Integer.toHexString(packet.getType()); logger.debug(">> TYPE="+typ+" LENGTH="+packet.size); //logger.debug(">> "+packet.dump()); } this.output.write(packet.getType()&0x0ff); this.output.write((packet.size>>8)&0x0ff); this.output.write((packet.size>>0)&0x0ff); this.output.write(packet.buffer,0,packet.size); this.output.flush(); packet.reset(); } /** * Receive a WARP packet over this connection. */ public void recv(WarpPacket packet) throws IOException { int t=this.input.read(); int l1=this.input.read(); int l2=this.input.read(); if ((t|l1|l2)==-1) throw new IOException("Premature packet header end"); packet.reset(); packet.setType(t&0x0ff); packet.size=(( l1 & 0x0ff ) << 8) | ( l2 & 0x0ff ); if (packet.size>0) { int off=0; int ret=0; while (true) { ret=this.input.read(packet.buffer,off,packet.size-off); if (ret==-1) throw new IOException("Premature packet payload end"); off+=ret; if(off==packet.size) break; } } if (Constants.DEBUG) { String typ=Integer.toHexString(packet.getType()); logger.debug("<< TYPE="+typ+" LENGTH="+packet.size); // logger.debug("<< "+packet.dump()); } } } =/* ========================================================================= * * * * The Apache Software License, Version 1.1 * * * * Copyright (c) 1999-2001 The Apache Software Foundation. * * All rights reserved. * * * * ========================================================================= * * * * Redistribution and use in source and binary forms, with or without modi- * * fication, are permitted provided that the following conditions are met: * * * * 1. Redistributions of source code must retain the above copyright notice * * notice, this list of conditions and the following disclaimer. * * * * 2. Redistributions in binary form must reproduce the above copyright * * notice, this list of conditions and the following disclaimer in the * * documentation and/or other materials provided with the distribution. * * * * 3. The end-user documentation included with the redistribution, if any, * * must include the following acknowlegement: * * * * "This product includes software developed by the Apache Software * * Foundation ." * * * * Alternately, this acknowlegement may appear in the software itself, if * * and wherever such third-party acknowlegements normally appear. * * * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * * Foundation" must not be used to endorse or promote products derived * * from this software without prior written permission. For written * * permission, please contact . * * * * 5. Products derived from this software may not be called "Apache" nor may * * "Apache" appear in their names without prior written permission of the * * Apache Software Foundation. * * * * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES * * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY * * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * * POSSIBILITY OF SUCH DAMAGE. * * * * ========================================================================= * * * * This software consists of voluntary contributions made by many indivi- * * duals on behalf of the Apache Software Foundation. For more information * * on the Apache Software Foundation, please see . * * * * ========================================================================= */ package org.apache.catalina.connector.warp; public class Constants { /** Our package name. */ public static final String PACKAGE="org.apache.catalina.connector.warp"; /** Compile-in debug flag. */ public static final boolean DEBUG=false; /** * The WARP protocol major version. */ public static final int VERS_MAJOR=0; /** * The WARP protocol minor version. */ public static final int VERS_MINOR=10; /** * INVALID: The packet type hasn't been set yet. */ public static final int TYPE_INVALID=-1; /** * ERROR: The last operation didn't completed correctly. *
* Payload description:
* [string] An error message.
*/ public static final int TYPE_ERROR=0x00; /** * DISCONNECT: The connection is being closed. *
* No payload:
*/ public static final int TYPE_DISCONNECT=0xfe; /** * FATAL: A protocol error occourred, the connection must be closed. *
* Payload description:
* [string] An error message.
*/ public static final int TYPE_FATAL=0xff; /** * CONF_WELCOME: The server issues this packet when a connection is * opened. The server awaits for configuration information. *
* Payload description:
* [ushort] Major protocol version.
* [ushort] Minor protocol version.
* [integer] The server unique-id.
*/ public static final int TYPE_CONF_WELCOME=0x01; /** * CONF_ENUM: The client requests to the server to enumerate all * web-applications available for a specified virtual host. In response * to this request, the server replies with a set of CONF_ENUM messages * terminated by a CONF_ENUM_DONE message. *
* Payload description:
* [string] The virtual host name.
* [ushort] The virtual host port.
*/ public static final int TYPE_CONF_ENUM=0x02; /** * CONF_ENUM_APPL: The server specifies the name of a web-application * available for deployment in response to a CONF_ENUMERATE message. *
* Payload description:
* [string] The web-application name.
*/ public static final int TYPE_CONF_ENUM_APPL=0x03; /** * CONF_ENUM_DONE: The server specifies all web-application names * available for deployment for the host specified in the CONF_ENUM * message have been transfered. *
* No payload:
*/ public static final int TYPE_CONF_ENUM_DONE=0x04; /** * CONF_DEPLOY: The client attempts deploy a web application. *
* Payload description:
* [string] The application name.
* [string] The virtual host name.
* [ushort] The virtual host port.
* [string] The web-application URL path.
*/ public static final int TYPE_CONF_DEPLOY=0x05; /** * CONF_APPLIC: The server replies to a CONF_DEPLOY message with the web * application identifier of the configured application. *
* Payload description:
* [integer] The web application unique id for this server.
* [string] The web application real path (where it's expanded).
*/ public static final int TYPE_CONF_APPLIC=0x06; /** * CONF_MAP: The client requests to the server to enumerate all mappings * for a specified web-application. The server replies to this message * with a serie of MAP_ALLOW and MAP_DENY packets, terminated by a * MAP_DONE packet. *
* Payload description:
* [integer] The web application unique id for this server.
*/ public static final int TYPE_CONF_MAP=0x07; /** * CONF_MAP_ALLOW: The server replies to a CONF_MAP message with this * packet to indicate a mapping to a static page, or a resource that * can be served autonomously by the remote end (the web server). *
* Payload description:
* [string] An url-pattern as defined by the Servlet specification. */ public static final int TYPE_CONF_MAP_ALLOW=0x08; /** * CONF_MAP_DENY: The server replies to a CONF_MAP message with this * packet to indicate a mapping to a resource that must be served by * the server (servlet container). *
* Payload description:
* [string] An url-pattern as defined by the Servlet specification. */ public static final int TYPE_CONF_MAP_DENY=0x09; /** * CONF_MAP_DONE: The server replies to a CONF_MAP message with this * packet to indicate that all servlet mappings have been successfully * transfered to the other end *
* No payload:
*/ public static final int TYPE_CONF_MAP_DONE=0x0a; /** * CONF_DONE: Client issues this message when all configurations have been * processed. *
* No payload:
*/ public static final int TYPE_CONF_DONE=0x0e; /** * CONF_PROCEED: Server issues this message in response to a CONF_DONE * message, to acknowledge its readiness to accept requests. *
* No payload:
*/ public static final int TYPE_CONF_PROCEED=0x0f; /** * REQ_INIT: The client requests to the WARP server that a request is * about to be processed. *
* Payload description:
* [integer] The web-application unique ID for this server.
* [string] The HTTP method used for this request.
* [string] The request URI.
* [string] The request query arguments.
* [string] The request protocol (HTTP/1.0, HTTP/1.1...).
*/ public static final int TYPE_REQ_INIT=0x10; /** * REQ_CONTENT: The mime content type and length of this request. *
* Payload description:
* [string] The MIME content type of this reques.
* [integer] The content length of this request.
*/ public static final int TYPE_REQ_CONTENT=0x11; /** * REQ_SCHEME: The scheme description of this request. *
* Payload description:
* [string] The scheme (part before :// in the URL) of this request.
*/ public static final int TYPE_REQ_SCHEME=0x12; /** * REQ_AUTH: Authentication information of the HTTP remote peer. *
* Payload description:
* [string] The remote-user name.
* [string] The authentication information.
*/ public static final int TYPE_REQ_AUTH=0x13; /** * REQ_HEADER: An HTTP request header. *
* Payload description:
* [string] The header name.
* [string] The header value.
*/ public static final int TYPE_REQ_HEADER=0x14; /** * REQ_SERVER: The HTTP server information. *
* Payload description:
* [string] The HTTP server host name. * [string] The HTTP server IP address. * [ushort] The port receiving the HTTP request. */ public static final int TYPE_REQ_SERVER=0x15; /** * REQ_CLIENT: The HTTP client (remote peer) information. *
* Payload description:
* [string] The HTTP client host name. * [string] The HTTP client IP address. * [ushort] The remote port originating the HTTP request. */ public static final int TYPE_REQ_CLIENT=0x16; /** * REQ_PROCEED: The client finished transmitting the request. The server * can now proceed and process the request. *
* No payload.
*/ public static final int TYPE_REQ_PROCEED=0x1f; /** * RES_STATUS: The server replies with the HTTP response status for the * request. *
* Payload description:
* [ushort] The HTTP status of the response.
* [string] The HTTP response message.
*/ public static final int TYPE_RES_STATUS=0x20; /** * RES_HEADER: An HTTP MIME response header to send to the client. *
* Payload description:
* [string] The MIME header name.
* [string] The MIME header value.
*/ public static final int TYPE_RES_HEADER=0x21; /** * RES_COMMIT: The server indicates that the first part of the response * (HTTP status line and MIME headers) are to be committed to the client * (remote peer). *
* No payload.
*/ public static final int TYPE_RES_COMMIT=0x2f; /** * RES_BODY: The HTTP response body. *
* Payload description:
* [raw] A chunk of the response body.
*/ public static final int TYPE_RES_BODY=0x30; /** * RES_DONE: The server finished transmitting the response. *
* No payload.
*/ public static final int TYPE_RES_DONE=0x3f; /** * CBK_READ: A request callback. The WARP server queries the WARP client * (HTTP server) to transmit a chunk of the request body. *
* Payload description:
* [ushort] The number of bytes the server needs to transmit.
*/ public static final int TYPE_CBK_READ=0x40; /** * CBK_DATA: As requested by the WARP server, the WARP client (HTTP * server) transmits a chunk of the request body. *
* Payload description:
* [raw] A chunk of the request body.
*/ public static final int TYPE_CBK_DATA=0x41; /** * CBK_DATA: The WARP client (HTTP server) informs the WARP server that * the request body has been fully transmitted. *
* No payload.
*/ public static final int TYPE_CBK_DONE=0x42; /** * ASK_SSL: The WARP server (Tomcat) asks the WARP client to * transfer the basic SSL information (cypher, keysize and session). *
* No payload.
*/ public static final int TYPE_ASK_SSL=0x43; /** * ASK_SSL_CLIENT: The WARP server (Tomcat) asks the WARP server to * transfer the client certificate. * (just the first element of the chain and the webserver should request * for it to the browser if possible). *
* No payload.
*/ public static final int TYPE_ASK_SSL_CLIENT=0x44; /** * REP_SSL_CERT: The client certificate (remote peer). *
* Payload description:
* [string] The client certificate. (PEM format). */ public static final int TYPE_REP_SSL_CERT=0x52; /** * REP_SSL: SSL information between *
* Payload description:
* [string] The cipher_suite. * [string] The ssl session. (That is not in the spec's). * [ushort] size of the algorithm (56-128). */ public static final int TYPE_REP_SSL=0x53; /** * REP_SSL_NO: Request SSL information is not available. *
* No payload.
*/ public static final int TYPE_REP_SSL_NO=0x5F; } bU/* ========================================================================= * * * * The Apache Software License, Version 1.1 * * * * Copyright (c) 1999-2001 The Apache Software Foundation. * * All rights reserved. * * * * ========================================================================= * * * * Redistribution and use in source and binary forms, with or without modi- * * fication, are permitted provided that the following conditions are met: * * * * 1. Redistributions of source code must retain the above copyright notice * * notice, this list of conditions and the following disclaimer. * * * * 2. Redistributions in binary form must reproduce the above copyright * * notice, this list of conditions and the following disclaimer in the * * documentation and/or other materials provided with the distribution. * * * * 3. The end-user documentation included with the redistribution, if any, * * must include the following acknowlegement: * * * * "This product includes software developed by the Apache Software * * Foundation ." * * * * Alternately, this acknowlegement may appear in the software itself, if * * and wherever such third-party acknowlegements normally appear. * * * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * * Foundation" must not be used to endorse or promote products derived * * from this software without prior written permission. For written * * permission, please contact . * * * * 5. Products derived from this software may not be called "Apache" nor may * * "Apache" appear in their names without prior written permission of the * * Apache Software Foundation. * * * * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES * * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY * * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * * POSSIBILITY OF SUCH DAMAGE. * * * * ========================================================================= * * * * This software consists of voluntary contributions made by many indivi- * * duals on behalf of the Apache Software Foundation. For more information * * on the Apache Software Foundation, please see . * * * * ========================================================================= */ package org.apache.catalina.connector.warp; import java.io.IOException; import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; import java.util.Random; import java.util.Vector; import org.apache.catalina.Connector; import org.apache.catalina.Container; import org.apache.catalina.Context; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleListener; import org.apache.catalina.Logger; import org.apache.catalina.Request; import org.apache.catalina.Response; import org.apache.catalina.Service; import org.apache.catalina.net.DefaultServerSocketFactory; import org.apache.catalina.net.ServerSocketFactory; import org.apache.catalina.util.LifecycleSupport; public class WarpConnector implements Connector, Lifecycle, Runnable { /* ==================================================================== */ /* Instance variables */ /* ==================================================================== */ /* -------------------------------------------------------------------- */ /* Local variables */ /** The running thread accepting connections */ private Thread thread=null; /** The server socket. */ private ServerSocket server=null; /** Our WarpLogger. */ private WarpLogger logger=null; /** Our list of deployed web applications. */ private Vector applications=new Vector(); /** The unique ID of this connector instance. */ protected int uniqueId=-1; /* -------------------------------------------------------------------- */ /* Bean variables */ /** The Container instance processing requests. */ private Container container=null; /** The "enable DNS lookups" flag. */ private boolean enableLookups=false; /** The ServerSocketFactory used by this connector. */ private ServerSocketFactory factory=null; /** The redirect port value for SSL requests. */ private int redirectPort=443; /** The request scheme value. */ private String scheme="warp"; /** The secure flag of this Connector. */ private boolean secure=false; /** The Service we are associated with (if any). */ private Service service=null; /** Descriptive information of this Connector. */ private String info=null; /** The address we need to bind to. */ private String address=null; /** The port we need to bind to. */ private int port=8008; /** The server socket backlog length. */ private int acceptCount=10; /** The server appBase for hosts created via WARP. */ private String appBase="webapps"; /** The debug level. */ private int debug=0; /* -------------------------------------------------------------------- */ /* Lifecycle variables */ /** The lifecycle event support for this component. */ private LifecycleSupport lifecycle=new LifecycleSupport(this); /** The "initialized" flag. */ private boolean initialized=false; /** The "started" flag. */ private boolean started=false; /* ==================================================================== */ /* Constructor */ /* ==================================================================== */ /** * Construct a new instance of a WarpConnector. */ public WarpConnector() { super(); this.logger=new WarpLogger(this); this.uniqueId=new Random().nextInt(); if (Constants.DEBUG) logger.debug("Instance created (ID="+this.uniqueId+")"); } /* ==================================================================== */ /* Bean methods */ /* ==================================================================== */ /** * Return the Container instance which will process all * requests received by this Connector. */ public Container getContainer() { return(this.container); } /** * Set the Container instance which will process all requests * received by this Connector. * * @param container The new Container to use */ public void setContainer(Container container) { this.container=container; this.logger.setContainer(container); if (Constants.DEBUG) { if (container==null) logger.debug("Setting null container"); else logger.debug("Setting container "+container.getClass()); } } /** * Return the "enable DNS lookups" flag. */ public boolean getEnableLookups() { return(this.enableLookups); } /** * Set the "enable DNS lookups" flag. * * @param enableLookups The new "enable DNS lookups" flag value */ public void setEnableLookups(boolean enableLookups) { this.enableLookups=enableLookups; if (Constants.DEBUG) logger.debug("Setting lookup to "+enableLookups); } /** * Return the ServerSocketFactory used by this * Connector to generate ServerSocket instances. */ public ServerSocketFactory getFactory() { if (this.factory==null) { synchronized(this) { if (Constants.DEBUG) logger.debug("Creating factory"); this.factory=new DefaultServerSocketFactory(); } } return(this.factory); } /** * Set the ServerSocketFactory used by this * Connector to generate ServerSocket instances. * * @param factory The new server socket factory */ public void setFactory(ServerSocketFactory factory) { if (factory==null) throw new NullPointerException(); this.factory=factory; if (Constants.DEBUG) logger.debug("Setting factory "+factory.getClass().getName()); } /** * Return the port number to which a request should be redirected if * it comes in on a non-SSL port and is subject to a security constraint * with a transport guarantee that requires SSL. */ public int getRedirectPort() { return(this.redirectPort); } /** * Set the redirect port number. * * @param redirectPort The redirect port number (non-SSL to SSL) */ public void setRedirectPort(int redirectPort) { if ((redirectPort<1) || (redirectPort>65535)) throw new IllegalArgumentException("Invalid port "+redirectPort); this.redirectPort=redirectPort; if (Constants.DEBUG) logger.debug("Setting redirection port to "+redirectPort); } /** * Return the scheme that will be assigned to requests received * through this connector. Default value is "warp". */ public String getScheme() { return(this.scheme); } /** * Set the scheme that will be assigned to requests received through * this connector. * * @param scheme The new scheme */ public void setScheme(String scheme) { if (scheme==null) throw new NullPointerException(); this.scheme=scheme; if (Constants.DEBUG) logger.debug("Setting scheme to "+scheme); } /** * Return the secure connection flag that will be assigned to requests * received through this connector. Default value is "false". */ public boolean getSecure() { return(this.secure); } /** * Set the secure connection flag that will be assigned to requests * received through this connector. * * @param secure The new secure connection flag */ public void setSecure(boolean secure) { this.secure=secure; if (Constants.DEBUG) logger.debug("Setting secure to "+secure); } /** * Return the Service with which we are associated (if any). */ public Service getService() { return (this.service); } /** * Set the Service with which we are associated (if any). * * @param service The service that owns this Engine */ public void setService(Service service) { this.service = service; } /** * Return descriptive information about this Connector. */ public String getInfo() { if (this.info==null) { synchronized(this) { this.info=this.getClass().getName()+"/"+ Constants.VERS_MINOR+Constants.VERS_MAJOR; } } return(this.info); } /** * Set descriptive information about this Connector. */ public void setInfo(String info) { if (info==null) throw new NullPointerException(); this.info=info; if (Constants.DEBUG) logger.debug("Setting info to "+info); } /** * Return the IP address to which this Connector will bind to. */ public String getAddress() { return(this.address); } /** * Set the IP address to which this Connector will bind to. * * @param address The bind IP address */ public void setAddress(String address) { this.address=address; if (Constants.DEBUG) logger.debug("Setting address to "+address); } /** * Return the port to which this Connector will bind to. */ public int getPort() { return(this.port); } /** * Set the port to which this Connector will bind to. * * @param port The bind port */ public void setPort(int port) { this.port=port; } /** * Set the IP address to which this Connector will bind to. * * @param address The bind IP address */ public void setAddress(int port) { if ((port<1) || (port>65535)) throw new IllegalArgumentException("Invalid port "+port); this.port=port; if (Constants.DEBUG) logger.debug("Setting port to "+port); } /** * Return the accept count for this Connector. */ public int getAcceptCount() { return (this.acceptCount); } /** * Set the accept count for this Connector. * * @param count The new accept count */ public void setAcceptCount(int count) { this.acceptCount = count; if (Constants.DEBUG) logger.debug("Setting acceptCount to "+count); } /** * Get the applications base directory for hosts created via WARP. */ public String getAppBase() { return (this.appBase); } /** * Set the applications base directory for hosts created via WARP. * * @param appBase The appbase property. */ public void setAppBase(String appBase) { this.appBase = appBase; if (Constants.DEBUG) logger.debug("Setting appBase to "+appBase); } /** * Return the debug level. */ public int getDebug() { return(this.debug); } /** * Set the debug level. */ public void setDebug(int debug) { this.debug=debug; } /* ==================================================================== */ /* Lifecycle methods */ /* ==================================================================== */ /** * Add a LifecycleEvent listener to this * Connector. * * @param listener The listener to add */ public void addLifecycleListener(LifecycleListener listener) { lifecycle.addLifecycleListener(listener); } /** * Get the lifecycle listeners associated with this lifecycle. If this * Lifecycle has no listeners registered, a zero-length array is returned. */ public LifecycleListener[] findLifecycleListeners() { return null; // FIXME: lifecycle.findLifecycleListeners(); } /** * Remove a LifecycleEvent listener from this * Connector. * * @param listener The listener to remove */ public void removeLifecycleListener(LifecycleListener listener) { lifecycle.removeLifecycleListener(listener); } /** * Initialize this connector (create ServerSocket here!) */ public void initialize() throws LifecycleException { if (initialized) throw new LifecycleException("Already initialized"); this.initialized=true; // Get a hold on a server socket try { ServerSocketFactory fact=this.getFactory(); int port=this.getPort(); int accc=this.getAcceptCount(); if (this.getAddress()==null) { this.server=fact.createSocket(port,accc); } else { InetAddress addr=InetAddress.getByName(this.getAddress()); this.server=fact.createSocket(port,accc,addr); } } catch (Exception e) { throw new LifecycleException("Error creating server socket ("+ e.getClass().getName()+")",e); } } /** * Start accepting connections by this Connector. */ public void start() throws LifecycleException { if (!initialized) this.initialize(); if (started) throw new LifecycleException("Already started"); // Can't get a hold of a server socket if (this.server==null) throw new LifecycleException("Server socket not created"); lifecycle.fireLifecycleEvent(START_EVENT, null); this.started = true; this.thread=new Thread(this); this.thread.setDaemon(true); this.thread.start(); } /** * Stop accepting connections by this Connector. */ public void stop() throws LifecycleException { if (!started) throw new LifecycleException("Not started"); lifecycle.fireLifecycleEvent(STOP_EVENT, null); this.started = false; if (this.server!=null) try { this.server.close(); } catch (IOException e) { logger.log("Cannot close ServerSocket",e); } } /** * Check whether this service was started or not. */ public boolean isStarted() { return(this.started); } /* ==================================================================== */ /* Public methods */ /* ==================================================================== */ /** * Return the application ID for a given Context. */ protected int applicationId(Context context) { int id=this.applications.indexOf(context); if (id==-1) { this.applications.add(context); id=this.applications.indexOf(context); } return(id); } /** * Return the application for a given ID. */ protected Context applicationContext(int id) { try { return((Context)this.applications.elementAt(id)); } catch (ArrayIndexOutOfBoundsException e) { return(null); } } /** * Create (or allocate) and return a Request object suitable for * specifying the contents of a Request to the responsible Container. */ public Request createRequest() { return(null); } /** * Create (or allocate) and return a Response object suitable for * receiving the contents of a Response from the responsible Container. */ public Response createResponse() { return(null); } /** * Start accepting WARP requests from the network. */ public void run() { // Start accepting connections try { while (this.isStarted()) { Socket sock=this.server.accept(); InetAddress raddr=sock.getInetAddress(); InetAddress laddr=sock.getLocalAddress(); int rport=sock.getPort(); int lport=sock.getLocalPort(); logger.log("Connection from "+raddr+":"+rport+" to "+laddr+ ":"+lport); WarpConnection conn=new WarpConnection(); conn.setConnector(this); conn.setSocket(sock); this.addLifecycleListener(conn); conn.start(); } } catch (IOException e) { logger.log("Error accepting requests",e); } } } /* ========================================================================= * * * * The Apache Software License, Version 1.1 * * * * Copyright (c) 1999-2001 The Apache Software Foundation. * * All rights reserved. * * * * ========================================================================= * * * * Redistribution and use in source and binary forms, with or without modi- * * fication, are permitted provided that the following conditions are met: * * * * 1. Redistributions of source code must retain the above copyright notice * * notice, this list of conditions and the following disclaimer. * * * * 2. Redistributions in binary form must reproduce the above copyright * * notice, this list of conditions and the following disclaimer in the * * documentation and/or other materials provided with the distribution. * * * * 3. The end-user documentation included with the redistribution, if any, * * must include the following acknowlegement: * * * * "This product includes software developed by the Apache Software * * Foundation ." * * * * Alternately, this acknowlegement may appear in the software itself, if * * and wherever such third-party acknowlegements normally appear. * * * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * * Foundation" must not be used to endorse or promote products derived * * from this software without prior written permission. For written * * permission, please contact . * * * * 5. Products derived from this software may not be called "Apache" nor may * * "Apache" appear in their names without prior written permission of the * * Apache Software Foundation. * * * * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES * * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY * * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * * POSSIBILITY OF SUCH DAMAGE. * * * * ========================================================================= * * * * This software consists of voluntary contributions made by many indivi- * * duals on behalf of the Apache Software Foundation. For more information * * on the Apache Software Foundation, please see . * * * * ========================================================================= */ package org.apache.catalina.connector.warp; import java.io.IOException; import javax.servlet.ServletException; import org.apache.catalina.Container; import org.apache.catalina.Context; import org.apache.catalina.Request; import org.apache.catalina.Response; import org.apache.catalina.core.StandardContext; import org.apache.catalina.core.StandardHost; public class WarpHost extends StandardHost { public Container map(Request request, boolean update) { Context context=null; if (Constants.DEBUG) this.log("Mapping request for Host"); if (request instanceof WarpRequest) context=((WarpRequest)request).getContext(); else context=(Context)super.map(request,update); return(context); } } /* ========================================================================= * * * * The Apache Software License, Version 1.1 * * * * Copyright (c) 1999-2001 The Apache Software Foundation. * * All rights reserved. * * * * ========================================================================= * * * * Redistribution and use in source and binary forms, with or without modi- * * fication, are permitted provided that the following conditions are met: * * * * 1. Redistributions of source code must retain the above copyright notice * * notice, this list of conditions and the following disclaimer. * * * * 2. Redistributions in binary form must reproduce the above copyright * * notice, this list of conditions and the following disclaimer in the * * documentation and/or other materials provided with the distribution. * * * * 3. The end-user documentation included with the redistribution, if any, * * must include the following acknowlegement: * * * * "This product includes software developed by the Apache Software * * Foundation ." * * * * Alternately, this acknowlegement may appear in the software itself, if * * and wherever such third-party acknowlegements normally appear. * * * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * * Foundation" must not be used to endorse or promote products derived * * from this software without prior written permission. For written * * permission, please contact . * * * * 5. Products derived from this software may not be called "Apache" nor may * * "Apache" appear in their names without prior written permission of the * * Apache Software Foundation. * * * * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES * * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY * * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * * POSSIBILITY OF SUCH DAMAGE. * * * * ========================================================================= * * * * This software consists of voluntary contributions made by many indivi- * * duals on behalf of the Apache Software Foundation. For more information * * on the Apache Software Foundation, please see . * * * * ========================================================================= */ package org.apache.catalina.connector.warp; import java.io.IOException; import javax.servlet.ServletException; import org.apache.catalina.Container; import org.apache.catalina.Host; import org.apache.catalina.Request; import org.apache.catalina.Response; import org.apache.catalina.core.StandardEngine; public class WarpEngine extends StandardEngine { public Container map(Request request, boolean update) { if (Constants.DEBUG) this.log("Mapping request"); if (request instanceof WarpRequest) { WarpRequest wreq = (WarpRequest)request; Host host = wreq.getHost(); if (update) { if (request.getRequest().getServerName() == null) { request.setServerName(host.getName()); } else { request.setServerName (request.getRequest().getServerName()); } } return (host); } else { return (super.map(request,update)); } } } /%/* ========================================================================= * * * * The Apache Software License, Version 1.1 * * * * Copyright (c) 1999-2001 The Apache Software Foundation. * * All rights reserved. * * * * ========================================================================= * * * * Redistribution and use in source and binary forms, with or without modi- * * fication, are permitted provided that the following conditions are met: * * * * 1. Redistributions of source code must retain the above copyright notice * * notice, this list of conditions and the following disclaimer. * * * * 2. Redistributions in binary form must reproduce the above copyright * * notice, this list of conditions and the following disclaimer in the * * documentation and/or other materials provided with the distribution. * * * * 3. The end-user documentation included with the redistribution, if any, * * must include the following acknowlegement: * * * * "This product includes software developed by the Apache Software * * Foundation ." * * * * Alternately, this acknowlegement may appear in the software itself, if * * and wherever such third-party acknowlegements normally appear. * * * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * * Foundation" must not be used to endorse or promote products derived * * from this software without prior written permission. For written * * permission, please contact . * * * * 5. Products derived from this software may not be called "Apache" nor may * * "Apache" appear in their names without prior written permission of the * * Apache Software Foundation. * * * * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES * * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY * * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * * POSSIBILITY OF SUCH DAMAGE. * * * * ========================================================================= * * * * This software consists of voluntary contributions made by many indivi- * * duals on behalf of the Apache Software Foundation. For more information * * on the Apache Software Foundation, please see . * * * * ========================================================================= */ package org.apache.catalina.connector.warp; import org.apache.catalina.Container; import org.apache.catalina.Logger; public class WarpLogger { /* ==================================================================== */ /* Variables */ /* ==================================================================== */ /* -------------------------------------------------------------------- */ /* Bean variables */ /** The Container instance processing requests. */ private Container container=null; /** The source of log messages for this logger. */ private Object source=null; /* ==================================================================== */ /* Constructor */ /* ==================================================================== */ /** Deny empty construction. */ private WarpLogger() { super(); } /** * Construct a new instance of a WarpConnector. */ public WarpLogger(Object source) { super(); this.source=source; } /* ==================================================================== */ /* Bean methods */ /* ==================================================================== */ /** * Return the Container instance which will process all * requests received by this Connector. */ public Container getContainer() { return(this.container); } /** * Set the Container instance which will process all requests * received by this Connector. * * @param container The new Container to use */ public void setContainer(Container container) { this.container=container; } /* ==================================================================== */ /* Logging and debugging methods */ /* ==================================================================== */ /** Log to the container logger with the specified level or to stderr */ private void log(String msg, Exception exc, int lev) { if (this.container==null) { if (Constants.DEBUG) dump(msg,exc); return; } Logger logg=this.container.getLogger(); if (logg==null) { if (Constants.DEBUG) dump(msg,exc); return; } String cls="["+this.source.getClass().getName()+"] "; if (msg==null) msg=cls; else msg=cls.concat(msg); if (exc==null) logg.log(msg,lev); else logg.log(msg,exc,lev); } /** Invoked when we can't get a hold on the logger, dump to stderr */ private void dump(String message, Exception exception) { String cls="["+this.source.getClass().getName()+"] "; if (message!=null) { System.err.print(cls); System.err.println(message); } if (exception!=null) { System.err.print(cls); exception.printStackTrace(System.err); } } /** * If Constants.DEBUG was set true at compilation time, dump a debug * message to Standard Error. * * @param message The message to dump. */ protected void debug(String message) { if (Constants.DEBUG) this.log(message,null,Logger.DEBUG); } /** * If Constants.DEBUG was set true at compilation time, dump an exception * stack trace to Standard Error. * * @param exception The exception to dump. */ protected void debug(Exception exception) { if (Constants.DEBUG) this.log(null,exception,Logger.DEBUG); } /** * If Constants.DEBUG was set true at compilation time, dump a debug * message and a related exception stack trace to Standard Error. * * @param exception The exception to dump. * @param message The message to dump. */ protected void debug(String message, Exception exception) { if (Constants.DEBUG) this.log(message,exception,Logger.DEBUG); } /** * Log a message. * * @param message The message to log. */ protected void log(String message) { this.log(message,null,Logger.ERROR); } /** * Log an exception. * * @param exception The exception to log. */ protected void log(Exception exception) { this.log(null,exception,Logger.ERROR); } /** * Log an exception and related message. * * @param exception The exception to log. * @param message The message to log. */ protected void log(String message, Exception exception) { this.log(message,exception,Logger.ERROR); } } /* ========================================================================= * * * * The Apache Software License, Version 1.1 * * * * Copyright (c) 1999-2001 The Apache Software Foundation. * * All rights reserved. * * * * ========================================================================= * * * * Redistribution and use in source and binary forms, with or without modi- * * fication, are permitted provided that the following conditions are met: * * * * 1. Redistributions of source code must retain the above copyright notice * * notice, this list of conditions and the following disclaimer. * * * * 2. Redistributions in binary form must reproduce the above copyright * * notice, this list of conditions and the following disclaimer in the * * documentation and/or other materials provided with the distribution. * * * * 3. The end-user documentation included with the redistribution, if any, * * must include the following acknowlegement: * * * * "This product includes software developed by the Apache Software * * Foundation ." * * * * Alternately, this acknowlegement may appear in the software itself, if * * and wherever such third-party acknowlegements normally appear. * * * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * * Foundation" must not be used to endorse or promote products derived * * from this software without prior written permission. For written * * permission, please contact . * * * * 5. Products derived from this software may not be called "Apache" nor may * * "Apache" appear in their names without prior written permission of the * * Apache Software Foundation. * * * * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES * * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY * * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * * POSSIBILITY OF SUCH DAMAGE. * * * * ========================================================================= * * * * This software consists of voluntary contributions made by many indivi- * * duals on behalf of the Apache Software Foundation. For more information * * on the Apache Software Foundation, please see . * * * * ========================================================================= */ package org.apache.catalina.connector.warp; /* * SSL message handling. */ public class WarpSSLData { /** * Cipher use by the SSL. */ String ciph; /** * SSL session. */ String sess; /** * Size of the algorithm. (56-128) */ int size; }