1 22 package org.jboss.annotation.ejb; 23 24 import java.lang.annotation.Annotation ; 25 import java.util.ArrayList ; 26 27 import javax.ejb.ActivationConfigProperty ; 28 import javax.ejb.MessageDriven ; 29 30 import org.jboss.annotation.ejb.RemoteBinding; 31 32 38 public class RemoteBindingImpl implements RemoteBinding 39 { 40 private String jndi; 41 private String stack; 42 private String bindUrl; 43 private Class proxyFactory; 44 45 public RemoteBindingImpl() 46 { 47 jndi = ""; 48 stack = ""; 49 bindUrl = ""; 50 proxyFactory = org.jboss.ejb3.remoting.RemoteProxyFactory.class; 51 } 52 53 public RemoteBindingImpl(String jndi, String stack, String bindUrl, Class proxyFactory) 54 { 55 this.jndi = jndi; 56 this.stack = stack; 57 this.bindUrl = bindUrl; 58 this.proxyFactory = proxyFactory; 59 } 60 61 public void setStack(String stack) 62 { 63 this.stack = stack; 64 } 65 66 public void setFactory(Class factory) 67 { 68 this.proxyFactory = factory; 69 } 70 71 public void setJndiBinding(String jndi) 72 { 73 this.jndi = jndi; 74 } 75 76 public void setBindUrl(String bindUrl) 77 { 78 this.bindUrl = bindUrl; 79 } 80 81 public String jndiBinding() 82 { 83 return jndi; 84 } 85 86 public String interceptorStack() 87 { 88 return stack; 89 } 90 91 public String clientBindUrl() 92 { 93 return bindUrl; 94 } 95 96 public Class factory() 97 { 98 return proxyFactory; 99 } 100 101 public void merge(RemoteBinding annotation) 102 { 103 if (jndi.length() == 0) 104 jndi = annotation.jndiBinding(); 105 106 if (stack.length() == 0) 107 stack = annotation.interceptorStack(); 108 109 if (bindUrl.length() == 0) 110 bindUrl = annotation.clientBindUrl(); 111 112 if (proxyFactory == org.jboss.ejb3.remoting.RemoteProxyFactory.class) 113 proxyFactory = annotation.factory(); 114 115 } 116 117 public Class <? extends Annotation > annotationType() 118 { 119 return null; 120 } 121 122 public String toString() 123 { 124 StringBuffer sb = new StringBuffer (100); 125 sb.append("[RemoteBindingImpl:"); 126 sb.append(", jndi=" + jndi); 127 sb.append(", stack=" + stack); 128 sb.append(", bindUrl=" + bindUrl); 129 sb.append(", proxyFactory=" + proxyFactory); 130 sb.append(']'); 131 return sb.toString(); 132 } 133 } 134 | Popular Tags |