1 18 19 package org.osgi.framework; 20 21 import java.io.File ; 22 import java.io.InputStream ; 23 import java.util.Dictionary ; 24 25 75 76 public interface BundleContext { 77 114 public String getProperty(String key); 115 116 125 public Bundle getBundle(); 126 127 185 public Bundle installBundle(String location) 186 throws BundleException; 187 188 215 public Bundle installBundle(String location, InputStream input) 216 throws BundleException; 217 218 225 public Bundle getBundle(long id); 226 227 238 public Bundle[] getBundles(); 239 240 292 public void addServiceListener(ServiceListener listener, 293 String filter) throws InvalidSyntaxException; 294 295 311 public void addServiceListener(ServiceListener listener); 312 313 325 public void removeServiceListener(ServiceListener listener); 326 327 348 public void addBundleListener(BundleListener listener); 349 350 366 public void removeBundleListener(BundleListener listener); 367 368 385 public void addFrameworkListener(FrameworkListener listener); 386 387 400 public void removeFrameworkListener(FrameworkListener listener); 401 402 479 public ServiceRegistration registerService(String [] clazzes, 480 Object service, Dictionary properties); 481 482 509 public ServiceRegistration registerService(String clazz, 510 Object service, Dictionary properties); 511 512 582 public ServiceReference[] getServiceReferences(String clazz, 583 String filter) throws InvalidSyntaxException; 584 585 645 public ServiceReference[] getAllServiceReferences(String clazz, 646 String filter) throws InvalidSyntaxException; 647 648 678 public ServiceReference getServiceReference(String clazz); 679 680 735 public Object getService(ServiceReference reference); 736 737 773 public boolean ungetService(ServiceReference reference); 774 775 800 public File getDataFile(String filename); 801 802 823 public Filter createFilter(String filter) 824 throws InvalidSyntaxException; 825 } 826 | Popular Tags |