1 11 12 package org.eclipse.osgi.framework.internal.core; 13 14 import org.eclipse.osgi.framework.adaptor.FrameworkAdaptor; 15 16 21 public class OSGi { 22 protected Framework framework; 23 24 30 public OSGi(FrameworkAdaptor adaptor) { 31 framework = createFramework(adaptor); 32 } 33 34 40 public void close() { 41 framework.close(); 42 } 43 44 50 public void launch() { 51 framework.launch(); 52 } 53 54 60 public void shutdown() { 61 framework.shutdown(); 62 } 63 64 69 public boolean isActive() { 70 return (framework.isActive()); 71 } 72 73 78 public org.osgi.framework.BundleContext getBundleContext() { 79 return (framework.systemBundle.getContext()); 80 } 81 82 89 protected Framework createFramework(FrameworkAdaptor adaptor) { 90 return (new Framework(adaptor)); 91 } 92 93 97 protected void displayBanner() { 98 System.out.println(); 99 System.out.print(Msg.ECLIPSE_OSGI_NAME); 100 System.out.print(" "); System.out.println(Msg.ECLIPSE_OSGI_VERSION); 102 System.out.println(); 103 System.out.println(Msg.OSGI_VERSION); 104 System.out.println(); 105 System.out.println(Msg.ECLIPSE_COPYRIGHT); 106 } 107 } 108 | Popular Tags |