[savara-commits] savara SVN: r592 - in branches/experimental/2.0.x/bundles: org.savara.activity/src/main/java/org/savara/activity/model and 7 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Jan 18 15:11:16 EST 2011


Author: objectiser
Date: 2011-01-18 15:11:14 -0500 (Tue, 18 Jan 2011)
New Revision: 592

Added:
   branches/experimental/2.0.x/bundles/org.savara.common/src/main/java/org/savara/common/config/
   branches/experimental/2.0.x/bundles/org.savara.common/src/main/java/org/savara/common/config/Configuration.java
   branches/experimental/2.0.x/bundles/org.savara.common/src/main/java/org/savara/common/config/DefaultConfiguration.java
Modified:
   branches/experimental/2.0.x/bundles/org.savara.activity/schema/Activity.xsd
   branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Activity.java
   branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Analysis.java
   branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/EndpointActivity.java
   branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Error.java
   branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InstanceFinished.java
   branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InstanceStarted.java
   branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/LifecycleActivity.java
   branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageActivity.java
   branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageReceived.java
   branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageSent.java
   branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ObjectFactory.java
   branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ProtocolAnalysis.java
   branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/package-info.java
   branches/experimental/2.0.x/bundles/org.savara.common/META-INF/MANIFEST.MF
   branches/experimental/2.0.x/bundles/org.savara.monitor/.classpath
   branches/experimental/2.0.x/bundles/org.savara.monitor/META-INF/MANIFEST.MF
   branches/experimental/2.0.x/bundles/org.savara.monitor/src/main/java/org/savara/monitor/SessionStore.java
   branches/experimental/2.0.x/bundles/org.savara.monitor/src/main/java/org/savara/monitor/impl/InMemorySessionStore.java
Log:
Update the activity schema to make the endpoint address explicit, and message activity include whether it represents a request, and also create a configuration interface and default impl.

Modified: branches/experimental/2.0.x/bundles/org.savara.activity/schema/Activity.xsd
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/schema/Activity.xsd	2011-01-18 14:58:04 UTC (rev 591)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/schema/Activity.xsd	2011-01-18 20:11:14 UTC (rev 592)
@@ -13,7 +13,7 @@
     <complexType name="EndpointActivity">
     	<complexContent>
     		<extension base="tns:Activity">
-     			<attribute name="endpointName" type="string"></attribute>
+     			<attribute name="endpointAddress" type="string"></attribute>
     		</extension>
     	</complexContent>
     </complexType>
@@ -35,7 +35,8 @@
     			</sequence>
     			<attribute name="operationName" type="string"></attribute>
     			<attribute name="faultName" type="string"></attribute>
-    			<attribute name="type" type="string"></attribute>
+    			<attribute name="messageType" type="string"></attribute>
+    			<attribute name="request" type="boolean" default="true"></attribute>
     		</extension>
     	</complexContent>
     </complexType>

Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Activity.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Activity.java	2011-01-18 14:58:04 UTC (rev 591)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Activity.java	2011-01-18 20:11:14 UTC (rev 592)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2011.01.16 at 06:29:35 PM GMT 
+// Generated on: 2011.01.18 at 05:58:36 PM GMT 
 //
 
 

Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Analysis.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Analysis.java	2011-01-18 14:58:04 UTC (rev 591)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Analysis.java	2011-01-18 20:11:14 UTC (rev 592)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2011.01.16 at 06:29:35 PM GMT 
+// Generated on: 2011.01.18 at 05:58:36 PM GMT 
 //
 
 

Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/EndpointActivity.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/EndpointActivity.java	2011-01-18 14:58:04 UTC (rev 591)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/EndpointActivity.java	2011-01-18 20:11:14 UTC (rev 592)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2011.01.16 at 06:29:35 PM GMT 
+// Generated on: 2011.01.18 at 05:58:36 PM GMT 
 //
 
 
@@ -24,7 +24,7 @@
  * &lt;complexType name="EndpointActivity">
  *   &lt;complexContent>
  *     &lt;extension base="{http://www.savara.org/activity}Activity">
- *       &lt;attribute name="endpointName" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="endpointAddress" type="{http://www.w3.org/2001/XMLSchema}string" />
  *     &lt;/extension>
  *   &lt;/complexContent>
  * &lt;/complexType>
@@ -41,31 +41,31 @@
     extends Activity
 {
 
-    @XmlAttribute(name = "endpointName")
-    protected String endpointName;
+    @XmlAttribute(name = "endpointAddress")
+    protected String endpointAddress;
 
     /**
-     * Gets the value of the endpointName property.
+     * Gets the value of the endpointAddress property.
      * 
      * @return
      *     possible object is
      *     {@link String }
      *     
      */
-    public String getEndpointName() {
-        return endpointName;
+    public String getEndpointAddress() {
+        return endpointAddress;
     }
 
     /**
-     * Sets the value of the endpointName property.
+     * Sets the value of the endpointAddress property.
      * 
      * @param value
      *     allowed object is
      *     {@link String }
      *     
      */
-    public void setEndpointName(String value) {
-        this.endpointName = value;
+    public void setEndpointAddress(String value) {
+        this.endpointAddress = value;
     }
 
 }

Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Error.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Error.java	2011-01-18 14:58:04 UTC (rev 591)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Error.java	2011-01-18 20:11:14 UTC (rev 592)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2011.01.16 at 06:29:35 PM GMT 
+// Generated on: 2011.01.18 at 05:58:36 PM GMT 
 //
 
 

Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InstanceFinished.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InstanceFinished.java	2011-01-18 14:58:04 UTC (rev 591)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InstanceFinished.java	2011-01-18 20:11:14 UTC (rev 592)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2011.01.16 at 06:29:35 PM GMT 
+// Generated on: 2011.01.18 at 05:58:36 PM GMT 
 //
 
 

Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InstanceStarted.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InstanceStarted.java	2011-01-18 14:58:04 UTC (rev 591)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InstanceStarted.java	2011-01-18 20:11:14 UTC (rev 592)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2011.01.16 at 06:29:35 PM GMT 
+// Generated on: 2011.01.18 at 05:58:36 PM GMT 
 //
 
 

Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/LifecycleActivity.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/LifecycleActivity.java	2011-01-18 14:58:04 UTC (rev 591)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/LifecycleActivity.java	2011-01-18 20:11:14 UTC (rev 592)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2011.01.16 at 06:29:35 PM GMT 
+// Generated on: 2011.01.18 at 05:58:36 PM GMT 
 //
 
 

Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageActivity.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageActivity.java	2011-01-18 14:58:04 UTC (rev 591)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageActivity.java	2011-01-18 20:11:14 UTC (rev 592)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2011.01.16 at 06:29:35 PM GMT 
+// Generated on: 2011.01.18 at 05:58:36 PM GMT 
 //
 
 
@@ -31,7 +31,8 @@
  *       &lt;/sequence>
  *       &lt;attribute name="operationName" type="{http://www.w3.org/2001/XMLSchema}string" />
  *       &lt;attribute name="faultName" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       &lt;attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="messageType" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="request" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
  *     &lt;/extension>
  *   &lt;/complexContent>
  * &lt;/complexType>
@@ -58,8 +59,10 @@
     protected String operationName;
     @XmlAttribute(name = "faultName")
     protected String faultName;
-    @XmlAttribute(name = "type")
-    protected String type;
+    @XmlAttribute(name = "messageType")
+    protected String messageType;
+    @XmlAttribute(name = "request")
+    protected Boolean request;
 
     /**
      * Gets the value of the value property.
@@ -134,27 +137,55 @@
     }
 
     /**
-     * Gets the value of the type property.
+     * Gets the value of the messageType property.
      * 
      * @return
      *     possible object is
      *     {@link String }
      *     
      */
-    public String getType() {
-        return type;
+    public String getMessageType() {
+        return messageType;
     }
 
     /**
-     * Sets the value of the type property.
+     * Sets the value of the messageType property.
      * 
      * @param value
      *     allowed object is
      *     {@link String }
      *     
      */
-    public void setType(String value) {
-        this.type = value;
+    public void setMessageType(String value) {
+        this.messageType = value;
     }
 
+    /**
+     * Gets the value of the request property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public boolean isRequest() {
+        if (request == null) {
+            return true;
+        } else {
+            return request;
+        }
+    }
+
+    /**
+     * Sets the value of the request property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setRequest(Boolean value) {
+        this.request = value;
+    }
+
 }

Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageReceived.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageReceived.java	2011-01-18 14:58:04 UTC (rev 591)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageReceived.java	2011-01-18 20:11:14 UTC (rev 592)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2011.01.16 at 06:29:35 PM GMT 
+// Generated on: 2011.01.18 at 05:58:36 PM GMT 
 //
 
 

Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageSent.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageSent.java	2011-01-18 14:58:04 UTC (rev 591)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageSent.java	2011-01-18 20:11:14 UTC (rev 592)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2011.01.16 at 06:29:35 PM GMT 
+// Generated on: 2011.01.18 at 05:58:36 PM GMT 
 //
 
 

Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ObjectFactory.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ObjectFactory.java	2011-01-18 14:58:04 UTC (rev 591)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ObjectFactory.java	2011-01-18 20:11:14 UTC (rev 592)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2011.01.16 at 06:29:35 PM GMT 
+// Generated on: 2011.01.18 at 05:58:36 PM GMT 
 //
 
 
@@ -37,11 +37,11 @@
     }
 
     /**
-     * Create an instance of {@link Error }
+     * Create an instance of {@link EndpointActivity }
      * 
      */
-    public Error createError() {
-        return new Error();
+    public EndpointActivity createEndpointActivity() {
+        return new EndpointActivity();
     }
 
     /**
@@ -53,6 +53,14 @@
     }
 
     /**
+     * Create an instance of {@link InstanceStarted }
+     * 
+     */
+    public InstanceStarted createInstanceStarted() {
+        return new InstanceStarted();
+    }
+
+    /**
      * Create an instance of {@link MessageReceived }
      * 
      */
@@ -69,27 +77,19 @@
     }
 
     /**
-     * Create an instance of {@link ProtocolAnalysis }
+     * Create an instance of {@link Error }
      * 
      */
-    public ProtocolAnalysis createProtocolAnalysis() {
-        return new ProtocolAnalysis();
+    public Error createError() {
+        return new Error();
     }
 
     /**
-     * Create an instance of {@link InstanceStarted }
+     * Create an instance of {@link ProtocolAnalysis }
      * 
      */
-    public InstanceStarted createInstanceStarted() {
-        return new InstanceStarted();
+    public ProtocolAnalysis createProtocolAnalysis() {
+        return new ProtocolAnalysis();
     }
 
-    /**
-     * Create an instance of {@link EndpointActivity }
-     * 
-     */
-    public EndpointActivity createEndpointActivity() {
-        return new EndpointActivity();
-    }
-
 }

Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ProtocolAnalysis.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ProtocolAnalysis.java	2011-01-18 14:58:04 UTC (rev 591)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ProtocolAnalysis.java	2011-01-18 20:11:14 UTC (rev 592)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2011.01.16 at 06:29:35 PM GMT 
+// Generated on: 2011.01.18 at 05:58:36 PM GMT 
 //
 
 

Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/package-info.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/package-info.java	2011-01-18 14:58:04 UTC (rev 591)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/package-info.java	2011-01-18 20:11:14 UTC (rev 592)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2011.01.16 at 06:29:35 PM GMT 
+// Generated on: 2011.01.18 at 05:58:36 PM GMT 
 //
 
 @javax.xml.bind.annotation.XmlSchema(namespace = "http://www.savara.org/activity", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)

Modified: branches/experimental/2.0.x/bundles/org.savara.common/META-INF/MANIFEST.MF
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.common/META-INF/MANIFEST.MF	2011-01-18 14:58:04 UTC (rev 591)
+++ branches/experimental/2.0.x/bundles/org.savara.common/META-INF/MANIFEST.MF	2011-01-18 20:11:14 UTC (rev 592)
@@ -9,7 +9,8 @@
 Import-Package: org.osgi.framework;version="1.3.0"
 Require-Bundle: org.scribble.common,
  org.scribble.protocol
-Export-Package: org.savara.common.model.change,
+Export-Package: org.savara.common.config,
+ org.savara.common.model.change,
  org.savara.common.model.generator,
  org.savara.common.model.util,
  org.savara.common.util

Added: branches/experimental/2.0.x/bundles/org.savara.common/src/main/java/org/savara/common/config/Configuration.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.common/src/main/java/org/savara/common/config/Configuration.java	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.common/src/main/java/org/savara/common/config/Configuration.java	2011-01-18 20:11:14 UTC (rev 592)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ */
+package org.savara.common.config;
+
+/**
+ * This interface provides configuration information for the
+ * Savara bundles.
+ *
+ */
+public interface Configuration {
+
+	/**
+	 * This method returns the property associated with the
+	 * supplied name.
+	 * 
+	 * @param name The name
+	 * @return The value, or null if not defined
+	 */
+	public String getProperty(String name);
+	
+}

Added: branches/experimental/2.0.x/bundles/org.savara.common/src/main/java/org/savara/common/config/DefaultConfiguration.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.common/src/main/java/org/savara/common/config/DefaultConfiguration.java	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.common/src/main/java/org/savara/common/config/DefaultConfiguration.java	2011-01-18 20:11:14 UTC (rev 592)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ */
+package org.savara.common.config;
+
+/**
+ * This class provides the default implementation of the
+ * Configuration interface.
+ *
+ */
+public class DefaultConfiguration implements Configuration {
+
+	private java.util.Properties m_properties=new java.util.Properties();
+	
+	/**
+	 * The default constructor.
+	 */
+	public DefaultConfiguration() {
+	}
+	
+	/**
+	 * This constructor provides the initial properties for the
+	 * configuration.
+	 * 
+	 * @param props The properties
+	 */
+	public DefaultConfiguration(java.util.Properties props) {
+		m_properties = props;
+	}
+	
+	/**
+	 * This method returns the property associated with the
+	 * supplied name.
+	 * 
+	 * @param name The name
+	 * @return The value, or null if not defined
+	 */
+	public String getProperty(String name) {
+		return(m_properties.getProperty(name));
+	}
+}

Modified: branches/experimental/2.0.x/bundles/org.savara.monitor/.classpath
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.monitor/.classpath	2011-01-18 14:58:04 UTC (rev 591)
+++ branches/experimental/2.0.x/bundles/org.savara.monitor/.classpath	2011-01-18 20:11:14 UTC (rev 592)
@@ -5,4 +5,5 @@
 	<classpathentry kind="src" path="src/main/java"/>
 	<classpathentry kind="src" path="src/test/java"/>
 	<classpathentry kind="output" path="bin"/>
+	<classpathentry kind="var" path="M2_REPO/org/savara/bundles/org.savara.common/2.0.0-SNAPSHOT/org.savara.common-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0-SNAPSHOT/org.scribble.protocol-2.0.0-SNAPSHOT-sources.jar"/>
 </classpath>

Modified: branches/experimental/2.0.x/bundles/org.savara.monitor/META-INF/MANIFEST.MF
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.monitor/META-INF/MANIFEST.MF	2011-01-18 14:58:04 UTC (rev 591)
+++ branches/experimental/2.0.x/bundles/org.savara.monitor/META-INF/MANIFEST.MF	2011-01-18 20:11:14 UTC (rev 592)
@@ -8,6 +8,7 @@
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Import-Package: org.osgi.framework;version="1.3.0"
 Require-Bundle: org.scribble.protocol.monitor,
- org.junit
+ org.junit,
+ org.savara.common
 Export-Package: org.savara.monitor,
  org.savara.monitor.impl

Modified: branches/experimental/2.0.x/bundles/org.savara.monitor/src/main/java/org/savara/monitor/SessionStore.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.monitor/src/main/java/org/savara/monitor/SessionStore.java	2011-01-18 14:58:04 UTC (rev 591)
+++ branches/experimental/2.0.x/bundles/org.savara.monitor/src/main/java/org/savara/monitor/SessionStore.java	2011-01-18 20:11:14 UTC (rev 592)
@@ -17,6 +17,8 @@
  */
 package org.savara.monitor;
 
+import org.savara.common.config.Configuration;
+
 /**
  * This interface represents a session store responsible for
  * persisting information about conversation instances being
@@ -26,6 +28,15 @@
 public interface SessionStore {
 
 	/**
+	 * This method sets the configuration for use by the session
+	 * store.
+	 * 
+	 *  @param config The configuration
+	 *  @throws IOException Failed to initialize session store
+	 */
+	public void initialize(Configuration config) throws java.io.IOException;
+	
+	/**
 	 * This method returns a new session associated with
 	 * the supplied protocol and conversation instance id.
 	 * 
@@ -77,4 +88,11 @@
 					java.io.Serializable session) throws IllegalArgumentException,
 									java.io.IOException;
 	
+	/**
+	 * This method closes the session store.
+	 * 
+	 * @throws java.io.IOException Failed to close the session store
+	 */
+	public void close() throws java.io.IOException;
+	
 }

Modified: branches/experimental/2.0.x/bundles/org.savara.monitor/src/main/java/org/savara/monitor/impl/InMemorySessionStore.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.monitor/src/main/java/org/savara/monitor/impl/InMemorySessionStore.java	2011-01-18 14:58:04 UTC (rev 591)
+++ branches/experimental/2.0.x/bundles/org.savara.monitor/src/main/java/org/savara/monitor/impl/InMemorySessionStore.java	2011-01-18 20:11:14 UTC (rev 592)
@@ -17,6 +17,7 @@
  */
 package org.savara.monitor.impl;
 
+import org.savara.common.config.Configuration;
 import org.savara.monitor.ConversationInstanceId;
 import org.savara.monitor.ProtocolId;
 import org.savara.monitor.SessionStore;
@@ -27,6 +28,23 @@
 	private java.util.Map<ProtocolId,java.util.Map<ConversationInstanceId,java.io.Serializable>> m_sessions=
 			new java.util.HashMap<ProtocolId,java.util.Map<ConversationInstanceId, java.io.Serializable>>();
 	
+	/**
+	 * This method sets the configuration for use by the session
+	 * store.
+	 * 
+	 *  @param config The configuration
+	 *  @throws IOException Failed to initialize session store
+	 */
+	public void initialize(Configuration config) throws java.io.IOException {
+	}
+	
+	/**
+	 * This method adds a new session.
+	 * 
+	 * @param pid The protocol id
+	 * @param cid The conversation instance id
+	 * @param session The session
+	 */
 	protected void addSession(ProtocolId pid, ConversationInstanceId cid, java.io.Serializable session) {
 		java.util.Map<ConversationInstanceId,java.io.Serializable> sessions=
 						m_sessions.get(pid);
@@ -158,4 +176,12 @@
 		sessions.put(cid, session);
 	}
 	
+	/**
+	 * This method closes the session store.
+	 * 
+	 * @throws java.io.IOException Failed to close the session store
+	 */
+	public void close() throws java.io.IOException {
+	}
+
 }



More information about the savara-commits mailing list