summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/tags/2.0.1-RC1/modules/sca-api/src/main/java/org/oasisopen/sca/ServiceReference.java
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/tags/2.0.1-RC1/modules/sca-api/src/main/java/org/oasisopen/sca/ServiceReference.java')
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/sca-api/src/main/java/org/oasisopen/sca/ServiceReference.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/sca-api/src/main/java/org/oasisopen/sca/ServiceReference.java b/sca-java-2.x/tags/2.0.1-RC1/modules/sca-api/src/main/java/org/oasisopen/sca/ServiceReference.java
new file mode 100644
index 0000000000..d2d62763fa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/modules/sca-api/src/main/java/org/oasisopen/sca/ServiceReference.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright(C) OASIS(R) 2005,2010. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ */
+package org.oasisopen.sca;
+
+/**
+ * The ServiceReference interface represents a component reference.
+ * It can be injected using the @Reference annotation
+ * on a field, a setter method, or constructor parameter taking the
+ * type ServiceReference.
+ *
+ * @param <B> the type of the service reference
+ */
+public interface ServiceReference<B> extends java.io.Serializable {
+
+ /**
+ * Returns a type-safe reference to the target of this reference.
+ * The instance returned is guaranteed to implement the business
+ * interface for this reference. The value returned is a proxy
+ * to the target that implements the business interface associated
+ * with this reference.
+ *
+ * @return a type-safe reference to the target of this reference.
+ */
+ B getService();
+
+ /**
+ * Returns the Java class for the business interface associated
+ * with this reference.
+ *
+ * @return the Java class for the business interface associated
+ * with this reference.
+ */
+ Class<B> getBusinessInterface();
+}