You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jb...@apache.org on 2007/03/13 07:36:09 UTC
svn commit: r517564 - in /incubator/tuscany/java/sca/kernel:
core/src/main/java/org/apache/tuscany/core/component/scope/AbstractScopeContainer.java
spi/src/main/java/org/apache/tuscany/spi/component/ScopeContainer.java
Author: jboynes
Date: Mon Mar 12 23:36:08 2007
New Revision: 517564
URL: http://svn.apache.org/viewvc?view=rev&rev=517564
Log:
remove deprecated getInstance and getAssociatedInstance methods
Modified:
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/component/scope/AbstractScopeContainer.java
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/component/ScopeContainer.java
Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/component/scope/AbstractScopeContainer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/component/scope/AbstractScopeContainer.java?view=diff&rev=517564&r1=517563&r2=517564
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/component/scope/AbstractScopeContainer.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/component/scope/AbstractScopeContainer.java Mon Mar 12 23:36:08 2007
@@ -125,28 +125,6 @@
public <T> void returnWrapper(AtomicComponent component, InstanceWrapper<T> wrapper) throws TargetDestructionException {
}
- public Object getInstance(AtomicComponent component) throws TargetResolutionException {
- InstanceWrapper ctx = getInstanceWrapper(component, true);
- if (ctx != null) {
- if (!ctx.isStarted()) {
- ctx.start();
- }
- return ctx.getInstance();
- }
- return null;
- }
-
- public Object getAssociatedInstance(AtomicComponent component) throws TargetResolutionException {
- InstanceWrapper ctx = getInstanceWrapper(component, false);
- if (ctx != null) {
- if (!ctx.isStarted()) {
- ctx.start();
- }
- return ctx.getInstance();
- }
- throw new TargetNotFoundException(component.getUri().toString());
- }
-
public void persistNew(AtomicComponent component, String id, Object instance, long expiration)
throws PersistenceException {
throw new UnsupportedOperationException("Scope does not support persistence");
Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/component/ScopeContainer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/component/ScopeContainer.java?view=diff&rev=517564&r1=517563&r2=517564
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/component/ScopeContainer.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/component/ScopeContainer.java Mon Mar 12 23:36:08 2007
@@ -71,8 +71,10 @@
/**
* Returns an instance wrapper associated with the current scope context, creating one if necessary
*
+ * @param <T> the type of the target instance
* @param component the component
- * @throws TargetResolutionException
+ * @return the wrapper for the target instance
+ * @throws TargetResolutionException if there was a problem instantiating the target instance
*/
<T> InstanceWrapper<T> getWrapper(AtomicComponent component) throws TargetResolutionException;
@@ -80,42 +82,31 @@
* Returns an implementation instance associated with the current scope context.
* If no instance is found, a {@link TargetNotFoundException} is thrown.
*
- * @throws TargetResolutionException
+ * @param <T> the type of the target instance
+ * @param component the component
+ * @return the wrapper for the target instance
+ * @throws TargetResolutionException if there was a problem instantiating the target instance
*/
<T> InstanceWrapper<T> getAssociatedWrapper(AtomicComponent component) throws TargetResolutionException;
/**
* Return a wrapper after use (for example, after invoking the instance).
*
+ * @param <T> the type of the target instance
* @param component the component
+ * @param wrapper the wrapper for the target instance being returned
+ * @throws TargetDestructionException if there was a problem returning the target instance
*/
<T> void returnWrapper(AtomicComponent component, InstanceWrapper<T> wrapper) throws TargetDestructionException;
/**
- * Returns an implementation instance associated with the current request context, creating one if necessary
- *
- * @throws TargetResolutionException
- */
- @Deprecated
- Object getInstance(AtomicComponent component) throws TargetResolutionException;
-
- /**
- * Returns an implementation instance associated with the current context. If no instance is found, a {@link
- * TargetNotFoundException} is thrown
- *
- * @throws TargetResolutionException
- */
- @Deprecated
- Object getAssociatedInstance(AtomicComponent component) throws TargetResolutionException;
-
- /**
* Persists a new component implementation instance, equivalent to an insert or append operation
*
* @param component the owning component
* @param id the id associated with the instance
* @param instance the instance to persist
* @param expiration the expiration in milliseconds
- * @throws PersistenceException
+ * @throws PersistenceException if there was a problem persisting the instance
*/
void persistNew(AtomicComponent component, String id, Object instance, long expiration) throws PersistenceException;
@@ -126,7 +117,7 @@
* @param id the id associated with the instance
* @param instance the instance to persist
* @param expiration the expiration in milliseconds
- * @throws PersistenceException
+ * @throws PersistenceException if there was a problem persisting the instance
*/
void persist(AtomicComponent component, String id, Object instance, long expiration) throws PersistenceException;
@@ -134,7 +125,7 @@
* Removes a component implementation instance associated with the current context from persistent storage
*
* @param component the owning component
- * @throws PersistenceException
+ * @throws PersistenceException if there was a problem removing the instance
*/
void remove(AtomicComponent component) throws PersistenceException;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org