|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.skife.intercept.InterceptionBroker
provide interception matches against arbitrary non-final objects
Constructor Summary | |
InterceptionBroker()
Create a new, unbaked InterceptionBroker |
Method Summary | |
void |
addInterceptor(java.lang.Class interceptor,
org.skife.intercept.Signature signature)
Used to add an interceptor where a new Interceptor
will be instantiated for each invocation. |
void |
addInterceptor(org.skife.intercept.InterceptorFactory factory,
org.skife.intercept.Signature signature)
Used to add an interceptor where a new Interceptor
will be instantiated for each invocation. |
void |
addInterceptor(org.skife.intercept.Interceptor interceptor,
org.skife.intercept.Signature signature)
The Interceptor passed here will be used for every method
invocation. |
void |
bake()
Bake this broker. |
org.skife.intercept.InterceptedObject |
wrap(java.lang.Object obj)
Wrap an arbitrary object in whatever interceptors match it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public InterceptionBroker()
Method Detail |
public org.skife.intercept.InterceptedObject wrap(java.lang.Object obj)
It is important to note that an object can only be wrapped by a single broker at a time, or to put it more specifically, a broker will NOT wrap an already wrapped object -- this is a meaningless triviality when attempting to wrap the same object via the same broker multiple times, but it means that if an InterceptedObject is passed to this method, you will get the same object back with no changes.
obj
- must not be declared final
public void bake()
public void addInterceptor(java.lang.Class interceptor, org.skife.intercept.Signature signature)
Interceptor
will be instantiated for each invocation.
interceptor
- Class implementing Interceptor
signature
- Signature which will be matched for interception
java.lang.UnsupportedOperationException
- if the broker has been bakedpublic void addInterceptor(org.skife.intercept.InterceptorFactory factory, org.skife.intercept.Signature signature)
Interceptor
will be instantiated for each invocation.
factory
- used to build a new Interceptor on each invocationsignature
- Signature which will be matched for interception
java.lang.UnsupportedOperationException
- if the broker has been bakedpublic void addInterceptor(org.skife.intercept.Interceptor interceptor, org.skife.intercept.Signature signature)
Interceptor
passed here will be used for every method
invocation. Make sure it is threadsafe if you are in a multithreaded environment!
interceptor
- Singleton interceptorsignature
-
java.lang.UnsupportedOperationException
- if the broker has been baked
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |