1 22 package org.jboss.aspects.concurrent; 23 24 import java.util.concurrent.Semaphore ; 25 26 31 public class SemaphoredObjectMixin implements SemaphoredObject 32 { 33 private Semaphore semaphore; 34 35 public SemaphoredObjectMixin(Object obj) 36 { 37 Semaphored l = obj.getClass().getAnnotation(Semaphored.class); 38 semaphore = new Semaphore (l.permits(), l.isFair()); 39 } 40 41 public Semaphore getSemaphore() 42 { 43 return semaphore; 44 } 45 } 46 | Popular Tags |