org.wamblee.concurrency.spring
Class LockAdvice

java.lang.Object
  extended by org.wamblee.concurrency.spring.LockAdvice
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

public class LockAdvice
extends Object
implements org.aopalliance.intercept.MethodInterceptor

Locking advice. This automatically synchronized an object using a given lock.

Author:
Erik Brakkee

Constructor Summary
LockAdvice(Lock aLock)
          Constructs lock advice.
 
Method Summary
 Object invoke(org.aopalliance.intercept.MethodInvocation aInvocation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockAdvice

public LockAdvice(Lock aLock)
Constructs lock advice.

Parameters:
aLock - Lock to use.
Method Detail

invoke

public Object invoke(org.aopalliance.intercept.MethodInvocation aInvocation)
              throws Throwable
Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
Throws:
Throwable


Copyright © 2011. All Rights Reserved.