1 18 19 package org.osgi.framework; 20 21 import java.io.IOException ; 22 import java.io.InputStream ; 23 import java.net.URL ; 24 import java.util.Dictionary ; 25 import java.util.Enumeration ; 26 27 70 public interface Bundle { 71 82 public static final int UNINSTALLED = 0x00000001; 83 84 98 public static final int INSTALLED = 0x00000002; 99 100 125 public static final int RESOLVED = 0x00000004; 126 127 145 public static final int STARTING = 0x00000008; 146 147 159 public static final int STOPPING = 0x00000010; 160 161 170 public static final int ACTIVE = 0x00000020; 171 172 185 public static final int START_TRANSIENT = 0x00000001; 186 187 201 public static final int START_ACTIVATION_POLICY = 0x00000002; 202 203 216 public static final int STOP_TRANSIENT = 0x00000001; 217 218 228 public int getState(); 229 230 352 public void start(int options) throws BundleException; 353 354 371 public void start() throws BundleException; 372 373 449 public void stop(int options) throws BundleException; 450 451 466 public void stop() throws BundleException; 467 468 553 public void update() throws BundleException; 554 555 578 public void update(InputStream in) throws BundleException; 579 580 640 public void uninstall() throws BundleException; 641 642 681 public Dictionary getHeaders(); 682 683 705 public long getBundleId(); 706 707 725 public String getLocation(); 726 727 751 public ServiceReference[] getRegisteredServices(); 752 753 777 public ServiceReference[] getServicesInUse(); 778 779 808 public boolean hasPermission(Object permission); 809 810 836 public URL getResource(String name); 837 838 898 public Dictionary getHeaders(String locale); 899 900 914 public String getSymbolicName(); 915 916 948 public Class loadClass(String name) throws ClassNotFoundException ; 949 950 975 public Enumeration getResources(String name) throws IOException ; 976 977 1001 public Enumeration getEntryPaths(String path); 1002 1003 1022 public URL getEntry(String path); 1023 1024 1035 public long getLastModified(); 1036 1037 1096 public Enumeration findEntries(String path, String filePattern, 1097 boolean recurse); 1098 1099 1119 public BundleContext getBundleContext(); 1120} 1121 | Popular Tags |