diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/sca-api/src/main')
-rw-r--r-- | sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/ServiceReference.java | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/ServiceReference.java b/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/ServiceReference.java index d89ed54d10..d2d62763fa 100644 --- a/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/ServiceReference.java +++ b/sca-java-2.x/trunk/modules/sca-api/src/main/java/org/oasisopen/sca/ServiceReference.java @@ -1,19 +1,36 @@ /* - * Copyright(C) OASIS(R) 2005,2009. All Rights Reserved. + * Copyright(C) OASIS(R) 2005,2010. All Rights Reserved. * OASIS trademark, IPR and other policies apply. */ package org.oasisopen.sca; -import java.io.Serializable; - - /** - * A ServiceReference represents a client's perspective of a reference to another service. + * 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. * - * @version $Rev$ $Date$ - * @param <B> the Java interface associated with this reference + * @param <B> the type of the service reference */ -public interface ServiceReference<B> extends Serializable { +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(); - Class<B> getBusinessInterface(); + + /** + * 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(); } |