You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by aj...@apache.org on 2005/04/19 14:16:35 UTC

svn commit: r161878 - in webservices/axis/trunk/java/modules/core/src/org/apache/axis: context/EngineContext.java engine/AxisEngine.java

Author: ajith
Date: Tue Apr 19 05:16:34 2005
New Revision: 161878

URL: http://svn.apache.org/viewcvs?view=rev&rev=161878
Log:
Added the storage methods to the context and the engine. However the deployment mechanism is still not changed to load the storage configuration so it these storages are not usable yet

Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContext.java?view=diff&r1=161877&r2=161878
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContext.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContext.java Tue Apr 19 05:16:34 2005
@@ -28,16 +28,26 @@
 import org.apache.axis.description.PhasesIncludeImpl;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.engine.EngineConfiguration;
+import org.apache.axis.storage.AxisStorage;
 
 public class EngineContext extends AbstractContext implements PhasesInclude{
 
     private EngineConfiguration engineConfig;
+    private AxisStorage storage;
+
     private Map serviceContextMap;
     private Map sessionContextMap;
     private Map moduleContextMap;
-    
-    
-    private PhasesInclude phaseInclude; 
+
+    public AxisStorage getStorage() {
+        return storage;
+    }
+
+    public void setStorage(AxisStorage storage) {
+        this.storage = storage;
+    }
+
+    private PhasesInclude phaseInclude;
     
     public EngineContext(EngineConfiguration registry){
         this.engineConfig = registry;

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java?view=diff&r1=161877&r2=161878
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java Tue Apr 19 05:16:34 2005
@@ -39,7 +39,7 @@
     /**
      * Constructor AxisEngine
      *
-     * @param registry
+     *
      */
     public AxisEngine() {
         log.info("Axis Engine Started");
@@ -218,5 +218,47 @@
             // TODO log and exit
             log.error("Error in fault flow", e);
         }
+    }
+
+    /* --------------------------------------------------------------------------------------------*/
+    /* -----------------   Methods related to storage ----------------------------------------------*/
+    /**
+     * Stores an object in the underlying storage
+     * @param context The relevant engine context
+     * @param obj the object to be stored
+     * @return the storage key
+     */
+    public Object store(EngineContext context,Object obj){
+        return context.getStorage().put(obj);
+    }
+
+    /**
+     * retrieves an object from the underlying storage
+     * @see #store(org.apache.axis.context.EngineContext, Object)
+     * @param context
+     * @param key
+     * @return
+     */
+    public Object retrieve(EngineContext context,Object key){
+        return context.getStorage().get(key);
+    }
+
+    /**
+     * removes an object from the underlying storage
+     * @param context
+     * @param key
+     * @return  the object removed
+     */
+    public Object remove(EngineContext context,Object key){
+        return context.getStorage().remove(key);
+    }
+
+    /**
+     * Clears the underlying storage
+     * @param context
+     * @return
+     */
+    public boolean clearStorage(EngineContext context){
+        return context.getStorage().clean();
     }
 }