felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From don...@apache.org
Subject svn commit: r611494 - in /felix/sandbox/donsez/wireadminbinder/src/site: wab1.xml wab10.xml wireapp.dtd
Date Sat, 12 Jan 2008 21:57:32 GMT
Author: donsez
Date: Sat Jan 12 13:57:31 2008
New Revision: 611494

URL: http://svn.apache.org/viewvc?rev=611494&view=rev
Log:
add examples of wired applications descriptors

Added:
    felix/sandbox/donsez/wireadminbinder/src/site/wab1.xml   (with props)
    felix/sandbox/donsez/wireadminbinder/src/site/wab10.xml   (with props)
    felix/sandbox/donsez/wireadminbinder/src/site/wireapp.dtd   (with props)

Added: felix/sandbox/donsez/wireadminbinder/src/site/wab1.xml
URL: http://svn.apache.org/viewvc/felix/sandbox/donsez/wireadminbinder/src/site/wab1.xml?rev=611494&view=auto
==============================================================================
--- felix/sandbox/donsez/wireadminbinder/src/site/wab1.xml (added)
+++ felix/sandbox/donsez/wireadminbinder/src/site/wab1.xml Sat Jan 12 13:57:31 2008
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+<!DOCTYPE wireadminbinder SYSTEM "wireapp.dtd">
+-->
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<!--
+  descriptor sample for org.apache.felix.sandbox.wireadminbinder
+
+  Author : Felix Project Team
+-->
+<wireapp id="org.apache.felix.sandbox.wireadminbinder.wab1"
+			description="A simple Wired application">
+
+		<!-- one-to-one wire set with a wire property-->
+		<!-- + keepAlive remove policy -->
+		<wireset
+			id="one2one"
+			description="only one wire between one simple producer and one simple consumer"
+			producersFilter="(service.pid=org.apache.felix.sample.clock)"
+			consumersFilter="(service.pid=org.apache.felix.sample.stringconsumer)"
+			removepolicy="keepAlive"
+		/>
+</wireapp>

Propchange: felix/sandbox/donsez/wireadminbinder/src/site/wab1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: felix/sandbox/donsez/wireadminbinder/src/site/wab10.xml
URL: http://svn.apache.org/viewvc/felix/sandbox/donsez/wireadminbinder/src/site/wab10.xml?rev=611494&view=auto
==============================================================================
--- felix/sandbox/donsez/wireadminbinder/src/site/wab10.xml (added)
+++ felix/sandbox/donsez/wireadminbinder/src/site/wab10.xml Sat Jan 12 13:57:31 2008
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+<!DOCTYPE wireadminbinder SYSTEM "wireapp.dtd">
+-->
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<!--
+  descriptor sample for org.apache.felix.sandbox.wireadminbinder
+
+  Author : Felix Project Team
+-->
+<wireapp 
+	id="org.apache.felix.sandbox.wireadminbinder.wab10"
+	description="A complex Wired application">
+
+		<!-- a many-to-one wireset without wire properties -->
+		<!-- + whileConsumer remove policy -->
+		<wireset
+			id="consumerservlet" 
+			description="all producer and the consumer servlet"
+			producers-filter="(|(|(|(|(wireadmin.producer.flavors=*org.osgi.util.position.Position)(wireadmin.producer.flavors=*org.osgi.util.measurement.Measurement))(wireadmin.producer.flavors=*java.lang.Long))(wireadmin.producer.flavors=*java.lang.Double))(wireadmin.producer.flavors=*java.awt.Image))"
+			consumers-filter="(service.pid=org.apache.felix.sample.consumerservlet)"
+			removepolicy="whileConsumer"
+		/>
+
+		<wireset
+			id="consumerservletAlt" 
+			description="all producer and the consumer servlet"	
+			consumerPID="org.apache.felix.sample.util.consumerservlet"
+			removepolicy="whileConsumer"
+		>
+			<producersFilter><![CDATA[(&(service.pid=fr.imag.adele.*)(!(service.pid=org.apache.felix.sample.producerquery.query*)))]]></producersFilter>
+		</wireset>
+		<!-- one-to-one wire set with a wire property-->
+		<!-- + keepAlive remove policy -->
+		<wireset
+			id="one2one"
+			description="only one wire between one simple producer and one simple consumer"
+			producerPID="org.apache.felix.sample.clock"
+			consumerPID="org.apache.felix.sample.stringconsumer"
+			removepolicy="keepAlive"
+		>
+			<property
+				name="wireadmin.filter"
+				type="java.lang.String"
+			><![CDATA[(wirevalue.elapsed>=2000)]]></property>
+		</wireset>
+
+		<!-- many-to-many wire set with a wire property-->
+		<!-- + ifDisconnected remove policy -->
+		<wireset
+			id="manyposition2manyposition"
+			description="wires between position producers and position consumers"
+			producers-filter="(wireadmin.producer.flavors=*org.osgi.position.Position)"
+			consumers-filter="(wireadmin.consumer.flavors=*org.osgi.position.Position)"
+			removepolicy="ifDisconnected"
+		>
+			<property
+				name="wireadmin.filter"
+				type="java.lang.String"
+			><![CDATA[(wirevalue.elapsed>=2000)]]></property>
+		</wireset>
+
+</wireapp>

Propchange: felix/sandbox/donsez/wireadminbinder/src/site/wab10.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: felix/sandbox/donsez/wireadminbinder/src/site/wireapp.dtd
URL: http://svn.apache.org/viewvc/felix/sandbox/donsez/wireadminbinder/src/site/wireapp.dtd?rev=611494&view=auto
==============================================================================
--- felix/sandbox/donsez/wireadminbinder/src/site/wireapp.dtd (added)
+++ felix/sandbox/donsez/wireadminbinder/src/site/wireapp.dtd Sat Jan 12 13:57:31 2008
@@ -0,0 +1,124 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!--
+  DTD for org.apache.felix.sandbox.wireadminbinder descriptor DTD
+
+  Author : Felix Project Team
+  Date : March 2, 2004
+  Last Update: January 12, 2008
+-->
+
+<!--
+<!ENTITY %descriptionatt "description CDATA #IMPLIED">
+<!ENTITY %idatt "id CDATA #IMPLIED">
+<!ENTITY %filteratt "filter CDATA #REQUIRED">
+-->
+
+
+<!--
+WireApp describes a list of related wiresets
+
+wireadmin-servicepid is the service.pid properties of the wire admin that manages this application
+-->
+<!ELEMENT wireapp (wireset+)>
+<!ATTLIST  wireapp
+	id CDATA #REQUIRED
+	description CDATA #IMPLIED
+>
+
+<!--
+WireSet describes a set of wires created between producers and consumers
+
+producers-filter: the LDAP filter to select a subset of registered producers
+	service.pid could be use to select only one producer
+	Examples of one producer:
+			producers-filter="(service.pid=org.apache.felix.sample.clock)"
+			producerPID="org.apache.felix.sample.clock"
+	Examples of many producers:
+			producers-filter="(service.pid=org.apache.felix.sample.*)"
+			producers-filter="(wireadmin.producer.flavors=org.osgi.position.Position)"
+	
+consumers-filter: the LDAP filter to select a subset of registered consumers
+	service.pid could be use to select only one consumer
+	Examples of many consumer:
+			consumers-filter="(service.pid=org.apache.felix.sample.consumerservlet)"
+			consumerPID="org.apache.felix.sample.consumerservlet"
+	Examples of many consumers:
+			consumers-filter="(service.pid=org.apache.felix.sample.*)"
+			consumers-filter="(wireadmin.consumer.flavors=org.osgi.position.Position)"	
+	
+removepolicy indicates what to do with the wire when the producer or the consumer is unregistered
+	removepolicy="keepAlive" : the wire is keep alive when the producer or the consumer are
unregistered. 	
+	removepolicy="whileProducer" : the wire is deleted when the producer is unregistered.
+	removepolicy="whileConsumer" : the wire is deleted when the consumer is unregistered.
+	removepolicy="ifDisconnected" : the wire is deleted when the producer or the consumer are
unregistered (ie the wire is "disconnected")
+
+TODO : in fact, this could be not relevant
+manage="own" : manages (remove) only the wires created by the wireadminbinder
+manage="other" : manages (remove) all wires
+-->
+<!ELEMENT wireset (producersFilter?,consumersFilter?,property*)>
+<!ATTLIST  wireset
+	id CDATA #REQUIRED
+	description CDATA #IMPLIED
+	producers-filter CDATA #IMPLIED
+	consumers-filter CDATA #IMPLIED
+	producerPID CDATA #IMPLIED
+	consumerPID CDATA #IMPLIED
+	removepolicy (keepAlive|whileProducer|whileConsumer|ifDisconnected) 'keepAlive'
+>
+
+<!ELEMENT producersFilter (#PCDATA)>
+<!ELEMENT consumersFilter (#PCDATA)>
+
+<!--
+property describes a wire-creation property
+	Example for OSGi Spec R3, 16.7 Wire Flow Control
+
+	Filtering by Time (16.7.1)
+	<property
+		name="wireadmin.filter"
+		type="java.lang.String"
+	><![CDATA[(wirevalue.elapsed>=2000)]]></property>
+	Filtering by Change (16.7.2) Absolute value delta
+	<property
+		name="wireadmin.filter"
+		type="java.lang.String"
+	><![CDATA[(wirevalue.delta.relative>=0.1)]]></property>
+	
+	Filtering by Change (16.7.2) Relative value delta
+	<property
+		name="wireadmin.filter"
+		type="java.lang.String"
+	><![CDATA[(wirevalue.delta.absolute>=1)]]></property>
+	Hysteresis (16.7.3)
+	<property
+		name="wireadmin.filter"
+		type="java.lang.String"
+	><![CDATA[(|(&(wirevalue.previous<=250)(wirevalue.current>250))(&(wirevalue.previous>=249)(wirevalue.current<249)))]]></property>
+
+	Other properties could be setted
+-->
+
+<!ELEMENT property (#PCDATA)>
+<!ATTLIST  property
+	name CDATA #REQUIRED
+	value CDATA #IMPLIED
+	type CDATA #REQUIRED
+>

Propchange: felix/sandbox/donsez/wireadminbinder/src/site/wireapp.dtd
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message