1 36 package org.ungoverned.oscar; 37 38 import java.util.List ; 39 40 import org.osgi.framework.BundleActivator; 41 import org.osgi.framework.BundleContext; 42 43 class SystemBundleActivator implements BundleActivator 44 { 45 private Oscar m_oscar = null; 46 private List m_activatorList = null; 47 private BundleContext m_context = null; 48 49 SystemBundleActivator(Oscar oscar, List activatorList) 50 { 51 this.m_oscar = oscar; 52 this.m_activatorList = activatorList; 53 } 54 55 public void start(BundleContext context) throws Exception 56 { 57 this.m_context = context; 58 59 if (m_activatorList != null) 61 { 62 for (int i = 0; i < m_activatorList.size(); i++) 63 { 64 ((BundleActivator) m_activatorList.get(i)).start(context); 65 } 66 } 67 } 68 69 public void stop(BundleContext context) throws Exception 70 { 71 if (m_activatorList != null) 72 { 73 for (int i = 0; i < m_activatorList.size(); i++) 75 { 76 ((BundleActivator) m_activatorList.get(i)).stop(context); 77 } 78 } 79 } 80 } 81 | Popular Tags |