org.apache.struts2.osgi

## Interface BundleAccessor

- All Known Implementing Classes:
    DefaultBundleAccessor

      public interface BundleAccessor

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `CURRENT_BUNDLE_NAME`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPackageFromBundle(org.osgi.framework.Bundle bundle, String packageName)`
    `org.osgi.framework.ServiceReference[]` | `getAllServiceReferences(String className)`
    `Set<String>` | `getPackagesByBundle(org.osgi.framework.Bundle bundle)`
    `Object` | `getService(org.osgi.framework.ServiceReference ref)`
    `org.osgi.framework.ServiceReference` | `getServiceReference(String className)`
    `org.osgi.framework.ServiceReference[]` | `getServiceReferences(String className, String params)`
    `Class` | `loadClass(String name)`
    `InputStream` | `loadResourceAsStream(String name)`
    `URL` | `loadResourceFromAllBundles(String name)`
    `InputStream` | `loadResourceFromAllBundlesAsStream(String name)`
    `void` | `setBundleContext(org.osgi.framework.BundleContext bundleContext)`
    `void` | `setOsgiHost(OsgiHost osgiHost)`

- - ### Field Detail

    - #### CURRENT_BUNDLE_NAME

          static final String CURRENT_BUNDLE_NAME

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### loadClass

          Class loadClass(String name)
                   throws ClassNotFoundException

      Throws:
        `ClassNotFoundException`

    - #### loadResourceAsStream

          InputStream loadResourceAsStream(String name)
                                    throws IOException

      Throws:
        `IOException`

    - #### loadResourceFromAllBundlesAsStream

          InputStream loadResourceFromAllBundlesAsStream(String name)
                                                  throws IOException

      Throws:
        `IOException`

    - #### loadResourceFromAllBundles

          URL loadResourceFromAllBundles(String name)
                                  throws IOException

      Throws:
        `IOException`

    - #### getPackagesByBundle

          Set<String> getPackagesByBundle(org.osgi.framework.Bundle bundle)

    - #### getService

          Object getService(org.osgi.framework.ServiceReference ref)

    - #### getServiceReference

          org.osgi.framework.ServiceReference getServiceReference(String className)

    - #### getServiceReferences

          org.osgi.framework.ServiceReference[] getServiceReferences(String className,
                                                                     String params)
                                                              throws org.osgi.framework.InvalidSyntaxException

      Throws:
        `org.osgi.framework.InvalidSyntaxException`

    - #### getAllServiceReferences

          org.osgi.framework.ServiceReference[] getAllServiceReferences(String className)

    - #### addPackageFromBundle

          void addPackageFromBundle(org.osgi.framework.Bundle bundle,
                                    String packageName)

    - #### setBundleContext

          void setBundleContext(org.osgi.framework.BundleContext bundleContext)

    - #### setOsgiHost

          void setOsgiHost(OsgiHost osgiHost)

Copyright © 2000–2022 Apache Software Foundation. All rights reserved.