1 22 package org.jboss.invocation; 23 24 import java.util.Map ; 25 import java.util.HashMap ; 26 27 import org.jboss.invocation.Invoker; 28 29 46 public class InvocationContext 47 implements java.io.Serializable 48 { 49 50 private static final long serialVersionUID = 7679468692447241311L; 51 52 public Map context; 54 55 58 public InvocationContext() { 59 context = new HashMap (); 60 } 61 62 65 public InvocationContext(final Map context) { 66 this.context = context; 67 } 68 69 75 78 public void setValue(Object key, Object value) { 79 context.put(key,value); 80 } 81 82 85 public Object getValue(Object key) 86 { 87 return context.get(key); 88 } 89 90 93 public void setObjectName(Object objectName) { 94 context.put(InvocationKey.OBJECT_NAME, objectName); 95 } 96 97 public Object getObjectName() { 98 return context.get(InvocationKey.OBJECT_NAME); 99 } 100 101 104 public void setCacheId(Object id) { 105 context.put(InvocationKey.CACHE_ID, id); 106 } 107 108 public Object getCacheId() { 109 return context.get(InvocationKey.CACHE_ID); 110 } 111 112 public void setInvoker(Invoker invoker) { 113 context.put(InvocationKey.INVOKER, invoker); 114 } 115 116 public Invoker getInvoker() { 117 return (Invoker) context.get(InvocationKey.INVOKER); 118 } 119 120 public void setInvokerProxyBinding(String binding) { 121 context.put(InvocationKey.INVOKER_PROXY_BINDING, binding); 122 } 123 124 public String getInvokerProxyBinding() { 125 return (String ) context.get(InvocationKey.INVOKER_PROXY_BINDING); 126 } 127 } 128 | Popular Tags |