summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/sca-api/src/main/java/org
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-10-15 12:52:34 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-10-15 12:52:34 +0000
commit3d1dac50bc546b01493af516ce2d2f5f2d6d9e04 (patch)
tree897e4ed3bf86631580230bace29beb2563b77e00 /java/sca/modules/sca-api/src/main/java/org
parentb0ce588bf60f88bceb796701a883a02392beb0aa (diff)
TUSCANY-3300, Update @Service annotation to match the latest SCA-J CAA spec
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@825483 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/sca-api/src/main/java/org')
-rw-r--r--java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Service.java38
1 files changed, 23 insertions, 15 deletions
diff --git a/java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Service.java b/java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Service.java
index 36c5bff5e9..a60754762e 100644
--- a/java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Service.java
+++ b/java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Service.java
@@ -1,37 +1,45 @@
/*
- * (c) Copyright BEA Systems, Inc., Cape Clear Software, International Business Machines Corp, Interface21, IONA Technologies,
- * Oracle, Primeton Technologies, Progress Software, Red Hat, Rogue Wave Software, SAP AG., Siemens AG., Software AG., Sybase
- * Inc., TIBCO Software Inc., 2005, 2007. All rights reserved.
- *
- * see http://www.osoa.org/display/Main/Service+Component+Architecture+Specifications
+ * Copyright(C) OASIS(R) 2005,2009. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
*/
package org.oasisopen.sca.annotation;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
- * Annotation used to indicate the service interfaces exposed by a Java class.
+ * The @Service annotation is used on a component implementation
+ * class to specify the SCA services offered by the implementation.
+ *
+ * The class need not be declared as implementing all of the
+ * interfaces implied by the services, but all methods of the service
+ * interfaces must be present.
*
- * @version $Rev$ $Date$
+ * A class used as the implementation of a service is not required
+ * to have a @Service annotation. If a class has no @Service annotation,
+ * then the rules determining which services are offered and what
+ * interfaces those services have are determined by the specific
+ * implementation type.
*/
-@Target({TYPE})
+@Target(TYPE)
@Retention(RUNTIME)
public @interface Service {
+
/**
- * Array of interfaces that should be exposed as services.
+ * The value is an array of interface or class objects that should be
+ * exposed as services by this component.
*
- * @return a list of interfaces that should be exposed as services
+ * @return the services of this component
*/
- Class<?>[] interfaces() default {};
+ Class<?>[] value();
/**
- * Shortcut allowing a single interface to be exposed.
+ * The value is an array of strings which are used as the service names
+ * for each of the interfaces declared in the value array.
*
- * @return a single service interfaces to be exposed
+ * @return the service names
*/
- Class<?> value() default Void.class;
+ String[] names() default {};
}