1 22 package org.jboss.ejb.plugins; 23 24 import org.jboss.ejb.EnterpriseContext; 25 import org.jboss.util.Executable; 26 27 38 public abstract class AbstractPassivationJob implements Executable 39 { 40 protected EnterpriseContext ctx; 41 protected Object key; 42 protected boolean isCancelled; 43 protected boolean isExecuted; 44 45 AbstractPassivationJob(EnterpriseContext ctx, Object key) 46 { 47 this.ctx = ctx; 48 this.key = key; 49 } 50 51 56 final Object getKey() 57 { 58 return key; 59 } 60 66 final EnterpriseContext getEnterpriseContext() 67 { 68 return ctx; 69 } 70 74 final synchronized void cancel() 75 { 76 isCancelled = true; 77 } 78 82 final synchronized boolean isCancelled() 83 { 84 return isCancelled; 85 } 86 90 final synchronized void executed() 91 { 92 isExecuted = true; 93 } 94 98 final synchronized boolean isExecuted() 99 { 100 return isExecuted; 101 } 102 103 } 104 | Popular Tags |