1 17 package org.apache.geronimo.clustering; 18 19 import org.apache.geronimo.gbean.GBeanInfo; 20 import org.apache.geronimo.gbean.GBeanInfoBuilder; 21 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory; 22 23 27 public class BasicNode implements Node { 28 private final String name; 29 30 public BasicNode(String name) { 31 this.name = name; 32 } 33 34 public String getName() { 35 return name; 36 } 37 38 public static final GBeanInfo GBEAN_INFO; 39 40 public static final String GBEAN_ATTR_NODE_NAME = "nodeName"; 41 42 static { 43 GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(BasicNode.class, NameFactory.GERONIMO_SERVICE); 44 45 infoBuilder.addAttribute(GBEAN_ATTR_NODE_NAME, String .class, true); 46 47 infoBuilder.addInterface(Node.class); 48 49 infoBuilder.setConstructor(new String [] {GBEAN_ATTR_NODE_NAME}); 50 51 GBEAN_INFO = infoBuilder.getBeanInfo(); 52 } 53 54 public static GBeanInfo getGBeanInfo() { 55 return GBEAN_INFO; 56 } 57 } 58 | Popular Tags |