1 22 package org.jboss.kernel.plugins.registry; 23 24 import org.jboss.dependency.spi.Controller; 25 import org.jboss.dependency.spi.ControllerMode; 26 import org.jboss.dependency.spi.ControllerState; 27 import org.jboss.dependency.spi.DependencyInfo; 28 import org.jboss.kernel.spi.registry.KernelRegistryEntry; 29 import org.jboss.util.JBossObject; 30 import org.jboss.util.JBossStringBuilder; 31 import org.jboss.util.NotImplementedException; 32 33 39 public class AbstractKernelRegistryEntry extends JBossObject implements KernelRegistryEntry 40 { 41 42 protected Object name; 43 44 45 protected Object target; 46 47 52 public AbstractKernelRegistryEntry(Object target) 53 { 54 this.target = target; 55 } 56 57 63 public AbstractKernelRegistryEntry(Object name, Object target) 64 { 65 this.name = name; 66 this.target = target; 67 } 68 69 public Object getName() 70 { 71 return name; 72 } 73 74 public void setName(Object name) 75 { 76 this.name = name; 77 flushJBossObjectCache(); 78 } 79 80 public Object getTarget() 81 { 82 return target; 83 } 84 85 87 public Controller getController() 88 { 89 throw new NotImplementedException("getController"); 90 } 91 92 public DependencyInfo getDependencyInfo() 93 { 94 return null; 95 } 96 97 public Throwable getError() 98 { 99 throw new NotImplementedException("getError"); 100 } 101 102 public ControllerState getState() 103 { 104 return ControllerState.ERROR; 105 } 106 107 public ControllerState getRequiredState() 108 { 109 throw new NotImplementedException("getRequiredState"); 110 } 111 112 public void setRequiredState(ControllerState state) 113 { 114 throw new NotImplementedException("setRequiredState"); 115 } 116 117 public ControllerMode getMode() 118 { 119 return ControllerMode.MANUAL; 120 } 121 122 public void setMode(ControllerMode mode) 123 { 124 throw new NotImplementedException("setMode"); 125 } 126 127 public void install(ControllerState fromState, ControllerState toState) throws Throwable 128 { 129 throw new NotImplementedException("install"); 130 131 } 132 133 public void setController(Controller controller) 134 { 135 throw new NotImplementedException("setController"); 136 137 } 138 139 public void setError(Throwable error) 140 { 141 throw new NotImplementedException("NYI setError"); 142 143 } 144 145 public void uninstall(ControllerState fromState, ControllerState toState) 146 { 147 throw new NotImplementedException("uninstall"); 148 149 } 150 151 public void toString(JBossStringBuilder buffer) 152 { 153 buffer.append("target=").append(target); 154 } 155 156 public void toShortString(JBossStringBuilder buffer) 157 { 158 buffer.append(target); 159 } 160 } | Popular Tags |