public ComponentInstantiationPostProcessor() { _callbacks = new Callback[2]; _callbacks[0] = NoOp.INSTANCE; _callbacks[1] = new InterceptorDispatcher(); _callbackFilter = new InterceptorFilter(); }
@Override public int accept(Method method) { for (ComponentMethodInterceptor interceptor : getInterceptors()) { if (interceptor.needToIntercept(method)) { return 1; } } return 0; } }
@Override public boolean configure(Map<String, Object> params) { lifecycle = ComponentContext.inject(SolidFireSharedPrimaryDataStoreLifeCycle.class); driver = ComponentContext.inject(SolidFireSharedPrimaryDataStoreDriver.class); listener = ComponentContext.inject(SolidFireSharedHostListener.class); return true; }
@Override public boolean configure(String name, Map<String, Object> params) throws ConfigurationException { super.configure(name, params); return true; }
@Override public void stop() { for (Object obj : beans) { if (obj instanceof PluggableService) { for (Class<?> cmd : ((PluggableService)obj).getCommands()) { ComponentContext.removeDelegateContext(cmd); } } } super.stop(); }
@Override public void start() { super.start(); for (Object obj : beans) { if (obj instanceof PluggableService) { for (Class<?> cmd : ((PluggableService)obj).getCommands()) { ComponentContext.addDelegateContext(cmd, applicationContext); } } } }
public ManagerBase() { super(); // set default run level for manager components setRunLevel(ComponentLifecycle.RUN_LEVEL_COMPONENT_BOOTSTRAP); } }
public AdapterBase() { super(); // set default run level for adapter components setRunLevel(ComponentLifecycle.RUN_LEVEL_COMPONENT); }
@Override public void with(ComponentLifecycle lifecycle) { lifecycle.stop(); } });
public void setInitializeBeans(boolean initializeBeans) { initInitializeBeans(initializeBeans); }
@Override public boolean configure(final String name, final Map<String, Object> params) throws ConfigurationException { super.configure(name, params); configureAlgorithmMap(); configureMessageBusListener(); return true; }
@Override public boolean configure(String name, Map<String, Object> params) throws ConfigurationException { return super.configure(name, params); }
@Override public boolean configure(Map<String, Object> params) { lifecycle = ComponentContext.inject(CloudStackPrimaryDataStoreLifeCycleImpl.class); driver = ComponentContext.inject(CloudStackPrimaryDataStoreDriverImpl.class); listener = ComponentContext.inject(DefaultHostListener.class); return true; }
@Override public boolean configure(final String name, final Map<String, Object> params) throws ConfigurationException { super.configure(name, params); _resourceMgr.registerResourceStateAdapter(name, this); return true; }
public static PrimaryDataStoreImpl createDataStore(StoragePoolVO pdsv, PrimaryDataStoreDriver driver, DataStoreProvider provider) { PrimaryDataStoreImpl dataStore = ComponentContext.inject(PrimaryDataStoreImpl.class); dataStore.configure(pdsv, driver, provider); return dataStore; }
public static RemoteHostEndPoint getHypervisorHostEndPoint(Host host) { RemoteHostEndPoint ep = ComponentContext.inject(RemoteHostEndPoint.class); ep.configure(host); return ep; }