ws-muse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject svn commit: r159524 - in incubator/muse/trunk/src/site/content/interop/src/java/org: apache/ws/resource/example/blackberry/BlackberryResource.java everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java
Date Wed, 30 Mar 2005 20:55:53 GMT
Author: scamp
Date: Wed Mar 30 12:55:52 2005
New Revision: 159524

URL: http://svn.apache.org/viewcvs?view=rev&rev=159524
Log: (empty)


Modified:
    incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/blackberry/BlackberryResource.java
    incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java

Modified: incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/blackberry/BlackberryResource.java
URL: http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/blackberry/BlackberryResource.java?view=diff&r1=159523&r2=159524
==============================================================================
--- incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/blackberry/BlackberryResource.java
(original)
+++ incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/blackberry/BlackberryResource.java
Wed Mar 30 12:55:52 2005
@@ -5,7 +5,12 @@
 import org.apache.ws.muws.v1_0.capability.ConfigurationCapability;
 import org.apache.ws.muws.v1_0.capability.IdentityCapability;
 import org.apache.ws.muws.v1_0.capability.MetricsCapability;
+import org.apache.ws.muws.v1_0.topics.ManagementEventTopic;
+import org.apache.ws.muws.v1_0.topics.impl.XmlBeansManagementEventTopicImpl;
+import org.apache.ws.muws.v1_0.MuwsConstants;
 import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.notification.topics.TopicSpace;
+import org.apache.ws.notification.topics.impl.TopicSpaceImpl;
 import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument;
 import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ResourceIdDocument;
 import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.CurrentTimeDocument;
@@ -85,6 +90,20 @@
         resourceProperty.add(manageabilityCapabilityDocument);
 
 
+        /** Topics **/
+        TopicSpace muwsTopicSpace = getTopicSpace( MuwsConstants.NSURI_MUWS_PART2_TOPICS
);
+
+        ManagementEventTopic operationalStatusCapability = new XmlBeansManagementEventTopicImpl(
+                "OperationalStatusCapability" );
+        muwsTopicSpace.addTopic( operationalStatusCapability );
+        ManagementEventTopic metricsCapability = new XmlBeansManagementEventTopicImpl( "MetricsCapability"
);
+        muwsTopicSpace.addTopic( metricsCapability );
+        ManagementEventTopic codeModuleSize = new XmlBeansManagementEventTopicImpl( "CodeModuleSize_Change"
);
+        TopicSpace bbryTopicSpace = getTopicSpace(BlackberryPropertyQNames.ALLOCATEDSTORAGE.getNamespaceURI());
+        bbryTopicSpace.addTopic(codeModuleSize);
+
+
+
         /** Properties **/
         resourceProperty = resourcePropertySet.get(BlackberryPropertyQNames.RESOURCEID);
         ResourceIdDocument resourceIdDocument = ResourceIdDocument.Factory.newInstance();
@@ -114,7 +133,7 @@
         currentTimeDocument.setCurrentTime(calendarInstance);
         resourceProperty.add(currentTimeDocument);
         resourceProperty.setCallback( new org.apache.ws.resource.lifetime.callback.CurrentTimeCallback(
 ) );
-
+        resourceProperty.addChangeListener(metricsCapability);
 
         resourceProperty = resourcePropertySet.get(BlackberryPropertyQNames.DATE);
         DateDocument dateDocument = DateDocument.Factory.newInstance();
@@ -135,6 +154,7 @@
         OperationalStatusDocument operationalStatusDocument = OperationalStatusDocument.Factory.newInstance();
         operationalStatusDocument.setOperationalStatus(OperationalStatusDocument.OperationalStatus.AVAILABLE);
         resourceProperty.add(operationalStatusDocument);
+        resourceProperty.addChangeListener(operationalStatusCapability);
 
         resourceProperty = resourcePropertySet.get(BlackberryPropertyQNames.TIME);
         TimeDocument timeDocument = TimeDocument.Factory.newInstance();
@@ -147,8 +167,19 @@
         TotalCodeModuleSizeDocument totalCodeModuleSizeDocument = TotalCodeModuleSizeDocument.Factory.newInstance();
         totalCodeModuleSizeDocument.setTotalCodeModuleSize(256);
         resourceProperty.add(totalCodeModuleSizeDocument);
+        resourceProperty.addChangeListener(codeModuleSize);
         //todo this need a callback which MAY trigger a periodic change...we need this to
generate a event..no indication how to trigger
 
+    }
+
+    private TopicSpace getTopicSpace( String namespace )
+    {
+        TopicSpace topicSpace = getTopicSpaceSet().getTopicSpace( namespace );
+        if ( topicSpace == null )
+        {
+            topicSpace = new TopicSpaceImpl( namespace );
+        }
+        return topicSpace;
     }
 
 }

Modified: incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java
URL: http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java?view=diff&r1=159523&r2=159524
==============================================================================
--- incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java
(original)
+++ incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java
Wed Mar 30 12:55:52 2005
@@ -75,6 +75,7 @@
     {
         super.init();
 
+        /** Topics **/
         org.apache.ws.notification.topics.TopicSpaceSet topicSpaceSet = getTopicSpaceSet();
         /**
          * This method call will make all resource properties be exposed
@@ -85,7 +86,9 @@
         org.apache.ws.notification.topics.util.TopicUtils.addResourcePropertyValueChangeTopics(
                 getResourcePropertySet(), topicSpaceSet );
 
-        TopicSpace muwsTopicSpace = getTopicSpace( MuwsConstants.NSURI_MUWS_PART2_TOPICS
);
+        TopicSpace muwsTopicSpace = new TopicSpaceImpl( MuwsConstants.NSURI_MUWS_PART2_TOPICS
);
+        getTopicSpaceSet().addTopicSpace(muwsTopicSpace);
+        
         ManagementEventTopic identityCapability = new XmlBeansManagementEventTopicImpl( "IdentityCapabiltiy"
);
         muwsTopicSpace.addTopic( identityCapability );
         ManagementEventTopic manageabilityCharacteristicsCapability = new XmlBeansManagementEventTopicImpl(
@@ -108,9 +111,14 @@
         mowsTopicSpace.addTopic( mowsIdentificationCapability );
         ManagementEventTopic mowsMetricsCapability = new XmlBeansManagementEventTopicImpl(
"MetricsCapability" );
         mowsTopicSpace.addTopic( mowsMetricsCapability );
+
         ManagementEventTopic mowsRequestProcessingStateCapability = new XmlBeansManagementEventTopicImpl(
                 "RequestProcessingStateCapability" );
         mowsTopicSpace.addTopic( mowsRequestProcessingStateCapability );
+
+        ManagementEventTopic mowsRequestProcessingObservations = new XmlBeansManagementEventTopicImpl(
+                "RequestProcessingObservations" );
+        mowsTopicSpace.addTopic( mowsRequestProcessingObservations );
 
         org.apache.ws.resource.properties.ResourcePropertySet resourcePropertySet = getResourcePropertySet();
 



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


Mime
View raw message