felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r674870 - in /felix/trunk/ipojo/annotations: pom.xml src/main/java/org/apache/felix/ipojo/handler/ src/main/java/org/apache/felix/ipojo/handler/temporal/ src/main/java/org/apache/felix/ipojo/handler/temporal/Requires.java
Date Tue, 08 Jul 2008 16:37:59 GMT
Author: clement
Date: Tue Jul  8 09:37:58 2008
New Revision: 674870

URL: http://svn.apache.org/viewvc?rev=674870&view=rev
Log:
Add the temporal dependency annotation. This annotation is inside the annotation project despite
its an external handler. This choice was made to avoid to create multiple artifacts.

So, by using the org.apache.felix.ipojo.handler.temporal.Requires annotation on a field, the
component declares a temporal dependency attached to this field. Filter, timeout and onTimeout
allow specifying dependency filter, lookup timeout, and on timeout actions.

Added:
    felix/trunk/ipojo/annotations/src/main/java/org/apache/felix/ipojo/handler/
    felix/trunk/ipojo/annotations/src/main/java/org/apache/felix/ipojo/handler/temporal/
    felix/trunk/ipojo/annotations/src/main/java/org/apache/felix/ipojo/handler/temporal/Requires.java
Modified:
    felix/trunk/ipojo/annotations/pom.xml

Modified: felix/trunk/ipojo/annotations/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/annotations/pom.xml?rev=674870&r1=674869&r2=674870&view=diff
==============================================================================
--- felix/trunk/ipojo/annotations/pom.xml (original)
+++ felix/trunk/ipojo/annotations/pom.xml Tue Jul  8 09:37:58 2008
@@ -54,7 +54,8 @@
 							iPOJO Annotations
 						</Bundle-Description>
 						<Export-Package>
-							org.apache.felix.ipojo.annotations
+							org.apache.felix.ipojo.annotations,
+							org.apache.felix.ipojo.handler.temporal
 						</Export-Package>
 						<Include-Resource>
 							META-INF/LICENCE=LICENSE,

Added: felix/trunk/ipojo/annotations/src/main/java/org/apache/felix/ipojo/handler/temporal/Requires.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/annotations/src/main/java/org/apache/felix/ipojo/handler/temporal/Requires.java?rev=674870&view=auto
==============================================================================
--- felix/trunk/ipojo/annotations/src/main/java/org/apache/felix/ipojo/handler/temporal/Requires.java
(added)
+++ felix/trunk/ipojo/annotations/src/main/java/org/apache/felix/ipojo/handler/temporal/Requires.java
Tue Jul  8 09:37:58 2008
@@ -0,0 +1,55 @@
+/* 
+ * 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.
+ */
+package org.apache.felix.ipojo.handler.temporal;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+/**
+ * Temporal dependency annotation.
+ * Allows specifying a temporal dependency.
+ * Be aware that despite is it provided in the annotations jar, 
+ * it refers to an external handler.
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+@Target(ElementType.FIELD)
+public @interface Requires {
+    
+    /**
+     * Set the LDAP filter of the dependency.
+     * Default : no filter
+     */
+    String filter() default "";
+   
+    /**
+     * Timeout of the dependency.
+     * Default : true
+     */
+    long timeout() default 3000;
+    
+    /**
+     * Set the on timeout action.
+     * Supports null, nullable, empty-array, and default-implementation.
+     * In this latter case, you must specify the qualified class name
+     * of the default-implementation (instead of default-implementation).
+     * Default: no action (i.e throw a runtime exception)
+     */
+    String onTimeout() default "";
+
+}



Mime
View raw message