git://wamblee.org
/
utils
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(no commit message)
[utils]
/
support
/
general
/
src
/
main
/
java
/
org
/
wamblee
/
general
/
ThreadSpecificProxyFactory.java
diff --git
a/support/general/src/main/java/org/wamblee/general/ThreadSpecificProxyFactory.java
b/support/general/src/main/java/org/wamblee/general/ThreadSpecificProxyFactory.java
index 81127009e4a6afc09993800789637a0001c78ce0..ac1ec8fc09d7511b990fcf89b7b86c601b6e7f9c 100644
(file)
--- a/
support/general/src/main/java/org/wamblee/general/ThreadSpecificProxyFactory.java
+++ b/
support/general/src/main/java/org/wamblee/general/ThreadSpecificProxyFactory.java
@@
-37,7
+37,7
@@
import java.lang.reflect.Proxy;
* method can be passed at construction of an object that will be used by
* multiple threads.
* </p>
* method can be passed at construction of an object that will be used by
* multiple threads.
* </p>
- *
+ *
* <p>
* This class is mostly used by infrastructure code (utilities) and test tools.
* </p>
* <p>
* This class is mostly used by infrastructure code (utilities) and test tools.
* </p>
@@
-48,6
+48,11
@@
import java.lang.reflect.Proxy;
* distributed context where it can be sent to another JVM.
* </p>
*
* distributed context where it can be sent to another JVM.
* </p>
*
+ * <p>
+ * This class currently does not do any cleanup. So it should not be used in production code
+ * but only in test utilities.
+ * </p>
+ *
* @param T
* Interface to proxy.
* @author Erik Brakkee
* @param T
* Interface to proxy.
* @author Erik Brakkee
@@
-86,8
+91,8
@@
public class ThreadSpecificProxyFactory<T> {
}
/**
}
/**
- * Constructs the factory with a callback to create thread-specific objects
- * automatically.
+ * Constructs the factory with a callback to create thread-specific objects
+ * automatically.
*
* @param aClass
* Interface class of the service to proxy.
*
* @param aClass
* Interface class of the service to proxy.
@@
-104,10
+109,10
@@
public class ThreadSpecificProxyFactory<T> {
svc = new ThreadLocal<T>() {
@Override
protected T initialValue() {
svc = new ThreadLocal<T>() {
@Override
protected T initialValue() {
- if (
aCallback != null ) {
+ if (
aCallback != null) {
return aCallback.create();
}
return aCallback.create();
}
- return null;
+ return null;
}
};
clazz = aClass;
}
};
clazz = aClass;