1 package org.enhydra.shark.limitagent; 2 3 import java.util.Map ; 4 5 import org.enhydra.shark.Shark; 6 import org.enhydra.shark.api.internal.limitagent.LimitAgentSession; 7 8 13 public class TimerLimitAgentSession implements LimitAgentSession { 14 15 protected String [][] attrs; 16 protected String processId; 17 protected String activityId; 18 protected Map context; 19 protected long time; 20 21 protected TimerLimitAgentSession(String procId, String actId, Map ctx, long limitTime) { 22 this.processId = procId; 23 this.activityId = actId; 24 this.context = ctx; 25 this.time = limitTime; 26 } 27 28 public String [][] getExtendedAttributesNameValuePairs() { 29 if (attrs==null) { 30 try { 31 if (activityId!=null) { 32 attrs=Shark.getInstance().getAdminInterface().getAdminMisc().getActivitiesExtendedAttributeNameValuePairs(processId, activityId); 33 } else { 34 attrs=Shark.getInstance().getAdminInterface().getAdminMisc().getProcessExtendedAttributeNameValuePairs(processId); 35 } 36 } catch (Exception ex) { 37 System.err.println("Failed to retrieve extended attribute name value pairs!"); 38 } 39 } 40 return this.attrs; 41 } 42 43 public String getProcessId () { 44 return this.processId; 45 } 46 47 public String getActivityId () { 48 return this.activityId; 49 } 50 51 public Map getProcessContext() { 52 return this.context; 53 } 54 55 public long getLimitTime() { 56 return this.time; 57 } 58 59 } 60 61 | Popular Tags |