PKʔ 3META-INF/MANIFEST.MFZY}p IAExL"c]e8oZQ$3WT$ .lڤ,~C>b+s~˿$~S ˺O?m__rUuP+ܜFTs,)jDzIa/,dˢ hz,SmF:gMXnUn/t7@;>)IQxCo2>]FwH.x/>6ӗBr߹Lpݕ?\%q.:o'?ޖ.Nrթ5By CXu Xpʄ^EEchj.ri%0>C]5dos%@E@fjRr.:Ypy`?v^efpߎ]A:#k"2Gѵ= rq,|kKT),#`z? mp&gG}~TCW\ʯZ t.krr"l@@.۝t, ȑ@2^?qRp[PdS/ Sw+ W'z ov&j(ϭٍ߰VN7_/!$,Oeu8ى1KTs92|@!C5)z[xr涺U]uy ^]AYe䊘[; AknW/&}0%P!әjj]Cw _(QA2e*)K$=2R9gݘt W #Ⱥ9dw|֒}AM5U?RQ؄l%]ec/dI >"^?(Ww_i9#%zޖ%@y?s_A伞{}{B(97 mRVEI7F?=yX]?<"zIDRez?^Hk.,u4v"j\4?~:74N5 F(7G y&΅lʢ״yH9l<ۖϸӞ}W3rle󵝳^9% Ę\1G?;} zhn1m "e>,+QJgX˖v$<K*5& (@Hhs\#a ES=jTc}^[UcRx^!An;Y[{uCss[KϠjd$ۋ1Ta~=PYVZt&E 8_13# 4ݥsm3(@ z@c)MD\`pNH>2 ߨb.| Ũ9T;H,9mq?(7&?P`l8g"kΝ׺"9c ۀ%OUta]q(n>qLd4rQ1_.f?Nk 2ZP]_:uX`K{c3ҪfE2ƄϢ=&x5\ҭ~Ӡ,T#).A):1 Y]xg].cftGn7Q a3i^ gxů;M:hUF)e?r- l3 !p{!JALv go/8j}cOB[pNA,|笆R츳@Fꩃ1mpG =e~ @ XQ|"0#0q$Q-޿|z<PՑVb Z6Fm#d~lWtwr!ivԵۉ>nnV\zG[6 $}|Ru=0 GejY{?SR/_>PhlOYؚJI |p|[Bl1 ۩=qs$a *DMu~^Rߟ3PNmե@^!!grcd %\[#.T+$O w 6,TGU04unkG<ZRg kW L9h6\Lyi\xvc~=j R oRT =r oMp􎨢MKa=P8]ShvuŒf&z-6̄ 75C}0IiBM] UTɽBY$Eha-n>Εfd?e*( 1I2ze!B<Ӛno܊ɴ"K$p&)F͐|"m >se\} rmǗ1&YB"Q_U-)nUd_y.;Rr]Z*,=:鴋 <Ӳp_eŀ&8I~@|j11äcL'?$/qiOeD~vЯNP7 F p;!WM~5^ЙwWvw>CsZRf3JlڵgL zǨ!*@) 0]5saU*ejfp7Lx249и:.cU 9w[oϼ5f$dGU1Zchk<>yA%ѷCWV8s/=Whn<U{4^c%L8OC0jۧY59GMJ->T/Elf7+r\RUnM_"{4~ mɆfHӓzL͜llvbNh!+ֳv) I!9CQ[MLa&cp'n3rI_X9K]_1I Cp#rΉ1Wa|yЯR%j?7X'z{5]%3 % PG-#-2v+Œ~'x(=faEM,sj-<ʿ 7Lp:&!7q>_#D/ v$o "8(q&@q(s&ͅ%.g8xA M*I L1K!boB MUV}N{g÷ ziL/s'6UGMJWOnX$׾_*N-;G]1[a-YTC9늨X\u&)=^3 M *mw#_H:=Z%2qI"AZQ~;A`ЏHd mg+!?To N֯[E:\$ ɞ BuI$œ.CWyLKU~55K52 =Bs>B7H8F ¸ߔ]2]؋t\ T{\t* T]TT9ץԽPd#E>) gCB+ cٵȱm*_F& (:pw)@<%k.<)Uth x:Z)x^bߩ9┵#?*HVh"ϕПt Gi4vb>9ȅX7o hZa/"ii ݿ$8ޑn3 j<~ԭcmH[/O~`kl&j]v>HZcP?!6>r9'?|ܫא} 턽"sl]E3$|`Z|E KFyG[,U1`xnNJdb_ hbhK^ @1 JRkuZG˩>SƌF Ghߧ?K 0 NEm B]PRRA]/v+*)%zLuD_-ppB9{4vhJZRmo7n^b:pcg@rS"Kn =fx;Y<⌓34F[Ztu?.o61g,Z l*sna^sune`gXw "WV+d)׊VŴae&c릅K]wcipw2lJ@i>_~ U΁3\=RUbi'D9@FZɭJXr&fa Vp4= -Sx.Xeci!BxLQ2liaǦ|<^FN\Zd\+X[lK3-j6c~Ъ}glXL$7󎯊BjeDS ۣrA% uE583+S:fֺ 9܏<˭W)h(HyCdvhS$k 5@_G36z'*![rl `,8{[XC*Zm9v n,Y-nY_ܒe.s@@.RKϜfMU |Xpc`j%oMOjU{:P6 (7̠ 4~dEj'v7f/ O슅)a^rU {uKgJ=IJg@_):gjuIQ]$ }UϧZw.4K2Lٟ&BsE5eVZNS耏8] ^.\FTNJ%M`[v2^YW}Is5{6o8@v onO5yz~l8<B\6$9JmU#`L9AފtE2; 賰!K;+˥>le W0H'P-w)G8ux~)mG >jKi"쥬7.Q7{z;ПV)uHO`eY~`AMv:s‡A(iXmEzni)\ha"52|h#7)R˹]u[r[Y?B`#gk|Um|MkiXY> lXLO_n$y$kx72cK-]y7PK~Q *PKʔ 3META-INF/OSGI.RSA3hajhδנѐπ"`PǸ-۠Yؠf3#P/\# P}CnN6P6a(GCQaC'<$(O9 P@$. *HĸEB2KRKsJ2 5 @ΩE%iɉ%y Eeɩ .e@CIqJfaA %E Ύj*pr2et&;U%ȉZXA81ZZF o6G?FV^`v2562\^wX^d/ZuV_onU(&_z%GW\:+oT*$~vYKY-b'$[0s\M k8 ɛx91'3-(/3ɓy A@@<_xĒJϼ̒LRd=zf"MO4a_tޭU^Îk ]wncyۇ^<.*NjfFF{+uIx躭tf1My3C_cv#_L-%OwkRimRksJdڼ]S ]<$*yPRWe0cfcdeegffX̙ŀə XX dAzXX D @7jf&p 5񔗗g²&2&"P-xfd HـZǢKƆY]ʃ9uiuX˗ i V^6GtlU_]+|1ד^ۼ꧴HLp-4w^aw}ہ7?89|_ցũ,W^]jkI*N&PK" PK L 3 OSGI-OPT/PK L 3 OSGI-OPT/src/PK L 3OSGI-OPT/src/org/PK L 3OSGI-OPT/src/org/osgi/PK L 3 OSGI-OPT/src/org/osgi/framework/PK L 3~i114OSGI-OPT/src/org/osgi/framework/AdminPermission.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/AdminPermission.java,v 1.27 2005/08/11 03:11:13 hargrave Exp $ * * Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.security.*; /** * Indicates the caller's authority to perform specific privileged * administrative operations on or to get sensitive information about a bundle. * The actions for this permission are: * *
 *  Action               Methods
 *  class                Bundle.loadClass
 *  execute              Bundle.start
 *                       Bundle.stop
 *                       StartLevel.setBundleStartLevel
 *  extensionLifecycle   BundleContext.installBundle for extension bundles
 *                       Bundle.update for extension bundles
 *                       Bundle.uninstall for extension bundles
 *  lifecycle            BundleContext.installBundle
 *                       Bundle.update
 *                       Bundle.uninstall
 *  listener             BundleContext.addBundleListener for SynchronousBundleListener
 *                       BundleContext.removeBundleListener for SynchronousBundleListener
 *  metadata             Bundle.getHeaders
 *                       Bundle.getLocation
 *  resolve              PackageAdmin.refreshPackages
 *                       PackageAdmin.resolveBundles
 *  resource             Bundle.getResource
 *                       Bundle.getResources
 *                       Bundle.getEntry
 *                       Bundle.getEntryPaths
 *                       Bundle.findEntries
 *                       Bundle resource/entry URL creation
 *  startlevel           StartLevel.setStartLevel
 *                       StartLevel.setInitialBundleStartLevel 
 * 
* *

* The special action "*" will represent all actions. *

* The name of this permission is a filter expression. The filter gives access * to the following parameters: *

    *
  • signer - A Distinguished Name chain used to sign a bundle. Wildcards in * a DN are not matched according to the filter string rules, but according to * the rules defined for a DN chain.
  • *
  • location - The location of a bundle.
  • *
  • id - The bundle ID of the designated bundle.
  • *
  • name - The symbolic name of a bundle.
  • *
* * @version $Revision: 1.27 $ */ public final class AdminPermission extends BasicPermission { static final long serialVersionUID = 307051004521261705L; /** * The action string class (Value is "class"). * @since 1.3 */ public final static String CLASS = "class"; /** * The action string execute (Value is "execute"). * @since 1.3 */ public final static String EXECUTE = "execute"; /** * The action string extensionLifecycle (Value is * "extensionLifecycle"). * @since 1.3 */ public final static String EXTENSIONLIFECYCLE = "extensionLifecycle"; /** * The action string lifecycle (Value is "lifecycle"). * @since 1.3 */ public final static String LIFECYCLE = "lifecycle"; /** * The action string listener (Value is "listener"). * @since 1.3 */ public final static String LISTENER = "listener"; /** * The action string metadata (Value is "metadata"). * @since 1.3 */ public final static String METADATA = "metadata"; /** * The action string resolve (Value is "resolve"). * @since 1.3 */ public final static String RESOLVE = "resolve"; /** * The action string resource (Value is "resource"). * @since 1.3 */ public final static String RESOURCE = "resource"; /** * The action string startlevel (Value is "startlevel"). * @since 1.3 */ public final static String STARTLEVEL = "startlevel"; /* * NOTE: A framework implementor may also choose to replace this class in * their distribution with a class that directly interfaces with the * framework implementation. This replacement class MUST NOT * alter the public/protected signature of this class. */ /* * This class will load the AdminPermission class in the package named by * the org.osgi.vendor.framework package. For each instance of this class, * an instance of the vendor AdminPermission class will be created and this * class will delegate method calls to the vendor AdminPermission instance. */ private static final String packageProperty = "org.osgi.vendor.framework"; private static final Constructor initStringString; private static final Constructor initBundleString; static { Constructor[] constructors = (Constructor[]) AccessController .doPrivileged(new PrivilegedAction() { public Object run() { String packageName = System .getProperty(packageProperty); if (packageName == null) { throw new NoClassDefFoundError(packageProperty + " property not set"); } Class delegateClass; try { delegateClass = Class.forName(packageName + ".AdminPermission"); } catch (ClassNotFoundException e) { throw new NoClassDefFoundError(e.toString()); } Constructor[] result = new Constructor[2]; try { result[0] = delegateClass .getConstructor(new Class[] {String.class, String.class }); result[1] = delegateClass .getConstructor(new Class[] {Bundle.class, String.class }); } catch (NoSuchMethodException e) { throw new NoSuchMethodError(e.toString()); } return result; } }); initStringString = constructors[0]; initBundleString = constructors[1]; } /* * This is the delegate permission created by the constructor. */ private final Permission delegate; /** * Creates a new AdminPermission object that matches all * bundles and has all actions. Equivalent to AdminPermission("*","*"); */ public AdminPermission() { this("*", "*"); //$NON-NLS-1$ } /** * Create a new AdminPermission. * * This constructor must only be used to create a permission that is going * to be checked. *

* Examples: * *

	 * (signer=\*,o=ACME,c=US)   
	 * (&(signer=\*,o=ACME,c=US)(name=com.acme.*)(location=http://www.acme.com/bundles/*))
	 * (id>=1)
	 * 
* *

* When a signer key is used within the filter expression the signer value * must escape the special filter chars ('*', '(', ')'). *

* Null arguments are equivalent to "*". * * @param filter A filter expression that can use signer, location, id, and * name keys. A value of "*" or null matches * all bundle. * @param actions class, execute, * extensionLifecycle, lifecycle, * listener, metadata, * resolve, resource, or * startlevel. A value of "*" or null * indicates all actions */ public AdminPermission(String filter, String actions) { // arguments will be null if called from a PermissionInfo defined with // no args super(filter == null ? "*" : filter); try { try { delegate = (Permission) initStringString .newInstance(new Object[] {filter, actions}); } catch (InvocationTargetException e) { throw e.getTargetException(); } } catch (Error e) { throw e; } catch (RuntimeException e) { throw e; } catch (Throwable e) { throw new RuntimeException(e.toString()); } } /** * Creates a new AdminPermission object to be used by the * code that must check a Permission object. * * @param bundle A bundle * @param actions class, execute, * extensionLifecycle, lifecycle, * listener, metadata, * resolve, resource, * startlevel * @since 1.3 */ public AdminPermission(Bundle bundle, String actions) { super(createName(bundle)); try { try { delegate = (Permission) initBundleString .newInstance(new Object[] {bundle, actions}); } catch (InvocationTargetException e) { throw e.getTargetException(); } } catch (Error e) { throw e; } catch (RuntimeException e) { throw e; } catch (Throwable e) { throw new RuntimeException(e.toString()); } } /** * Create a permission name from a Bundle * * @param bundle Bundle to use to create permission name. * @return permission name. */ private static String createName(Bundle bundle) { StringBuffer sb = new StringBuffer(); sb.append("(id="); sb.append(bundle.getBundleId()); sb.append(")"); return sb.toString(); } /** * Determines the equality of two AdminPermission objects. * * @param obj The object being compared for equality with this object. * @return true if obj is equivalent to this * AdminPermission; false otherwise. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof AdminPermission)) { return false; } AdminPermission p = (AdminPermission) obj; return delegate.equals(p.delegate); } /** * Returns the hash code value for this object. * * @return Hash code value for this object. */ public int hashCode() { return delegate.hashCode(); } /** * Returns the canonical string representation of the * AdminPermission actions. * *

* Always returns present AdminPermission actions in the * following order: class, execute, * extensionLifecycle, lifecycle, * listener, metadata, resolve, * resource, startlevel. * * @return Canonical string representation of the * AdminPermission actions. */ public String getActions() { return delegate.getActions(); } /** * Determines if the specified permission is implied by this object. This * method throws an exception if the specified permission was not * constructed with a bundle. * *

* This method returns true if the specified permission is an * AdminPermission AND *

    *
  • this object's filter matches the specified permission's bundle ID, * bundle symbolic name, bundle location and bundle signer distinguished * name chain OR
  • *
  • this object's filter is "*"
  • *
* AND this object's actions include all of the specified permission's * actions. *

* Special case: if the specified permission was constructed with "*" * filter, then this method returns true if this object's * filter is "*" and this object's actions include all of the specified * permission's actions * * @param p The permission to interrogate. * * @return true if the specified permission is implied by * this object; false otherwise. * @throws RuntimeException if specified permission was not constructed with * a bundle or "*" */ public boolean implies(Permission p) { if (!(p instanceof AdminPermission)) { return false; } AdminPermission pp = (AdminPermission) p; return delegate.implies(pp.delegate); } /** * Returns a new PermissionCollection object suitable for * storing AdminPermissions. * * @return A new PermissionCollection object. */ public PermissionCollection newPermissionCollection() { return delegate.newPermissionCollection(); } } PK L 3 :͝7OSGI-OPT/src/org/osgi/framework/AllServiceListener.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/AllServiceListener.java,v 1.7 2005/08/11 03:07:30 hargrave Exp $ * * Copyright (c) OSGi Alliance (2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; /** * A ServiceEvent listener. * *

* AllServiceListener is a listener interface that may be * implemented by a bundle developer. *

* An AllServiceListener object is registered with the Framework * using the BundleContext.addServiceListener method. * AllServiceListener objects are called with a * ServiceEvent object when a service is registered, modified, or * is in the process of unregistering. * *

* ServiceEvent object delivery to * AllServiceListener objects is filtered by the filter specified * when the listener was registered. If the Java Runtime Environment supports * permissions, then additional filtering is done. ServiceEvent * objects are only delivered to the listener if the bundle which defines the * listener object's class has the appropriate ServicePermission * to get the service using at least one of the named classes the service was * registered under. * *

* Unlike normal ServiceListener objects, * AllServiceListener objects receive all ServiceEvent objects * regardless of the whether the package source of the listening bundle is equal * to the package source of the bundle that registered the service. This means * that the listener may not be able to cast the service object to any of its * corresponding service interfaces if the service object is retrieved. * * @version $Revision: 1.7 $ * @see ServiceEvent * @see ServicePermission * @since 1.3 */ public interface AllServiceListener extends ServiceListener { // This is a marker interface } PK L 3zN+OSGI-OPT/src/org/osgi/framework/Bundle.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/Bundle.java,v 1.31 2005/08/05 03:22:00 hargrave Exp $ * * Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.util.Dictionary; import java.util.Enumeration; /** * An installed bundle in the Framework. * *

* A Bundle object is the access point to define the lifecycle of * an installed bundle. Each bundle installed in the OSGi environment must have * an associated Bundle object. * *

* A bundle must have a unique identity, a long, chosen by the * Framework. This identity must not change during the lifecycle of a bundle, * even when the bundle is updated. Uninstalling and then reinstalling the * bundle must create a new unique identity. * *

* A bundle can be in one of six states: *

    *
  • {@link #UNINSTALLED} *
  • {@link #INSTALLED} *
  • {@link #RESOLVED} *
  • {@link #STARTING} *
  • {@link #STOPPING} *
  • {@link #ACTIVE} *
*

* Values assigned to these states have no specified ordering; they represent * bit values that may be ORed together to determine if a bundle is in one of * the valid states. * *

* A bundle should only execute code when its state is one of * STARTING,ACTIVE, or STOPPING. * An UNINSTALLED bundle can not be set to another state; it is a * zombie and can only be reached because references are kept somewhere. * *

* The Framework is the only entity that is allowed to create * Bundle objects, and these objects are only valid within the * Framework that created them. * * @version $Revision: 1.31 $ */ public interface Bundle { /** * This bundle is uninstalled and may not be used. * *

* The UNINSTALLED state is only visible after a bundle is * uninstalled; the bundle is in an unusable state but references to the * Bundle object may still be available and used for * introspection. *

* The value of UNINSTALLED is 0x00000001. */ public static final int UNINSTALLED = 0x00000001; /** * This bundle is installed but not yet resolved. * *

* A bundle is in the INSTALLED state when it has been * installed in the Framework but cannot run. *

* This state is visible if the bundle's code dependencies are not resolved. * The Framework may attempt to resolve an INSTALLED bundle's * code dependencies and move the bundle to the RESOLVED * state. *

* The value of INSTALLED is 0x00000002. */ public static final int INSTALLED = 0x00000002; /** * This bundle is resolved and is able to be started. * *

* A bundle is in the RESOLVED state when the Framework has * successfully resolved the bundle's dependencies. These dependencies * include: *

    *
  • The bundle's class path from its {@link Constants#BUNDLE_CLASSPATH} * Manifest header. *
  • The bundle's package dependencies from its * {@link Constants#EXPORT_PACKAGE} and {@link Constants#IMPORT_PACKAGE} * Manifest headers. *
  • The bundle's required bundle dependencies from its * {@link Constants#REQUIRE_BUNDLE} Manifest header. *
  • A fragment bundle's host dependency from its * {@link Constants#FRAGMENT_HOST} Manifest header. *
*

* Note that the bundle is not active yet. A bundle must be put in the * RESOLVED state before it can be started. The Framework may * attempt to resolve a bundle at any time. *

* The value of RESOLVED is 0x00000004. */ public static final int RESOLVED = 0x00000004; /** * This bundle is in the process of starting. * *

* A bundle is in the STARTING state when the {@link #start} * method is active. A bundle must be in this state when the bundle's * {@link BundleActivator#start} is called. If this method completes without * exception, then the bundle has successfully started and must move to the * ACTIVE state. *

* The value of STARTING is 0x00000008. */ public static final int STARTING = 0x00000008; /** * This bundle is in the process of stopping. * *

* A bundle is in the STOPPING state when the {@link #stop} * method is active. A bundle must be in this state when the bundle's * {@link BundleActivator#stop} method is called. When this method completes * the bundle is stopped and must move to the RESOLVED state. *

* The value of STOPPING is 0x00000010. */ public static final int STOPPING = 0x00000010; /** * This bundle is now running. * *

* A bundle is in the ACTIVE state when it has been * successfully started. *

* The value of ACTIVE is 0x00000020. */ public static final int ACTIVE = 0x00000020; /** * Returns this bundle's current state. * *

* A bundle can be in only one state at any time. * * @return An element of UNINSTALLED,INSTALLED, * RESOLVED,STARTING, * STOPPING,ACTIVE. */ public int getState(); /** * Starts this bundle. * *

* If the Framework implements the optional Start Level service and the * current start level is less than this bundle's start level, then the * Framework must persistently mark this bundle as started and delay the * starting of this bundle until the Framework's current start level becomes * equal or more than the bundle's start level. *

* Otherwise, the following steps are required to start a bundle: *

    *
  1. If this bundle's state is UNINSTALLED then an * IllegalStateException is thrown. * *
  2. If this bundle's state is STARTING or * STOPPING then this method must wait for this bundle to * change state before continuing. If this does not occur in a reasonable * time, a BundleException is thrown to indicate this bundle * was unable to be started. * *
  3. If this bundle's state is ACTIVE then this method * returns immediately. * *
  4. Persistently record that this bundle has been started. When the * Framework is restarted, this bundle must be automatically started. * *
  5. If this bundle's state is not RESOLVED, an attempt * is made to resolve this bundle's package dependencies. If the Framework * cannot resolve this bundle, a BundleException is thrown. * *
  6. This bundle's state is set to STARTING. * *
  7. A bundle event of type {@link BundleEvent#STARTING} is fired. This event is only delivered to * SynchronousBundleListeners. It is not delivered to BundleListeners. * *
  8. The {@link BundleActivator#start} method of this bundle's * BundleActivator, if one is specified, is called. If the * BundleActivator is invalid or throws an exception, this * bundle's state is set back to RESOLVED.
    * Any services registered by the bundle must be unregistered.
    * Any services used by the bundle must be released.
    * Any listeners registered by the bundle must be removed.
    * A BundleException is then thrown. * *
  9. If this bundle's state is UNINSTALLED, because the * bundle was uninstalled while the BundleActivator.start * method was running, a BundleException is thrown. * *
  10. This bundle's state is set to ACTIVE. * *
  11. A bundle event of type {@link BundleEvent#STARTED} is fired. *
* * Preconditions *
    *
  • getState() in {INSTALLED}, { * RESOLVED}. *
* Postconditions, no exceptions thrown *
    *
  • Bundle persistent state is marked as active. *
  • getState() in {ACTIVE}. *
  • BundleActivator.start() has been called and did not * throw an exception. *
* Postconditions, when an exception is thrown *
    *
  • Depending on when the exception occurred, bundle persistent state is * marked as active. *
  • getState() not in {STARTING}, { * ACTIVE}. *
* * @throws BundleException If this bundle could not be started. This could * be because a code dependency could not be resolved or the * specified BundleActivator could not be loaded or * threw an exception. * @throws java.lang.IllegalStateException If this bundle has been * uninstalled or this bundle tries to change its own state. * @throws java.lang.SecurityException If the caller does not have the * appropriate AdminPermission[this,EXECUTE], and the * Java Runtime Environment supports permissions. */ public void start() throws BundleException; /** * Stops this bundle. * *

* The following steps are required to stop a bundle: *

    *
  1. If this bundle's state is UNINSTALLED then an * IllegalStateException is thrown. * *
  2. If this bundle's state is STARTING or * STOPPING then this method must wait for this bundle to * change state before continuing. If this does not occur in a reasonable * time, a BundleException is thrown to indicate this bundle * was unable to be stopped. * *
  3. Persistently record that this bundle has been stopped. When the * Framework is restarted, this bundle must not be automatically started. * *
  4. If this bundle's state is not ACTIVE then this method * returns immediately. * *
  5. This bundle's state is set to STOPPING. * *
  6. A bundle event of type {@link BundleEvent#STOPPING} is fired. This event is only delivered to * SynchronousBundleListeners. It is not delivered to BundleListeners. * *
  7. The {@link BundleActivator#stop} method of this bundle's * BundleActivator, if one is specified, is called. If that * method throws an exception, this method must continue to stop this * bundle. A BundleException must be thrown after completion * of the remaining steps. * *
  8. Any services registered by this bundle must be unregistered. *
  9. Any services used by this bundle must be released. *
  10. Any listeners registered by this bundle must be removed. * *
  11. If this bundle's state is UNINSTALLED, because the * bundle was uninstalled while the BundleActivator.stop * method was running, a BundleException must be thrown. * *
  12. This bundle's state is set to RESOLVED. * *
  13. A bundle event of type {@link BundleEvent#STOPPED} is fired. *
* * Preconditions *
    *
  • getState() in {ACTIVE}. *
* Postconditions, no exceptions thrown *
    *
  • Bundle persistent state is marked as stopped. *
  • getState() not in {ACTIVE, * STOPPING}. *
  • BundleActivator.stop has been called and did not * throw an exception. *
* Postconditions, when an exception is thrown *
    *
  • Bundle persistent state is marked as stopped. *
* * @throws BundleException If this bundle's BundleActivator * could not be loaded or threw an exception. * @throws java.lang.IllegalStateException If this bundle has been * uninstalled or this bundle tries to change its own state. * @throws java.lang.SecurityException If the caller does not have the * appropriate AdminPermission[this,EXECUTE], and the * Java Runtime Environment supports permissions. */ public void stop() throws BundleException; /** * Updates this bundle. * *

* If this bundle's state is ACTIVE, it must be stopped * before the update and started after the update successfully completes. * *

* If the bundle being updated has exported any packages, these packages * must not be updated. Instead, the previous package version must remain * exported until the PackageAdmin.refreshPackages method has * been has been called or the Framework is relaunched. * *

* The following steps are required to update a bundle: *

    *
  1. If this bundle's state is UNINSTALLED then an * IllegalStateException is thrown. * *
  2. If this bundle's state is ACTIVE, * STARTING or STOPPING, the bundle is * stopped as described in the Bundle.stop method. If * Bundle.stop throws an exception, the exception is rethrown * terminating the update. * *
  3. The download location of the new version of this bundle is * determined from either the bundle's * {@link Constants#BUNDLE_UPDATELOCATION} Manifest header (if available) or * the bundle's original location. * *
  4. The location is interpreted in an implementation dependent manner, * typically as a URL, and the new version of this bundle is obtained from * this location. * *
  5. The new version of this bundle is installed. If the Framework is * unable to install the new version of this bundle, the original version of * this bundle must be restored and a BundleException must be * thrown after completion of the remaining steps. * *
  6. If the bundle has declared an Bundle-RequiredExecutionEnvironment * header, then the listed execution environments must be verified against * the installed execution environments. If they do not all match, the * original version of this bundle must be restored and a * BundleException must be thrown after completion of the * remaining steps. * *
  7. This bundle's state is set to INSTALLED. * *
  8. If the new version of this bundle was successfully installed, a * bundle event of type {@link BundleEvent#UPDATED} is fired. * *
  9. If this bundle's state was originally ACTIVE, the * updated bundle is started as described in the Bundle.start * method. If Bundle.start throws an exception, a Framework * event of type {@link FrameworkEvent#ERROR} is fired containing the * exception. *
* * Preconditions *
    *
  • getState() not in {UNINSTALLED}. *
* Postconditions, no exceptions thrown *
    *
  • getState() in {INSTALLED, * RESOLVED,ACTIVE}. *
  • This bundle has been updated. *
* Postconditions, when an exception is thrown *
    *
  • getState() in {INSTALLED, * RESOLVED,ACTIVE}. *
  • Original bundle is still used; no update occurred. *
* * @throws BundleException If the update fails. * @throws java.lang.IllegalStateException If this bundle has been * uninstalled or this bundle tries to change its own state. * @throws java.lang.SecurityException If the caller does not have the * appropriate AdminPermission[this,LIFECYCLE] for both * the current bundle and the updated bundle, and the Java Runtime * Environment supports permissions. * @see #stop() * @see #start() */ public void update() throws BundleException; /** * Updates this bundle from an InputStream. * *

* This method performs all the steps listed in Bundle.update(), * except the bundle must be read from the supplied InputStream, * rather than a URL. *

* This method must always close the InputStream when it is * done, even if an exception is thrown. * * @param in The InputStream from which to read the new * bundle. * @throws BundleException If the provided stream cannot be read or the * update fails. * @throws java.lang.IllegalStateException If this bundle has been * uninstalled or this bundle tries to change its own state. * @throws java.lang.SecurityException If the caller does not have the * appropriate AdminPermission[this,LIFECYCLE] for both * the current bundle and the updated bundle, and the Java Runtime * Environment supports permissions. * @see #update() */ public void update(InputStream in) throws BundleException; /** * Uninstalls this bundle. * *

* This method causes the Framework to notify other bundles that this bundle * is being uninstalled, and then puts this bundle into the * UNINSTALLED state. The Framework must remove any resources * related to this bundle that it is able to remove. * *

* If this bundle has exported any packages, the Framework must continue to * make these packages available to their importing bundles until the * PackageAdmin.refreshPackages method has been called or the * Framework is relaunched. * *

* The following steps are required to uninstall a bundle: *

    *
  1. If this bundle's state is UNINSTALLED then an * IllegalStateException is thrown. * *
  2. If this bundle's state is ACTIVE, * STARTING or STOPPING, this bundle is * stopped as described in the Bundle.stop method. If * Bundle.stop throws an exception, a Framework event of type * {@link FrameworkEvent#ERROR} is fired containing the exception. * *
  3. This bundle's state is set to UNINSTALLED. * *
  4. A bundle event of type {@link BundleEvent#UNINSTALLED} is fired. * *
  5. This bundle and any persistent storage area provided for this bundle * by the Framework are removed. *
* * Preconditions *
    *
  • getState() not in {UNINSTALLED}. *
* Postconditions, no exceptions thrown *
    *
  • getState() in {UNINSTALLED}. *
  • This bundle has been uninstalled. *
* Postconditions, when an exception is thrown *
    *
  • getState() not in {UNINSTALLED}. *
  • This Bundle has not been uninstalled. *
* * @throws BundleException If the uninstall failed. This can occur if * another thread is attempting to change the bundle's state and * does not complete in a timely manner. * @throws java.lang.IllegalStateException If this bundle has been * uninstalled or this bundle tries to change its own state. * @throws java.lang.SecurityException If the caller does not have the * appropriate AdminPermission[this,LIFECYCLE], and the * Java Runtime Environment supports permissions. * @see #stop() */ public void uninstall() throws BundleException; /** * Returns this bundle's Manifest headers and values. This method returns * all the Manifest headers and values from the main section of the bundle's * Manifest file; that is, all lines prior to the first blank line. * *

* Manifest header names are case-insensitive. The methods of the returned * Dictionary object must operate on header names in a * case-insensitive manner. * * If a Manifest header value starts with "%", it must be * localized according to the default locale. * *

* For example, the following Manifest headers and values are included if * they are present in the Manifest file: * *

	 *          Bundle-Name
	 *          Bundle-Vendor
	 *          Bundle-Version
	 *          Bundle-Description
	 *          Bundle-DocURL
	 *          Bundle-ContactAddress
	 * 
* *

* This method must continue to return Manifest header information while * this bundle is in the UNINSTALLED state. * * @return A Dictionary object containing this bundle's * Manifest headers and values. * * @throws java.lang.SecurityException If the caller does not have the * appropriate AdminPermission[this,METADATA], and the * Java Runtime Environment supports permissions. * * @see Constants#BUNDLE_LOCALIZATION */ public Dictionary getHeaders(); /** * Returns this bundle's identifier. The bundle is assigned a unique * identifier by the Framework when it is installed in the OSGi environment. * *

* A bundle's unique identifier has the following attributes: *

    *
  • Is unique and persistent. *
  • Is a long. *
  • Its value is not reused for another bundle, even after the bundle is * uninstalled. *
  • Does not change while the bundle remains installed. *
  • Does not change when the bundle is updated. *
* *

* This method must continue to return this bundle's unique identifier while * this bundle is in the UNINSTALLED state. * * @return The unique identifier of this bundle. */ public long getBundleId(); /** * Returns this bundle's location identifier. * *

* The bundle location identifier is the location passed to * BundleContext.installBundle when a bundle is installed. * The bundle location identifier does not change while the bundle remains * installed, even if the bundle is updated. * *

* This method must continue to return this bundle's location identifier * while this bundle is in the UNINSTALLED state. * * @return The string representation of this bundle's location identifier. * @throws java.lang.SecurityException If the caller does not have the * appropriate AdminPermission[this,METADATA], and the * Java Runtime Environment supports permissions. */ public String getLocation(); /** * Returns this bundle's ServiceReference list for all * services it has registered or null if this bundle has no * registered services. * *

* If the Java runtime supports permissions, a ServiceReference * object to a service is included in the returned list only if the caller * has the ServicePermission to get the service using at * least one of the named classes the service was registered under. * *

* The list is valid at the time of the call to this method, however, as the * Framework is a very dynamic environment, services can be modified or * unregistered at anytime. * * @return An array of ServiceReference objects or * null. * @throws java.lang.IllegalStateException If this bundle has been * uninstalled. * @see ServiceRegistration * @see ServiceReference * @see ServicePermission */ public ServiceReference[] getRegisteredServices(); /** * Returns this bundle's ServiceReference list for all * services it is using or returns null if this bundle is not * using any services. A bundle is considered to be using a service if its * use count for that service is greater than zero. * *

* If the Java Runtime Environment supports permissions, a * ServiceReference object to a service is included in the * returned list only if the caller has the ServicePermission * to get the service using at least one of the named classes the service * was registered under. *

* The list is valid at the time of the call to this method, however, as the * Framework is a very dynamic environment, services can be modified or * unregistered at anytime. * * @return An array of ServiceReference objects or * null. * @throws java.lang.IllegalStateException If this bundle has been * uninstalled. * @see ServiceReference * @see ServicePermission */ public ServiceReference[] getServicesInUse(); /** * Determines if this bundle has the specified permissions. * *

* If the Java Runtime Environment does not support permissions, this method * always returns true. *

* permission is of type Object to avoid * referencing the java.security.Permission class directly. * This is to allow the Framework to be implemented in Java environments * which do not support permissions. * *

* If the Java Runtime Environment does support permissions, this bundle and * all its resources including embedded JAR files, belong to the same * java.security.ProtectionDomain; that is, they must share * the same set of permissions. * * @param permission The permission to verify. * * @return true if this bundle has the specified permission * or the permissions possessed by this bundle imply the specified * permission; false if this bundle does not have the * specified permission or permission is not an * instanceof java.security.Permission. * * @throws java.lang.IllegalStateException If this bundle has been * uninstalled. */ public boolean hasPermission(Object permission); /** * Find the specified resource from this bundle. * * This bundle's class loader is called to search for the named resource. If * this bundle's state is INSTALLED, then only this bundle * must be searched for the specified resource. Imported packages cannot be * searched when a bundle has not been resolved. If this bundle is a * fragment bundle then null is returned. * * @param name The name of the resource. See * java.lang.ClassLoader.getResource for a description * of the format of a resource name. * @return A URL to the named resource, or null if the * resource could not be found or if this bundle is a fragment * bundle or if the caller does not have the appropriate * AdminPermission[this,RESOURCE], and the Java Runtime * Environment supports permissions. * * @since 1.1 * @throws java.lang.IllegalStateException If this bundle has been * uninstalled. */ public URL getResource(String name); /** * Returns this bundle's Manifest headers and values localized to the * specifed locale. * *

* This method performs the same function as * Bundle.getHeaders() except the manifest header values are * localized to the specified locale. * * If a Manifest header value starts with "%", it must be * localized according to the specified locale. If the specified locale * cannot be found, then the header values must be returned using the * default locale. * * If null is specified as the locale string, the header * values must be localized using the default locale. If the empty string * ("") is specified as the locale string, the header values must * not be localized and the raw (unlocalized) header values, including any * leading "%", must be returned. * *

* This method must continue to return Manifest header information while * this bundle is in the UNINSTALLED state, however the * header values must only be available in the raw and default locale * values. * * @param locale The locale name into which the header values are to be * localized. If the specified locale is null then the * locale returned by java.util.Locale.getDefault is * used. If the specified locale is the empty string, this method * will return the raw (unlocalized) manifest headers including any * leading "%". * @return A Dictionary object containing this bundle's * Manifest headers and values. * * @throws java.lang.SecurityException If the caller does not have the * appropriate AdminPermission[this,METADATA], and the * Java Runtime Environment supports permissions. * * @see #getHeaders() * @see Constants#BUNDLE_LOCALIZATION * @since 1.3 */ public Dictionary getHeaders(String locale); /** * Returns the symbolic name of this bundle as specified by its * Bundle-SymbolicName manifest header. The name must be * unique, it is recommended to use a reverse domain name naming convention * like that used for java packages. If the bundle does not have a specified * symbolic name then null is returned. * *

* This method must continue to return this bundle's symbolic name while * this bundle is in the UNINSTALLED state. * * @return The symbolic name of this bundle. * @since 1.3 */ public String getSymbolicName(); /** * * Loads the specified class using this bundle's classloader. * *

* If the bundle is a fragment bundle then this method must throw a * ClassNotFoundException. * *

* If this bundle's state is INSTALLED, this method must * attempt to resolve the bundle before attempting to load the class. * *

* If the bundle cannot be resolved, a Framework event of type * {@link FrameworkEvent#ERROR} is fired containing a * BundleException with details of the reason the bundle * could not be resolved. This method must then throw a * ClassNotFoundException. * *

* If this bundle's state is UNINSTALLED, then an * IllegalStateException is thrown. * * @param name The name of the class to load. * @return The Class object for the requested class. * @throws java.lang.ClassNotFoundException If no such class can be found or * if this bundle is a fragment bundle or if the caller does not * have the appropriate AdminPermission[this,CLASS], and * the Java Runtime Environment supports permissions. * @throws java.lang.IllegalStateException If this bundle has been * uninstalled. * @since 1.3 */ public Class loadClass(String name) throws ClassNotFoundException; /** * Find the specified resources from this bundle. * * This bundle's class loader is called to search for the named resource. If * this bundle's state is INSTALLED, then only this bundle * must be searched for the specified resource. Imported packages cannot be * searched when a bundle has not been resolved. If this bundle is a * fragment bundle then null is returned. * * @param name The name of the resource. See * java.lang.ClassLoader.getResources for a * description of the format of a resource name. * @return An enumeration of URLs to the named resources, or * null if the resource could not be found or if this * bundle is a fragment bundle or if the caller does not have the * appropriate AdminPermission[this,RESOURCE], and the * Java Runtime Environment supports permissions. * * @since 1.3 * @throws java.lang.IllegalStateException If this bundle has been * uninstalled. * @throws java.io.IOException If there is an I/O error. */ public Enumeration getResources(String name) throws IOException; /** * Returns an Enumeration of all the paths (String objects) * to entries within the bundle whose longest sub-path matches the supplied * path argument. The bundle's classloader is not used to search for * entries. Only the contents of the bundle is searched. A specified path of * "/" indicates the root of the bundle. * *

* Returned paths indicating subdirectory paths end with a "/". * The returned paths are all relative to the root of the bundle. * * @param path The path name for which to return entry paths. * @return An Enumeration of the entry paths (String * objects) or null if no entry could be found or if * the caller does not have the appropriate * AdminPermission[this,RESOURCE] and the Java Runtime * Environment supports permissions. * @throws java.lang.IllegalStateException If this bundle has been * uninstalled. * @since 1.3 */ public Enumeration getEntryPaths(String path); /** * Returns a URL to the specified entry in this bundle. The bundle's * classloader is not used to search for the specified entry. Only the * contents of the bundle is searched for the specified entry. A specified * path of "/" indicates the root of the bundle. * * @param name The name of the entry. See * java.lang.ClassLoader.getResource for a description * of the format of a resource name. * @return A URL to the specified entry, or null if no entry * could be found or if the caller does not have the appropriate * AdminPermission[this,RESOURCE] and the Java Runtime * Environment supports permissions. * * @throws java.lang.IllegalStateException If this bundle has been * uninstalled. * @since 1.3 */ public URL getEntry(String name); /** * Returns the time when this bundle was last modified. A bundle is * considered to be modified when it is installed, updated or uninstalled. * *

* The time value is the number of milliseconds since January 1, 1970, * 00:00:00 GMT. * * @return The time when this bundle was last modified. * @since 1.3 */ public long getLastModified(); /** * Returns entries in this bundle and its attached fragments. The bundle's * classloader is not used to search for entries. Only the contents of the * bundle and its attached fragments are searched for the specified entries. * * If this bundle's state is INSTALLED, this method must * attempt to resolve the bundle before attempting to find entries. * *

* This method is intended to be used to obtain configuration, setup, * localization and other information from this bundle. This method takes * into account that the "contents" of this bundle can be extended * with fragments. This "bundle space" is not a namespace with * unique members; the same entry name can be present multiple times. This * method therefore returns an enumeration of URL objects. These URLs can * come from different JARs but have the same path name. This method can * either return only entries in the specified path or recurse into * subdirectories returning entries in the directory tree beginning at the * specified path. Fragments can be attached after this bundle is resolved, * possibly changing the set of URLs returned by this method. If this bundle * is not resolved, only the entries in the JAR file of this bundle are * returned. *

* Examples: * *

	 * // List all XML files in the OSGI-INF directory and below
	 * Enumeration e = b.findEntries("OSGI-INF", "*.xml", true);
	 * 
	 * // Find a specific localization file
	 * Enumeration e = b.findEntries("OSGI-INF/l10n", 
	 *                               "bundle_nl_DU.properties", 
	 *                               false);
	 * if (e.hasMoreElements())
	 * 	return (URL) e.nextElement();
	 * 
* * @param path The path name in which to look. A specified path of * "/" indicates the root of the bundle. Path is relative * to the root of the bundle and must not be null. * @param filePattern The file name pattern for selecting entries in the * specified path. The pattern is only matched against the last * element of the entry path and it supports substring matching, as * specified in the Filter specification, using the wildcard * character ("*"). If null is specified, this is * equivalent to "*" and matches all files. * @param recurse If true, recurse into subdirectories. * Otherwise only return entries from the given directory. * @return An enumeration of URL objects for each matching entry, or * null if an entry could not be found or if the * caller does not have the appropriate * AdminPermission[this,RESOURCE], and the Java Runtime * Environment supports permissions. The URLs are sorted such that * entries from this bundle are returned first followed by the * entries from attached fragments in ascending bundle id order. If * this bundle is a fragment, then only matching entries in this * fragment are returned. * @since 1.3 */ public Enumeration findEntries(String path, String filePattern, boolean recurse); }PK L 3k 4OSGI-OPT/src/org/osgi/framework/BundleActivator.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/BundleActivator.java,v 1.9 2005/07/30 02:22:40 hargrave Exp $ * * Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; /** * Customizes the starting and stopping of a bundle. *

* BundleActivator is an interface that may be implemented when a * bundle is started or stopped. The Framework can create instances of a * bundle's BundleActivator as required. If an instance's * BundleActivator.start method executes successfully, it is * guaranteed that the same instance's BundleActivator.stop * method will be called when the bundle is to be stopped. * *

* BundleActivator is specified through the * Bundle-Activator Manifest header. A bundle can only specify a * single BundleActivator in the Manifest file. Fragment bundles * must not have a BundleActivator. The form of the Manifest * header is: * *

 *   Bundle-Activator: <i>class-name</i>
 * 
* * where class-name is a fully qualified Java classname. *

* The specified BundleActivator class must have a public * constructor that takes no parameters so that a BundleActivator * object can be created by Class.newInstance(). * * @version $Revision: 1.9 $ */ public interface BundleActivator { /** * Called when this bundle is started so the Framework can perform the * bundle-specific activities necessary to start this bundle. This method * can be used to register services or to allocate any resources that this * bundle needs. * *

* This method must complete and return to its caller in a timely manner. * * @param context The execution context of the bundle being started. * @throws java.lang.Exception If this method throws an exception, this * bundle is marked as stopped and the Framework will remove this * bundle's listeners, unregister all services registered by this * bundle, and release all services used by this bundle. * @see Bundle#start */ public void start(BundleContext context) throws Exception; /** * Called when this bundle is stopped so the Framework can perform the * bundle-specific activities necessary to stop the bundle. In general, this * method should undo the work that the BundleActivator.start * method started. There should be no active threads that were started by * this bundle when this bundle returns. A stopped bundle must not call any * Framework objects. * *

* This method must complete and return to its caller in a timely manner. * * @param context The execution context of the bundle being stopped. * @throws java.lang.Exception If this method throws an exception, the * bundle is still marked as stopped, and the Framework will remove * the bundle's listeners, unregister all services registered by the * bundle, and release all services used by the bundle. * @see Bundle#stop */ public void stop(BundleContext context) throws Exception; } PK L 3TW 2OSGI-OPT/src/org/osgi/framework/BundleContext.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/BundleContext.java,v 1.17 2005/08/11 03:07:30 hargrave Exp $ * * Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; import java.io.File; import java.io.InputStream; import java.util.Dictionary; /** * A bundle's execution context within the Framework. The context is used to * grant access to other methods so that this bundle can interact with the * Framework. * *

* BundleContext methods allow a bundle to: *

    *
  • Subscribe to events published by the Framework. *
  • Register service objects with the Framework service registry. *
  • Retrieve ServiceReferences from the Framework service * registry. *
  • Get and release service objects for a referenced service. *
  • Install new bundles in the Framework. *
  • Get the list of bundles installed in the Framework. *
  • Get the {@link Bundle} object for a bundle. *
  • Create File objects for files in a persistent storage * area provided for the bundle by the Framework. *
* *

* A BundleContext object will be created and provided to the * bundle associated with this context when it is started using the * {@link BundleActivator#start} method. The same BundleContext * object will be passed to the bundle associated with this context when it is * stopped using the {@link BundleActivator#stop} method. A * BundleContext object is generally for the private use of its * associated bundle and is not meant to be shared with other bundles in the * OSGi environment. * *

* The Bundle object associated with a BundleContext * object is called the context bundle. * *

* The BundleContext object is only valid during the execution of * its context bundle; that is, during the period from when the context bundle * is in the STARTING, STOPPING, and * ACTIVE bundle states. If the BundleContext * object is used subsequently, an IllegalStateException must be * thrown. The BundleContext object must never be reused after * its context bundle is stopped. * *

* The Framework is the only entity that can create BundleContext * objects and they are only valid within the Framework that created them. * * @version $Revision: 1.17 $ */ public interface BundleContext { /** * Returns the value of the specified property. If the key is not found in * the Framework properties, the system properties are then searched. The * method returns null if the property is not found. * *

* The Framework defines the following standard property keys: *

*
    *
  • {@link Constants#FRAMEWORK_VERSION} - The OSGi Framework version. *
  • *
  • {@link Constants#FRAMEWORK_VENDOR} - The Framework implementation * vendor.
  • *
  • {@link Constants#FRAMEWORK_LANGUAGE} - The language being used. See * ISO 639 for possible values.
  • *
  • {@link Constants#FRAMEWORK_OS_NAME} - The host computer operating * system.
  • *
  • {@link Constants#FRAMEWORK_OS_VERSION} - The host computer * operating system version number.
  • *
  • {@link Constants#FRAMEWORK_PROCESSOR} - The host computer processor * name.
  • *
*

* All bundles must have permission to read these properties. * *

* Note: The last four standard properties are used by the * {@link Constants#BUNDLE_NATIVECODE} Manifest header's * matching algorithm for selecting native language code. * * @param key The name of the requested property. * @return The value of the requested property, or null if * the property is undefined. * @throws java.lang.SecurityException If the caller does not have the * appropriate PropertyPermission to read the * property, and the Java Runtime Environment supports permissions. */ public String getProperty(String key); /** * Returns the Bundle object associated with this * BundleContext. This bundle is called the context bundle. * * @return The Bundle object associated with this * BundleContext. * @throws java.lang.IllegalStateException If this BundleContext is no * longer valid. */ public Bundle getBundle(); /** * Installs a bundle from the specified location string. A bundle is * obtained from location as interpreted by the Framework in * an implementation dependent manner. *

* Every installed bundle is uniquely identified by its location string, * typically in the form of a URL. * *

* The following steps are required to install a bundle: *

    *
  1. If a bundle containing the same location string is already * installed, the Bundle object for that bundle is returned. * *
  2. The bundle's content is read from the location string. If this * fails, a {@link BundleException} is thrown. * *
  3. The bundle's Bundle-NativeCode dependencies are * resolved. If this fails, a BundleException is thrown. * *
  4. The bundle's associated resources are allocated. The associated * resources minimally consist of a unique identifier and a persistent * storage area if the platform has file system support. If this step fails, * a BundleException is thrown. * *
  5. If the bundle has declared an Bundle-RequiredExecutionEnvironment * header, then the listed execution environments must be verified against * the installed execution environments. If they are not all present, a * BundleException must be thrown. * *
  6. The bundle's state is set to INSTALLED. * *
  7. A bundle event of type {@link BundleEvent#INSTALLED} is fired. * *
  8. The Bundle object for the newly or previously * installed bundle is returned. *
* * Postconditions, no exceptions thrown *
    *
  • getState() in {INSTALLED,RESOLVED}. *
  • Bundle has a unique ID. *
* Postconditions, when an exception is thrown *
    *
  • Bundle is not installed and no trace of the bundle exists. *
* * @param location The location identifier of the bundle to install. * @return The Bundle object of the installed bundle. * @throws BundleException If the installation failed. * @throws java.lang.SecurityException If the caller does not have the * appropriate AdminPermission[installed bundle,LIFECYCLE], and the * Java Runtime Environment supports permissions. * @throws java.lang.IllegalStateException If this BundleContext is no * longer valid. */ public Bundle installBundle(String location) throws BundleException; /** * Installs a bundle from the specified InputStream object. * *

* This method performs all of the steps listed in * BundleContext.installBundle(String location), except that * the bundle's content will be read from the InputStream * object. The location identifier string specified will be used as the * identity of the bundle. * *

* This method must always close the InputStream object, even * if an exception is thrown. * * @param location The location identifier of the bundle to install. * @param input The InputStream object from which this bundle * will be read. * @return The Bundle object of the installed bundle. * @throws BundleException If the provided stream cannot be read or the * installation failed. * @throws java.lang.SecurityException If the caller does not have the * appropriate AdminPermission[installed bundle,LIFECYCLE], and the * Java Runtime Environment supports permissions. * @throws java.lang.IllegalStateException If this BundleContext is no * longer valid. * @see #installBundle(java.lang.String) */ public Bundle installBundle(String location, InputStream input) throws BundleException; /** * Returns the bundle with the specified identifier. * * @param id The identifier of the bundle to retrieve. * @return A Bundle object or null if the * identifier does not match any installed bundle. */ public Bundle getBundle(long id); /** * Returns a list of all installed bundles. *

* This method returns a list of all bundles installed in the OSGi * environment at the time of the call to this method. However, since the * Framework is a very dynamic environment, bundles can be installed or * uninstalled at anytime. * * @return An array of Bundle objects, one object per * installed bundle. */ public Bundle[] getBundles(); /** * Adds the specified ServiceListener object with the * specified filter to the context bundle's list of * listeners. See {@link Filter} for a description of the filter syntax. * ServiceListener objects are notified when a service has a * lifecycle state change. * *

* If the context bundle's list of listeners already contains a listener * l such that (l==listener), then this * method replaces that listener's filter (which may be null) * with the specified one (which may be null). * *

* The listener is called if the filter criteria is met. To filter based * upon the class of the service, the filter should reference the * {@link Constants#OBJECTCLASS} property. If filter is * null, all services are considered to match the filter. * *

* When using a filter, it is possible that the * ServiceEvents for the complete lifecycle of a service * will not be delivered to the listener. For example, if the * filter only matches when the property x has * the value 1, the listener will not be called if the * service is registered with the property x not set to the * value 1. Subsequently, when the service is modified * setting property x to the value 1, the * filter will match and the listener will be called with a * ServiceEvent of type MODIFIED. Thus, the * listener will not be called with a ServiceEvent of type * REGISTERED. * *

* If the Java Runtime Environment supports permissions, the * ServiceListener object will be notified of a service event * only if the bundle that is registering it has the * ServicePermission to get the service using at least one of * the named classes the service was registered under. * * @param listener The ServiceListener object to be added. * @param filter The filter criteria. * * @throws InvalidSyntaxException If filter contains an * invalid filter string that cannot be parsed. * @throws java.lang.IllegalStateException If this BundleContext is no * longer valid. * * @see ServiceEvent * @see ServiceListener * @see ServicePermission */ public void addServiceListener(ServiceListener listener, String filter) throws InvalidSyntaxException; /** * Adds the specified ServiceListener object to the context * bundle's list of listeners. * *

* This method is the same as calling * BundleContext.addServiceListener(ServiceListener listener, * String filter) * with filter set to null. * * @param listener The ServiceListener object to be added. * @throws java.lang.IllegalStateException If this BundleContext is no * longer valid. * * @see #addServiceListener(ServiceListener, String) */ public void addServiceListener(ServiceListener listener); /** * Removes the specified ServiceListener object from the * context bundle's list of listeners. * *

* If listener is not contained in this context bundle's list * of listeners, this method does nothing. * * @param listener The ServiceListener to be removed. * @throws java.lang.IllegalStateException If this BundleContext is no * longer valid. */ public void removeServiceListener(ServiceListener listener); /** * Adds the specified BundleListener object to the context * bundle's list of listeners if not already present. BundleListener objects * are notified when a bundle has a lifecycle state change. * *

* If the context bundle's list of listeners already contains a listener * l such that (l==listener), this method * does nothing. * * @param listener The BundleListener to be added. * @throws java.lang.IllegalStateException If this BundleContext is no * longer valid. * @throws java.lang.SecurityException If listener is a * SynchronousBundleListener and the caller does not * have the appropriate AdminPermission[context bundle,LISTENER], * and the Java Runtime Environment supports permissions. * * @see BundleEvent * @see BundleListener */ public void addBundleListener(BundleListener listener); /** * Removes the specified BundleListener object from the * context bundle's list of listeners. * *

* If listener is not contained in the context bundle's list * of listeners, this method does nothing. * * @param listener The BundleListener object to be removed. * @throws java.lang.IllegalStateException If this BundleContext is no * longer valid. * @throws java.lang.SecurityException If listener is a * SynchronousBundleListener and the caller does not * have the appropriate AdminPermission[context bundle,LISTENER], * and the Java Runtime Environment supports permissions. */ public void removeBundleListener(BundleListener listener); /** * Adds the specified FrameworkListener object to the context * bundle's list of listeners if not already present. FrameworkListeners are * notified of general Framework events. * *

* If the context bundle's list of listeners already contains a listener * l such that (l==listener), this method * does nothing. * * @param listener The FrameworkListener object to be added. * @throws java.lang.IllegalStateException If this BundleContext is no * longer valid. * * @see FrameworkEvent * @see FrameworkListener */ public void addFrameworkListener(FrameworkListener listener); /** * Removes the specified FrameworkListener object from the * context bundle's list of listeners. * *

* If listener is not contained in the context bundle's list * of listeners, this method does nothing. * * @param listener The FrameworkListener object to be * removed. * @throws java.lang.IllegalStateException If this BundleContext is no * longer valid. */ public void removeFrameworkListener(FrameworkListener listener); /** * Registers the specified service object with the specified properties * under the specified class names into the Framework. A * ServiceRegistration object is returned. The * ServiceRegistration object is for the private use of the * bundle registering the service and should not be shared with other * bundles. The registering bundle is defined to be the context bundle. * Other bundles can locate the service by using either the * {@link #getServiceReferences} or {@link #getServiceReference} method. * *

* A bundle can register a service object that implements the * {@link ServiceFactory} interface to have more flexibility in providing * service objects to other bundles. * *

* The following steps are required to register a service: *

    *
  1. If service is not a ServiceFactory, * an IllegalArgumentException is thrown if * service is not an instanceof all the * classes named. *
  2. The Framework adds these service properties to the specified * Dictionary (which may be null): a property * named {@link Constants#SERVICE_ID} identifying the registration number of * the service and a property named {@link Constants#OBJECTCLASS} containing * all the specified classes. If any of these properties have already been * specified by the registering bundle, their values will be overwritten by * the Framework. *
  3. The service is added to the Framework service registry and may now * be used by other bundles. *
  4. A service event of type {@link ServiceEvent#REGISTERED} is * fired. *
  5. A ServiceRegistration object for this registration is * returned. *
* * @param clazzes The class names under which the service can be located. * The class names in this array will be stored in the service's * properties under the key {@link Constants#OBJECTCLASS}. * @param service The service object or a ServiceFactory * object. * @param properties The properties for this service. The keys in the * properties object must all be String objects. See * {@link Constants} for a list of standard service property keys. * Changes should not be made to this object after calling this * method. To update the service's properties the * {@link ServiceRegistration#setProperties} method must be called. * The set of properties may be null if the service * has no properties. * * @return A ServiceRegistration object for use by the bundle * registering the service to update the service's properties or to * unregister the service. * * @throws java.lang.IllegalArgumentException If one of the following is * true: *
    *
  • service is null. *
  • service is not a ServiceFactory * object and is not an instance of all the named classes in * clazzes. *
  • properties contains case variants of the same * key name. *
* * @throws java.lang.SecurityException If the caller does not have the * ServicePermission to register the service for all * the named classes and the Java Runtime Environment supports * permissions. * * @throws java.lang.IllegalStateException If this BundleContext is no * longer valid. * * @see ServiceRegistration * @see ServiceFactory */ public ServiceRegistration registerService(String[] clazzes, Object service, Dictionary properties); /** * Registers the specified service object with the specified properties * under the specified class name with the Framework. * *

* This method is otherwise identical to * {@link #registerService(java.lang.String[], java.lang.Object, * java.util.Dictionary)} and is provided as a convenience when * service will only be registered under a single class name. * Note that even in this case the value of the service's * {@link Constants#OBJECTCLASS} property will be an array of strings, * rather than just a single string. * * @param clazz The class name under which the service can be located. * @param service The service object or a ServiceFactory * object. * @param properties The properties for this service. * * @return A ServiceRegistration object for use by the bundle * registering the service to update the service's properties or to * unregister the service. * * @throws java.lang.IllegalStateException If this BundleContext is no * longer valid. * @see #registerService(java.lang.String[], java.lang.Object, * java.util.Dictionary) */ public ServiceRegistration registerService(String clazz, Object service, Dictionary properties); /** * Returns an array of ServiceReference objects. The returned * array of ServiceReference objects contains services that * were registered under the specified class, match the specified filter * criteria, and the packages for the class names under which the services * were registered match the context bundle's packages as defined in * {@link ServiceReference#isAssignableTo(Bundle, String)}. * *

* The list is valid at the time of the call to this method, however since * the Framework is a very dynamic environment, services can be modified or * unregistered at anytime. * *

* filter is used to select the registered service whose * properties objects contain keys and values which satisfy the filter. See * {@link Filter} for a description of the filter string syntax. * *

* If filter is null, all registered services * are considered to match the filter. If filter cannot be * parsed, an {@link InvalidSyntaxException} will be thrown with a human * readable message where the filter became unparsable. * *

* The following steps are required to select a set of * ServiceReference objects: *

    *
  1. If the filter string is not null, the filter string * is parsed and the set ServiceReference objects of * registered services that satisfy the filter is produced. If the filter * string is null, then all registered services are * considered to satisfy the filter. *
  2. If the Java Runtime Environment supports permissions, the set of * ServiceReference objects produced by the previous step is * reduced by checking that the caller has the * ServicePermission to get at least one of the class names * under which the service was registered. If the caller does not have the * correct permission for a particular ServiceReference * object, then it is removed from the set. *
  3. If clazz is not null, the set is * further reduced to those services that are an instanceof * and were registered under the specified class. The complete list of * classes of which a service is an instance and which were specified when * the service was registered is available from the service's * {@link Constants#OBJECTCLASS} property. *
  4. The set is reduced one final time by cycling through each * ServiceReference object and calling * {@link ServiceReference#isAssignableTo(Bundle, String)} with the context * bundle and each class name under which the ServiceReference * object was registered. For any given ServiceReference * object, if any call to * {@link ServiceReference#isAssignableTo(Bundle, String)} returns * false, then it is removed from the set of * ServiceReference objects. *
  5. An array of the remaining ServiceReference objects is * returned. *
* * @param clazz The class name with which the service was registered or * null for all services. * @param filter The filter criteria. * @return An array of ServiceReference objects or * null if no services are registered which satisfy * the search. * @throws InvalidSyntaxException If filter contains an * invalid filter string that cannot be parsed. * @throws java.lang.IllegalStateException If this BundleContext is no * longer valid. */ public ServiceReference[] getServiceReferences(String clazz, String filter) throws InvalidSyntaxException; /** * Returns an array of ServiceReference objects. The returned * array of ServiceReference objects contains services that * were registered under the specified class and match the specified filter * criteria. * *

* The list is valid at the time of the call to this method, however since * the Framework is a very dynamic environment, services can be modified or * unregistered at anytime. * *

* filter is used to select the registered service whose * properties objects contain keys and values which satisfy the filter. See * {@link Filter} for a description of the filter string syntax. * *

* If filter is null, all registered services * are considered to match the filter. If filter cannot be * parsed, an {@link InvalidSyntaxException} will be thrown with a human * readable message where the filter became unparsable. * *

* The following steps are required to select a set of * ServiceReference objects: *

    *
  1. If the filter string is not null, the filter string * is parsed and the set ServiceReference objects of * registered services that satisfy the filter is produced. If the filter * string is null, then all registered services are * considered to satisfy the filter. *
  2. If the Java Runtime Environment supports permissions, the set of * ServiceReference objects produced by the previous step is * reduced by checking that the caller has the * ServicePermission to get at least one of the class names * under which the service was registered. If the caller does not have the * correct permission for a particular ServiceReference * object, then it is removed from the set. *
  3. If clazz is not null, the set is * further reduced to those services that are an instanceof * and were registered under the specified class. The complete list of * classes of which a service is an instance and which were specified when * the service was registered is available from the service's * {@link Constants#OBJECTCLASS} property. *
  4. An array of the remaining ServiceReference objects is * returned. *
* * @param clazz The class name with which the service was registered or * null for all services. * @param filter The filter criteria. * @return An array of ServiceReference objects or * null if no services are registered which satisfy * the search. * @throws InvalidSyntaxException If filter contains an * invalid filter string that cannot be parsed. * @throws java.lang.IllegalStateException If this BundleContext is no * longer valid. * @since 1.3 */ public ServiceReference[] getAllServiceReferences(String clazz, String filter) throws InvalidSyntaxException; /** * Returns a ServiceReference object for a service that * implements and was registered under the specified class. * *

* This ServiceReference object is valid at the time of the * call to this method, however as the Framework is a very dynamic * environment, services can be modified or unregistered at anytime. * *

* This method is the same as calling * {@link BundleContext#getServiceReferences(String, String)} with a * null filter string. It is provided as a convenience for * when the caller is interested in any service that implements the * specified class. *

* If multiple such services exist, the service with the highest ranking (as * specified in its {@link Constants#SERVICE_RANKING} property) is returned. *

* If there is a tie in ranking, the service with the lowest service ID (as * specified in its {@link Constants#SERVICE_ID} property); that is, the * service that was registered first is returned. * * @param clazz The class name with which the service was registered. * @return A ServiceReference object, or null * if no services are registered which implement the named class. * @throws java.lang.IllegalStateException If this BundleContext is no * longer valid. * @see #getServiceReferences(String, String) */ public ServiceReference getServiceReference(String clazz); /** * Returns the specified service object for a service. *

* A bundle's use of a service is tracked by the bundle's use count of that * service. Each time a service's service object is returned by * {@link #getService(ServiceReference)} the context bundle's use count for * that service is incremented by one. Each time the service is released by * {@link #ungetService(ServiceReference)} the context bundle's use count * for that service is decremented by one. *

* When a bundle's use count for a service drops to zero, the bundle should * no longer use that service. * *

* This method will always return null when the service * associated with this reference has been unregistered. * *

* The following steps are required to get the service object: *

    *
  1. If the service has been unregistered, null is * returned. *
  2. The context bundle's use count for this service is incremented by * one. *
  3. If the context bundle's use count for the service is currently one * and the service was registered with an object implementing the * ServiceFactory interface, the * {@link ServiceFactory#getService(Bundle, ServiceRegistration)} method is * called to create a service object for the context bundle. This service * object is cached by the Framework. While the context bundle's use count * for the service is greater than zero, subsequent calls to get the * services's service object for the context bundle will return the cached * service object.
    * If the service object returned by the ServiceFactory * object is not an instanceof all the classes named when the * service was registered or the ServiceFactory object throws * an exception, null is returned and a Framework event of * type {@link FrameworkEvent#ERROR} is fired. *
  4. The service object for the service is returned. *
* * @param reference A reference to the service. * @return A service object for the service associated with * reference or null if the service is * not registered or does not implement the classes under which it * was registered in the case of a ServiceFactory. * @throws java.lang.SecurityException If the caller does not have the * ServicePermission to get the service using at * least one of the named classes the service was registered under * and the Java Runtime Environment supports permissions. * @throws java.lang.IllegalStateException If this BundleContext is no * longer valid. * @see #ungetService(ServiceReference) * @see ServiceFactory */ public Object getService(ServiceReference reference); /** * Releases the service object referenced by the specified * ServiceReference object. If the context bundle's use count * for the service is zero, this method returns false. * Otherwise, the context bundle's use count for the service is decremented * by one. * *

* The service's service object should no longer be used and all references * to it should be destroyed when a bundle's use count for the service drops * to zero. * *

* The following steps are required to unget the service object: *

    *
  1. If the context bundle's use count for the service is zero or the * service has been unregistered, false is returned. *
  2. The context bundle's use count for this service is decremented by * one. *
  3. If the context bundle's use count for the service is currently zero * and the service was registered with a ServiceFactory * object, the * {@link ServiceFactory#ungetService(Bundle, ServiceRegistration, Object)} * method is called to release the service object for the context bundle. *
  4. true is returned. *
* * @param reference A reference to the service to be released. * @return false if the context bundle's use count for the * service is zero or if the service has been unregistered; * true otherwise. * @throws java.lang.IllegalStateException If this BundleContext is no * longer valid. * @see #getService * @see ServiceFactory */ public boolean ungetService(ServiceReference reference); /** * Creates a File object for a file in the persistent storage * area provided for the bundle by the Framework. This method will return * null if the platform does not have file system support. * *

* A File object for the base directory of the persistent * storage area provided for the context bundle by the Framework can be * obtained by calling this method with an empty string as * filename. * *

* If the Java Runtime Environment supports permissions, the Framework will * ensure that the bundle has the java.io.FilePermission with * actions read,write,delete * for all files (recursively) in the persistent storage area provided for * the context bundle. * * @param filename A relative name to the file to be accessed. * @return A File object that represents the requested file * or null if the platform does not have file system * support. * @throws java.lang.IllegalStateException If this BundleContext is no * longer valid. */ public File getDataFile(String filename); /** * Creates a Filter object. This Filter object * may be used to match a ServiceReference object or a * Dictionary object. * *

* If the filter cannot be parsed, an {@link InvalidSyntaxException} will be * thrown with a human readable message where the filter became unparsable. * * @param filter The filter string. * @return A Filter object encapsulating the filter string. * @throws InvalidSyntaxException If filter contains an * invalid filter string that cannot be parsed. * @throws NullPointerException If filter is null. * @throws java.lang.IllegalStateException If this BundleContext is no * longer valid. * * @since 1.1 * @see "Framework specification for a description of the filter string syntax." * @see FrameworkUtil#createFilter(String) */ public Filter createFilter(String filter) throws InvalidSyntaxException; } PK L 3g0OSGI-OPT/src/org/osgi/framework/BundleEvent.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/BundleEvent.java,v 1.13 2005/08/05 03:22:00 hargrave Exp $ * * Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; import java.util.EventObject; /** * An event from the Framework describing a bundle lifecycle change. *

* BundleEvent objects are delivered to * BundleListener objects when a change occurs in a bundle's * lifecycle. A type code is used to identify the event type for future * extendability. * *

* OSGi Alliance reserves the right to extend the set of types. * * @version $Revision: 1.13 $ */ public class BundleEvent extends EventObject { static final long serialVersionUID = 4080640865971756012L; /** * Bundle that had a change occur in its lifecycle. */ private Bundle bundle; /** * Type of bundle lifecycle change. */ private int type; /** * The bundle has been installed. *

* The value of INSTALLED is 0x00000001. * * @see BundleContext#installBundle(String) */ public final static int INSTALLED = 0x00000001; /** * The bundle has been started. *

* The value of STARTED is 0x00000002. * * @see Bundle#start */ public final static int STARTED = 0x00000002; /** * The bundle has been stopped. *

* The value of STOPPED is 0x00000004. * * @see Bundle#stop */ public final static int STOPPED = 0x00000004; /** * The bundle has been updated. *

* The value of UPDATED is 0x00000008. * * @see Bundle#update() */ public final static int UPDATED = 0x00000008; /** * The bundle has been uninstalled. *

* The value of UNINSTALLED is 0x00000010. * * @see Bundle#uninstall */ public final static int UNINSTALLED = 0x00000010; /** * The bundle has been resolved. *

* The value of RESOLVED is 0x00000020. * * @see Bundle#RESOLVED * @since 1.3 */ public final static int RESOLVED = 0x00000020; /** * The bundle has been unresolved. *

* The value of UNRESOLVED is 0x00000040. * * @see Bundle#INSTALLED * @since 1.3 */ public final static int UNRESOLVED = 0x00000040; /** * The bundle is about to start. *

* The value of STARTING is 0x00000080. * * @see Bundle#start() * @since 1.3 */ public final static int STARTING = 0x00000080; /** * The bundle is about to stop. *

* The value of STOPPING is 0x00000100. * * @see Bundle#stop() * @since 1.3 */ public final static int STOPPING = 0x00000100; /** * Creates a bundle event of the specified type. * * @param type The event type. * @param bundle The bundle which had a lifecycle change. */ public BundleEvent(int type, Bundle bundle) { super(bundle); this.bundle = bundle; this.type = type; } /** * Returns the bundle which had a lifecycle change. This bundle is the * source of the event. * * @return The bundle that had a change occur in its lifecycle. */ public Bundle getBundle() { return bundle; } /** * Returns the type of lifecyle event. The type values are: *

    *
  • {@link #INSTALLED} *
  • {@link #RESOLVED} *
  • {@link #STARTING} *
  • {@link #STARTED} *
  • {@link #STOPPING} *
  • {@link #STOPPED} *
  • {@link #UPDATED} *
  • {@link #UNRESOLVED} *
  • {@link #UNINSTALLED} *
* * @return The type of lifecycle event. */ public int getType() { return type; } }PK L 3  4OSGI-OPT/src/org/osgi/framework/BundleException.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/BundleException.java,v 1.12 2005/08/11 03:07:30 hargrave Exp $ * * Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; /** * A Framework exception used to indicate that a bundle lifecycle problem * occurred. * *

* BundleException object is created by the Framework to denote * an exception condition in the lifecycle of a bundle. * BundleExceptions should not be created by bundle developers. * *

* This exception is updated to conform to the general purpose exception * chaining mechanism. * * @version $Revision: 1.12 $ */ public class BundleException extends Exception { static final long serialVersionUID = 3571095144220455665L; /** * Nested exception. */ private Throwable cause; /** * Creates a BundleException that wraps another exception. * * @param msg The associated message. * @param cause The cause of this exception. */ public BundleException(String msg, Throwable cause) { super(msg); this.cause = cause; } /** * Creates a BundleException object with the specified * message. * * @param msg The message. */ public BundleException(String msg) { super(msg); this.cause = null; } /** * Returns any nested exceptions included in this exception. * *

* This method predates the general purpose exception chaining mechanism. * The {@link #getCause()} method is now the preferred means of obtaining * this information. * * @return The nested exception; null if there is no nested * exception. */ public Throwable getNestedException() { return cause; } /** * Returns the cause of this exception or null if no cause * was specified when this exception was created. * * @return The cause of this exception or null if no cause * was specified. * @since 1.3 */ public Throwable getCause() { return cause; } /** * The cause of this exception can only be set when constructed. * * @param cause Cause of the exception. * @return This object. * @throws java.lang.IllegalStateException This method will always throw an * IllegalStateException since the cause of this * exception can only be set when constructed. * @since 1.3 */ public Throwable initCause(Throwable cause) { throw new IllegalStateException(); } }PK L 3'S3OSGI-OPT/src/org/osgi/framework/BundleListener.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/BundleListener.java,v 1.9 2005/08/05 03:22:00 hargrave Exp $ * * Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; import java.util.EventListener; /** * A BundleEvent listener. When a BundleEvent is * fired, it is asynchronously delivered to a BundleListener. * *

* BundleListener is a listener interface that may be implemented * by a bundle developer. *

* A BundleListener object is registered with the Framework using * the {@link BundleContext#addBundleListener} method. * BundleListeners are called with a BundleEvent * object when a bundle has been installed, resolved, started, stopped, updated, * unresolved, or uninstalled. * * @version $Revision: 1.9 $ * @see BundleEvent */ public interface BundleListener extends EventListener { /** * Receives notification that a bundle has had a lifecycle change. * * @param event The BundleEvent. */ public void bundleChanged(BundleEvent event); } PK L 3.;d&>&>5OSGI-OPT/src/org/osgi/framework/BundlePermission.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/BundlePermission.java,v 1.13 2005/08/03 01:31:53 hargrave Exp $ * * Copyright (c) OSGi Alliance (2004, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; import java.io.IOException; import java.security.*; import java.util.Enumeration; import java.util.Hashtable; /** * A bundle's authority to require or provide a bundle or to receive or attach * fragments. * *

* A bundle symbolic name defines a unique fully qualified name. *

* For example: * *

 * 
 * org.osgi.example.bundle
 * 
 * 
* *

* BundlePermission has four actions: PROVIDE, * REQUIRE,HOST, and FRAGMENT. * The PROVIDE action implies the REQUIRE action. * * @since 1.3 */ public final class BundlePermission extends BasicPermission { private static final long serialVersionUID = 3257846601685873716L; /** * The action string provide. */ public final static String PROVIDE = "provide"; /** * The action string require. */ public final static String REQUIRE = "require"; /** * The action string host. */ public final static String HOST = "host"; /** * The action string fragment. */ public final static String FRAGMENT = "fragment"; private final static int ACTION_PROVIDE = 0x00000001; private final static int ACTION_REQUIRE = 0x00000002; private final static int ACTION_HOST = 0x00000004; private final static int ACTION_FRAGMENT = 0x00000008; private final static int ACTION_ALL = ACTION_PROVIDE | ACTION_REQUIRE | ACTION_HOST | ACTION_FRAGMENT; private final static int ACTION_NONE = 0; /** * The actions mask. */ private transient int action_mask = ACTION_NONE; /** * The actions in canonical form. * * @serial */ private String actions = null; /** * Defines the authority to provide and/or require and or specify a host * fragment symbolic name within the OSGi environment. *

* Bundle Permissions are granted over all possible versions of a bundle. * * A bundle that needs to provide a bundle must have the appropriate * BundlePermission for the symbolic name; a bundle that * requires a bundle must have the appropriate BundlePermssion * for that symbolic name; a bundle that specifies a fragment host must have * the appropriate BundlePermission for that symbolic name. * * @param symbolicName the bundle symbolic name. * @param actions PROVIDE,REQUIRE, * HOST,FRAGMENT (canonical order). */ public BundlePermission(String symbolicName, String actions) { this(symbolicName, getMask(actions)); } /** * Bundle private constructor used by BundlePermissionCollection. * * @param symbolicName the bundle symbolic name * @param mask the action mask */ BundlePermission(String symbolicName, int mask) { super(symbolicName); init(mask); } /** * Called by constructors and when deserialized. * * @param mask */ private void init(int mask) { if ((mask == ACTION_NONE) || ((mask & ACTION_ALL) != mask)) { throw new IllegalArgumentException("invalid action string"); } action_mask = mask; } /** * Parse action string into action mask. * * @param actions Action string. * @return action mask. */ private static int getMask(String actions) { boolean seencomma = false; int mask = ACTION_NONE; if (actions == null) { return (mask); } char[] a = actions.toCharArray(); int i = a.length - 1; if (i < 0) return (mask); while (i != -1) { char c; // skip whitespace while ((i != -1) && ((c = a[i]) == ' ' || c == '\r' || c == '\n' || c == '\f' || c == '\t')) i--; // check for the known strings int matchlen; if (i >= 6 && (a[i - 6] == 'p' || a[i - 6] == 'P') && (a[i - 5] == 'r' || a[i - 5] == 'R') && (a[i - 4] == 'o' || a[i - 4] == 'O') && (a[i - 3] == 'v' || a[i - 3] == 'V') && (a[i - 2] == 'i' || a[i - 2] == 'I') && (a[i - 1] == 'd' || a[i - 1] == 'D') && (a[i] == 'e' || a[i] == 'E')) { matchlen = 7; mask |= ACTION_PROVIDE | ACTION_REQUIRE; } else if (i >= 6 && (a[i - 6] == 'r' || a[i - 6] == 'R') && (a[i - 5] == 'e' || a[i - 5] == 'E') && (a[i - 4] == 'q' || a[i - 4] == 'Q') && (a[i - 3] == 'u' || a[i - 3] == 'U') && (a[i - 2] == 'i' || a[i - 2] == 'I') && (a[i - 1] == 'r' || a[i - 1] == 'R') && (a[i] == 'e' || a[i] == 'E')) { matchlen = 7; mask |= ACTION_REQUIRE; } else if (i >= 3 && (a[i - 3] == 'h' || a[i - 3] == 'H') && (a[i - 2] == 'o' || a[i - 2] == 'O') && (a[i - 1] == 's' || a[i - 1] == 'S') && (a[i] == 't' || a[i] == 'T')) { matchlen = 4; mask |= ACTION_HOST; } else if (i >= 7 && (a[i - 7] == 'f' || a[i - 7] == 'F') && (a[i - 6] == 'r' || a[i - 6] == 'R') && (a[i - 5] == 'a' || a[i - 5] == 'A') && (a[i - 4] == 'g' || a[i - 4] == 'G') && (a[i - 3] == 'm' || a[i - 3] == 'M') && (a[i - 2] == 'e' || a[i - 2] == 'E') && (a[i - 1] == 'n' || a[i - 1] == 'N') && (a[i] == 't' || a[i] == 'T')) { matchlen = 8; mask |= ACTION_FRAGMENT; } else { // parse error throw new IllegalArgumentException( "invalid permission: " + actions); } // make sure we didn't just match the tail of a word // like "ackbarfrequire". Also, skip to the comma. seencomma = false; while (i >= matchlen && !seencomma) { switch (a[i - matchlen]) { case ',' : seencomma = true; /* FALLTHROUGH */ case ' ' : case '\r' : case '\n' : case '\f' : case '\t' : break; default : throw new IllegalArgumentException( "invalid permission: " + actions); } i--; } // point i at the location of the comma minus one (or -1). i -= matchlen; } if (seencomma) { throw new IllegalArgumentException("invalid permission: " + actions); } return (mask); } /** * Determines if the specified permission is implied by this object. * *

* This method checks that the symbolic name of the target is implied by the * symbolic name of this object. The list of BundlePermission * actions must either match or allow for the list of the target object to * imply the target BundlePermission action. *

* The permission to provide a bundle implies the permission to require the * named symbolic name. * *

	 *       x.y.*,"provide" -> x.y.z,"provide" is true
	 *       *,"require" -> x.y, "require"      is true
	 *       *,"provide" -> x.y, "require"      is true
	 *       x.y,"provide" -> x.y.z, "provide"  is false
	 * 
* * @param p The target permission to interrogate. * @return true if the specified * BundlePermission action is implied by this object; * false otherwise. */ public boolean implies(Permission p) { if (p instanceof BundlePermission) { BundlePermission target = (BundlePermission) p; return (((action_mask & target.action_mask) == target.action_mask) && super .implies(p)); } return (false); } /** * Returns the canonical string representation of the * BundlePermission actions. * *

* Always returns present BundlePermission actions in the * following order: PROVIDE,REQUIRE, * HOST,FRAGMENT. * @return Canonical string representation of the BundlePermission actions. */ public String getActions() { if (actions == null) { StringBuffer sb = new StringBuffer(); boolean comma = false; if ((action_mask & ACTION_PROVIDE) == ACTION_PROVIDE) { sb.append(PROVIDE); comma = true; } if ((action_mask & ACTION_REQUIRE) == ACTION_REQUIRE) { if (comma) sb.append(','); sb.append(REQUIRE); comma = true; } if ((action_mask & ACTION_HOST) == ACTION_HOST) { if (comma) sb.append(','); sb.append(HOST); comma = true; } if ((action_mask & ACTION_FRAGMENT) == ACTION_FRAGMENT) { if (comma) sb.append(','); sb.append(FRAGMENT); } actions = sb.toString(); } return (actions); } /** * Returns a new PermissionCollection object suitable for * storing BundlePermission objects. * * @return A new PermissionCollection object. */ public PermissionCollection newPermissionCollection() { return (new BundlePermissionCollection()); } /** * Determines the equality of two BundlePermission objects. * * This method checks that specified bundle has the same bundle symbolic * name and BundlePermission actions as this * BundlePermission object. * * @param obj The object to test for equality with this * BundlePermission object. * @return true if obj is a * BundlePermission, and has the same bundle * symbolic name and actions as this BundlePermission * object; false otherwise. */ public boolean equals(Object obj) { if (obj == this) { return (true); } if (!(obj instanceof BundlePermission)) { return (false); } BundlePermission p = (BundlePermission) obj; return ((action_mask == p.action_mask) && getName().equals(p.getName())); } /** * Returns the hash code value for this object. * * @return A hash code value for this object. */ public int hashCode() { return (getName().hashCode() ^ getActions().hashCode()); } /** * Returns the current action mask. *

* Used by the BundlePermissionCollection class. * * @return Current action mask. */ int getMask() { return (action_mask); } /** * WriteObject is called to save the state of the * BundlePermission object to a stream. The actions are * serialized, and the superclass takes care of the name. */ private synchronized void writeObject(java.io.ObjectOutputStream s) throws IOException { // Write out the actions. The superclass takes care of the name // call getActions to make sure actions field is initialized if (actions == null) getActions(); s.defaultWriteObject(); } /** * readObject is called to restore the state of the BundlePermission from a * stream. */ private synchronized void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException { // Read in the action, then initialize the rest s.defaultReadObject(); init(getMask(actions)); } } /** * Stores a set of BundlePermission permissions. * * @see java.security.Permission * @see java.security.Permissions * @see java.security.PermissionCollection */ final class BundlePermissionCollection extends PermissionCollection { /** * Comment for serialVersionUID */ private static final long serialVersionUID = 3258407326846433079L; /** * Table of permissions. * * @serial */ private Hashtable permissions; /** * Boolean saying if "*" is in the collection. * * @serial */ private boolean all_allowed; /** * Create an empty BundlePermissions object. * */ public BundlePermissionCollection() { permissions = new Hashtable(); all_allowed = false; } /** * Adds a permission to the BundlePermission objects. The key * for the hash is the symbolic name. * * @param permission The BundlePermission object to add. * * @throws IllegalArgumentException If the permission is not a * BundlePermission instance. * @throws SecurityException If this BundlePermissionCollection * object has been marked read-only. */ public void add(Permission permission) { if (!(permission instanceof BundlePermission)) throw new IllegalArgumentException("invalid permission: " + permission); if (isReadOnly()) throw new SecurityException("attempt to add a Permission to a " + "readonly PermissionCollection"); BundlePermission bp = (BundlePermission) permission; String name = bp.getName(); BundlePermission existing = (BundlePermission) permissions.get(name); if (existing != null) { int oldMask = existing.getMask(); int newMask = bp.getMask(); if (oldMask != newMask) { permissions.put(name, new BundlePermission(name, oldMask | newMask)); } } else { permissions.put(name, permission); } if (!all_allowed) { if (name.equals("*")) all_allowed = true; } } /** * Determines if the specified permissions implies the permissions expressed * in permission. * * @param permission The Permission object to compare with this * BundlePermission object. * * @return true if permission is a proper * subset of a permission in the set; false * otherwise. */ public boolean implies(Permission permission) { if (!(permission instanceof BundlePermission)) return (false); BundlePermission bp = (BundlePermission) permission; BundlePermission x; int desired = bp.getMask(); int effective = 0; // short circuit if the "*" Permission was added if (all_allowed) { x = (BundlePermission) permissions.get("*"); if (x != null) { effective |= x.getMask(); if ((effective & desired) == desired) return (true); } } // strategy: // Check for full match first. Then work our way up the // name looking for matches on a.b.* String name = bp.getName(); x = (BundlePermission) permissions.get(name); if (x != null) { // we have a direct hit! effective |= x.getMask(); if ((effective & desired) == desired) return (true); } // work our way up the tree... int last, offset; offset = name.length() - 1; while ((last = name.lastIndexOf(".", offset)) != -1) { name = name.substring(0, last + 1) + "*"; x = (BundlePermission) permissions.get(name); if (x != null) { effective |= x.getMask(); if ((effective & desired) == desired) return (true); } offset = last - 1; } // we don't have to check for "*" as it was already checked // at the top (all_allowed), so we just return false return (false); } /** * Returns an enumeration of all BundlePermission objects in * the container. * * @return Enumeration of all BundlePermission objects. */ public Enumeration elements() { return (permissions.elements()); } } PK L 3 11OSGI-OPT/src/org/osgi/framework/Configurable.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/Configurable.java,v 1.8 2005/07/30 02:22:41 hargrave Exp $ * * Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; /** * Supports a configuration object. * *

* Configurable is an interface that should be used by a bundle * developer in support of a configurable service. Bundles that need to * configure a service may test to determine if the service object is an * instanceof Configurable. * * @version $Revision: 1.8 $ * @deprecated Since 1.2. Please use Configuration Admin service. */ public interface Configurable { /** * Returns this service's configuration object. * *

* Services implementing Configurable should take care when * returning a service configuration object since this object is probably * sensitive. *

* If the Java Runtime Environment supports permissions, it is recommended * that the caller is checked for some appropriate permission before * returning the configuration object. * * @return The configuration object for this service. * @throws java.lang.SecurityException If the caller does not have an * appropriate permission and the Java Runtime Environment supports * permissions. * @deprecated Since 1.2. Please use Configuration Admin service. */ public Object getConfigurationObject(); } PK L 3,::.OSGI-OPT/src/org/osgi/framework/Constants.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/Constants.java,v 1.22 2005/08/11 18:26:02 hargrave Exp $ * * Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; /** * Defines standard names for the OSGi environment property, service property, * and Manifest header attribute keys. * *

* The values associated with these keys are of type * java.lang.String, unless otherwise indicated. * * @version $Revision: 1.22 $ * @since 1.1 */ public interface Constants { /** * Location identifier of the OSGi system bundle , which is defined * to be "System Bundle". */ public static final String SYSTEM_BUNDLE_LOCATION = "System Bundle"; /** * Alias for the symbolic name of the OSGi system bundle . It is * defined to be "system.bundle". * * @since 1.3 */ public static final String SYSTEM_BUNDLE_SYMBOLICNAME = "system.bundle"; /** * Manifest header (named "Bundle-Category") identifying the * bundle's category. *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. */ public static final String BUNDLE_CATEGORY = "Bundle-Category"; /** * Manifest header (named "Bundle-ClassPath") identifying a list * of directories and embedded JAR files, which are bundle resources used to * extend the bundle's classpath. * *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. */ public static final String BUNDLE_CLASSPATH = "Bundle-ClassPath"; /** * Manifest header (named "Bundle-Copyright") identifying the * bundle's copyright information. *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. */ public static final String BUNDLE_COPYRIGHT = "Bundle-Copyright"; /** * Manifest header (named "Bundle-Description") containing a brief * description of the bundle's functionality. *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. */ public static final String BUNDLE_DESCRIPTION = "Bundle-Description"; /** * Manifest header (named "Bundle-Name") identifying the bundle's * name. *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. */ public static final String BUNDLE_NAME = "Bundle-Name"; /** * Manifest header (named "Bundle-NativeCode") identifying a * number of hardware environments and the native language code libraries * that the bundle is carrying for each of these environments. * *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. */ public static final String BUNDLE_NATIVECODE = "Bundle-NativeCode"; /** * Manifest header (named "Export-Package") identifying the * packages that the bundle offers to the Framework for export. * *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. */ public static final String EXPORT_PACKAGE = "Export-Package"; /** * Manifest header (named "Export-Service") identifying the fully * qualified class names of the services that the bundle may register (used * for informational purposes only). * *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. */ public static final String EXPORT_SERVICE = "Export-Service"; /** * Manifest header (named "Import-Package") identifying the * packages on which the bundle depends. * *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. */ public static final String IMPORT_PACKAGE = "Import-Package"; /** * Manifest header (named "DynamicImport-Package") identifying the * packages that the bundle may dynamically import during execution. * *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. * * @since 1.2 */ public static final String DYNAMICIMPORT_PACKAGE = "DynamicImport-Package"; /** * Manifest header (named "Import-Service") identifying the fully * qualified class names of the services that the bundle requires (used for * informational purposes only). * *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. */ public static final String IMPORT_SERVICE = "Import-Service"; /** * Manifest header (named "Bundle-Vendor") identifying the * bundle's vendor. * *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. */ public static final String BUNDLE_VENDOR = "Bundle-Vendor"; /** * Manifest header (named "Bundle-Version") identifying the * bundle's version. * *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. */ public static final String BUNDLE_VERSION = "Bundle-Version"; /** * Manifest header (named "Bundle-DocURL") identifying the * bundle's documentation URL, from which further information about the * bundle may be obtained. * *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. */ public static final String BUNDLE_DOCURL = "Bundle-DocURL"; /** * Manifest header (named "Bundle-ContactAddress") identifying the * contact address where problems with the bundle may be reported; for * example, an email address. * *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. */ public static final String BUNDLE_CONTACTADDRESS = "Bundle-ContactAddress"; /** * Manifest header attribute (named "Bundle-Activator") * identifying the bundle's activator class. * *

* If present, this header specifies the name of the bundle resource class * that implements the BundleActivator interface and whose * start and stop methods are called by the * Framework when the bundle is started and stopped, respectively. * *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. */ public static final String BUNDLE_ACTIVATOR = "Bundle-Activator"; /** * Manifest header (named "Bundle-UpdateLocation") identifying the * location from which a new bundle version is obtained during a bundle * update operation. * *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. */ public static final String BUNDLE_UPDATELOCATION = "Bundle-UpdateLocation"; /** * Manifest header attribute (named "specification-version") * identifying the version of a package specified in the Export-Package or * Import-Package manifest header. * *

* The attribute value is encoded in the Export-Package or Import-Package * manifest header like: * *

	 *   Import-Package: org.osgi.framework ; specification-version="1.1"
	 * 
* * @deprecated Since 1.3. This has been replaced by * {@link #VERSION_ATTRIBUTE}. */ public static final String PACKAGE_SPECIFICATION_VERSION = "specification-version"; /** * Manifest header attribute (named "processor") identifying the * processor required to run native bundle code specified in the * Bundle-NativeCode manifest header). * *

* The attribute value is encoded in the Bundle-NativeCode manifest header * like: * *

	 *   Bundle-NativeCode: http.so ; processor=x86 ...
	 * 
*/ public static final String BUNDLE_NATIVECODE_PROCESSOR = "processor"; /** * Manifest header attribute (named "osname") identifying the * operating system required to run native bundle code specified in the * Bundle-NativeCode manifest header). *

* The attribute value is encoded in the Bundle-NativeCode manifest header * like: * *

	 *   Bundle-NativeCode: http.so ; osname=Linux ...
	 * 
*/ public static final String BUNDLE_NATIVECODE_OSNAME = "osname"; /** * Manifest header attribute (named "osversion") identifying the * operating system version required to run native bundle code specified in * the Bundle-NativeCode manifest header). *

* The attribute value is encoded in the Bundle-NativeCode manifest header * like: * *

	 *   Bundle-NativeCode: http.so ; osversion="2.34" ...
	 * 
*/ public static final String BUNDLE_NATIVECODE_OSVERSION = "osversion"; /** * Manifest header attribute (named "language") identifying the * language in which the native bundle code is written specified in the * Bundle-NativeCode manifest header. See ISO 639 for possible values. *

* The attribute value is encoded in the Bundle-NativeCode manifest header * like: * *

	 *   Bundle-NativeCode: http.so ; language=nl_be ...
	 * 
*/ public static final String BUNDLE_NATIVECODE_LANGUAGE = "language"; /** * Manifest header (named "Bundle-RequiredExecutionEnvironment") * identifying the required execution environment for the bundle. The * service platform may run this bundle if any of the execution environments * named in this header matches one of the execution environments it * implements. * *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. * * @since 1.2 */ public static final String BUNDLE_REQUIREDEXECUTIONENVIRONMENT = "Bundle-RequiredExecutionEnvironment"; /* * Framework environment properties. */ /** * Framework environment property (named * "org.osgi.framework.version") identifying the Framework * version. * *

* The value of this property may be retrieved by calling the * BundleContext.getProperty method. */ public static final String FRAMEWORK_VERSION = "org.osgi.framework.version"; /** * Framework environment property (named * "org.osgi.framework.vendor") identifying the Framework * implementation vendor. * *

* The value of this property may be retrieved by calling the * BundleContext.getProperty method. */ public static final String FRAMEWORK_VENDOR = "org.osgi.framework.vendor"; /** * Framework environment property (named * "org.osgi.framework.language") identifying the Framework * implementation language (see ISO 639 for possible values). * *

* The value of this property may be retrieved by calling the * BundleContext.getProperty method. */ public static final String FRAMEWORK_LANGUAGE = "org.osgi.framework.language"; /** * Framework environment property (named * "org.osgi.framework.os.name") identifying the Framework * host-computer's operating system. * *

* The value of this property may be retrieved by calling the * BundleContext.getProperty method. */ public static final String FRAMEWORK_OS_NAME = "org.osgi.framework.os.name"; /** * Framework environment property (named * "org.osgi.framework.os.version") identifying the Framework * host-computer's operating system version number. * *

* The value of this property may be retrieved by calling the * BundleContext.getProperty method. */ public static final String FRAMEWORK_OS_VERSION = "org.osgi.framework.os.version"; /** * Framework environment property (named * "org.osgi.framework.processor") identifying the Framework * host-computer's processor name. *

* The value of this property may be retrieved by calling the * BundleContext.getProperty method. */ public static final String FRAMEWORK_PROCESSOR = "org.osgi.framework.processor"; /** * Framework environment property (named * "org.osgi.framework.executionenvironment") identifying * execution environments provided by the Framework. *

* The value of this property may be retrieved by calling the * BundleContext.getProperty method. * * @since 1.2 */ public static final String FRAMEWORK_EXECUTIONENVIRONMENT = "org.osgi.framework.executionenvironment"; /** * Framework environment property (named * "org.osgi.framework.bootdelegation") identifying packages for * which the Framework must delegate class loading to the boot class path. *

* The value of this property may be retrieved by calling the * BundleContext.getProperty method. * * @since 1.3 */ public static final String FRAMEWORK_BOOTDELEGATION = "org.osgi.framework.bootdelegation"; /** * Framework environment property (named * "org.osgi.framework.system.packages") identifying package which * the system bundle must export. *

* The value of this property may be retrieved by calling the * BundleContext.getProperty method. * * @since 1.3 */ public static final String FRAMEWORK_SYSTEMPACKAGES = "org.osgi.framework.system.packages"; /** * Framework environment property (named * "org.osgi.supports.framework.extension") identifying whether * the Framework supports framework extension bundles. If the value of this * property is true, then the Framework supports framework * extension bundles. The default value is false. *

* The value of this property may be retrieved by calling the * BundleContext.getProperty method. * * @since 1.3 */ public static final String SUPPORTS_FRAMEWORK_EXTENSION = "org.osgi.supports.framework.extension"; /** * Framework environment property (named * "org.osgi.supports.bootclasspath.extension") identifying * whether the Framework supports bootclasspath extension bundles. If the * value of this property is true, then the Framework * supports bootclasspath extension bundles. The default value is * false. *

* The value of this property may be retrieved by calling the * BundleContext.getProperty method. * * @since 1.3 */ public static final String SUPPORTS_BOOTCLASSPATH_EXTENSION = "org.osgi.supports.bootclasspath.extension"; /** * Framework environment property (named * "org.osgi.supports.framework.fragment") identifying whether the * Framework supports fragment bundles. If the value of this property is * true, then the Framework supports fragment bundles. The * default value is false. *

* The value of this property may be retrieved by calling the * BundleContext.getProperty method. * * @since 1.3 */ public static final String SUPPORTS_FRAMEWORK_FRAGMENT = "org.osgi.supports.framework.fragment"; /** * Framework environment property (named * "org.osgi.supports.framework.requirebundle") identifying * whether the Framework supports the Require-Bundle manifest * header. If the value of this property is true, then the * Framework supports the Require-Bundle manifest header. The * default value is false. *

* The value of this property may be retrieved by calling the * BundleContext.getProperty method. * * @since 1.3 */ public static final String SUPPORTS_FRAMEWORK_REQUIREBUNDLE = "org.osgi.supports.framework.requirebundle"; /* * Service properties. */ /** * Service property (named "objectClass") identifying all of the * class names under which a service was registered in the Framework (of * type java.lang.String[]). * *

* This property is set by the Framework when a service is registered. */ public static final String OBJECTCLASS = "objectClass"; /** * Service property (named "service.id") identifying a service's * registration number (of type java.lang.Long). * *

* The value of this property is assigned by the Framework when a service is * registered. The Framework assigns a unique value that is larger than all * previously assigned values since the Framework was started. These values * are NOT persistent across restarts of the Framework. */ public static final String SERVICE_ID = "service.id"; /** * Service property (named "service.pid") identifying a service's * persistent identifier. * *

* This property may be supplied in the properties * Dictionary * object passed to the BundleContext.registerService method. * *

* A service's persistent identifier uniquely identifies the service and * persists across multiple Framework invocations. * *

* By convention, every bundle has its own unique namespace, starting with * the bundle's identifier (see {@link Bundle#getBundleId}) and followed by * a dot (.). A bundle may use this as the prefix of the persistent * identifiers for the services it registers. */ public static final String SERVICE_PID = "service.pid"; /** * Service property (named "service.ranking") identifying a * service's ranking number (of type java.lang.Integer). * *

* This property may be supplied in the properties * Dictionary * object passed to the BundleContext.registerService method. * *

* The service ranking is used by the Framework to determine the default * service to be returned from a call to the * {@link BundleContext#getServiceReference} method: If more than one * service implements the specified class, the ServiceReference * object with the highest ranking is returned. * *

* The default ranking is zero (0). A service with a ranking of * Integer.MAX_VALUE is very likely to be returned as the * default service, whereas a service with a ranking of * Integer.MIN_VALUE is very unlikely to be returned. * *

* If the supplied property value is not of type * java.lang.Integer, it is deemed to have a ranking value * of zero. */ public static final String SERVICE_RANKING = "service.ranking"; /** * Service property (named "service.vendor") identifying a * service's vendor. * *

* This property may be supplied in the properties Dictionary * object passed to the BundleContext.registerService method. */ public static final String SERVICE_VENDOR = "service.vendor"; /** * Service property (named "service.description") identifying a * service's description. * *

* This property may be supplied in the properties Dictionary * object passed to the BundleContext.registerService method. */ public static final String SERVICE_DESCRIPTION = "service.description"; /** * Manifest header (named "Bundle-SymbolicName") identifying the * bundle's symbolic name. *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. * * @since 1.3 */ public final static String BUNDLE_SYMBOLICNAME = "Bundle-SymbolicName"; /** * Manifest header directive (named "singleton") identifying * whether a bundle is a singleton. The default value is false. * *

* The directive value is encoded in the Bundle-SymbolicName manifest header * like: * *

	 *   Bundle-SymbolicName: com.acme.module.test; singleton:=true
	 * 
* * @since 1.3 */ public final static String SINGLETON_DIRECTIVE = "singleton"; /** * Manifest header directive (named "fragment-attachment") * identifying if and when a fragment may attach to a host bundle. The * default value is "always". * *

* The directive value is encoded in the Bundle-SymbolicName manifest header * like: * *

	 *   Bundle-SymbolicName: com.acme.module.test; fragment-attachment:="never"
	 * 
* * @see Constants#FRAGMENT_ATTACHMENT_ALWAYS * @see Constants#FRAGMENT_ATTACHMENT_RESOLVETIME * @see Constants#FRAGMENT_ATTACHMENT_NEVER * @since 1.3 */ public final static String FRAGMENT_ATTACHMENT_DIRECTIVE = "fragment-attachment"; /** * Manifest header directive value (named "always") identifying a * fragment attachment type of always. A fragment attachment type of always * indicates that fragments are allowed to attach to the host bundle at any * time (while the host is resolved or during the process of resolving the * host bundle). * *

* The directive value is encoded in the Bundle-SymbolicName manifest header * like: * *

	 *   Bundle-SymbolicName: com.acme.module.test; fragment-attachment:="always"
	 * 
* * @see Constants#FRAGMENT_ATTACHMENT_DIRECTIVE * @since 1.3 */ public final static String FRAGMENT_ATTACHMENT_ALWAYS = "always"; /** * Manifest header directive value (named "resolve-time") * identifying a fragment attachment type of resolve-time. A fragment * attachment type of resolve-time indicates that fragments are allowed to * attach to the host bundle only during the process of resolving the host * bundle. * *

* The directive value is encoded in the Bundle-SymbolicName manifest header * like: * *

	 *   Bundle-SymbolicName: com.acme.module.test; fragment-attachment:="resolve-time"
	 * 
* * @see Constants#FRAGMENT_ATTACHMENT_DIRECTIVE * @since 1.3 */ public final static String FRAGMENT_ATTACHMENT_RESOLVETIME = "resolve-time"; /** * Manifest header directive value (named "never") identifying a * fragment attachment type of never. A fragment attachment type of never * indicates that no fragments are allowed to attach to the host bundle at * any time. * *

* The directive value is encoded in the Bundle-SymbolicName manifest header * like: * *

	 *   Bundle-SymbolicName: com.acme.module.test; fragment-attachment:="never"
	 * 
* * @see Constants#FRAGMENT_ATTACHMENT_DIRECTIVE * @since 1.3 */ public final static String FRAGMENT_ATTACHMENT_NEVER = "never"; /** * Manifest header (named "Bundle-Localization") identifying the * base name of the bundle's localization entries. *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. * * @see #BUNDLE_LOCALIZATION_DEFAULT_BASENAME * @since 1.3 */ public final static String BUNDLE_LOCALIZATION = "Bundle-Localization"; /** * Default value for the Bundle-Localization manifest header. * * @see #BUNDLE_LOCALIZATION * @since 1.3 */ public final static String BUNDLE_LOCALIZATION_DEFAULT_BASENAME = "OSGI-INF/l10n/bundle"; /** * Manifest header (named "Require-Bundle") identifying the * symbolic names of other bundles required by the bundle. * *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. * * @since 1.3 */ public final static String REQUIRE_BUNDLE = "Require-Bundle"; /** * Manifest header attribute (named "bundle-version") identifying * a range of versions for a bundle specified in the Require-Bundle or * Fragment-Host manifest headers. The default value is 0.0.0. * *

* The attribute value is encoded in the Require-Bundle manifest header * like: * *

	 *   Require-Bundle: com.acme.module.test; bundle-version="1.1"
	 *   Require-Bundle: com.acme.module.test; bundle-version="[1.0,2.0)"
	 * 
* *

* The bundle-version attribute value uses a mathematical interval notation * to specify a range of bundle versions. A bundle-version attribute value * specified as a single version means a version range that includes any * bundle version greater than or equal to the specified version. * * @since 1.3 */ public static final String BUNDLE_VERSION_ATTRIBUTE = "bundle-version"; /** * Manifest header (named "Fragment-Host") identifying the * symbolic name of another bundle for which that the bundle is a fragment. * *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. * * @since 1.3 */ public final static String FRAGMENT_HOST = "Fragment-Host"; /** * Manifest header attribute (named "selection-filter") is used * for selection by filtering based upon system properties. * *

* The attribute value is encoded in manifest headers like: * *

	 *   Bundle-NativeCode: libgtk.so; selection-filter="(ws=gtk)"; ...
	 * 
* * @since 1.3 */ public final static String SELECTION_FILTER_ATTRIBUTE = "selection-filter"; /** * Manifest header (named "Bundle-ManifestVersion") identifying * the bundle manifest version. A bundle manifest may express the version of * the syntax in which it is written by specifying a bundle manifest * version. Bundles exploiting OSGi R4, or later, syntax must specify a * bundle manifest version. *

* The bundle manifest version defined by OSGi R4 or, more specifically, by * V1.3 of the OSGi Framework Specification is "2". * *

* The attribute value may be retrieved from the Dictionary * object returned by the Bundle.getHeaders method. * * @since 1.3 */ public final static String BUNDLE_MANIFESTVERSION = "Bundle-ManifestVersion"; /** * Manifest header attribute (named "version") identifying the * version of a package specified in the Export-Package or Import-Package * manifest header. * *

* The attribute value is encoded in the Export-Package or Import-Package * manifest header like: * *

	 *   Import-Package: org.osgi.framework; version="1.1"
	 * 
* * @since 1.3 */ public final static String VERSION_ATTRIBUTE = "version"; /** * Manifest header attribute (named "bundle-symbolic-name") * identifying the symbolic name of a bundle that exports a package * specified in the Import-Package manifest header. * *

* The attribute value is encoded in the Import-Package manifest header * like: * *

	 *   Import-Package: org.osgi.framework; bundle-symbolic-name="com.acme.module.test"
	 * 
* * @since 1.3 */ public final static String BUNDLE_SYMBOLICNAME_ATTRIBUTE = "bundle-symbolic-name"; /** * Manifest header directive (named "resolution") identifying the * resolution type in the Import-Package or Require-Bundle manifest header. * *

* The directive value is encoded in the Import-Package or Require-Bundle * manifest header like: * *

	 *   Import-Package: org.osgi.framework; resolution:="optional"
	 *   Require-Bundle: com.acme.module.test; resolution:="optional"
	 * 
* * @see Constants#RESOLUTION_MANDATORY * @see Constants#RESOLUTION_OPTIONAL * @since 1.3 */ public final static String RESOLUTION_DIRECTIVE = "resolution"; /** * Manifest header directive value (named "mandatory") identifying * a mandatory resolution type. A mandatory resolution type indicates that * the import package or require bundle must be resolved when the bundle is * resolved. If such an import or require bundle cannot be resolved, the * module fails to resolve. * *

* The directive value is encoded in the Import-Package or Require-Bundle * manifest header like: * *

	 *   Import-Package: org.osgi.framework; resolution:="manditory"
	 *   Require-Bundle: com.acme.module.test; resolution:="manditory"
	 * 
* * @see Constants#RESOLUTION_DIRECTIVE * @since 1.3 */ public final static String RESOLUTION_MANDATORY = "mandatory"; /** * Manifest header directive value (named "optional") identifying * an optional resolution type. An optional resolution type indicates that * the import or require bundle is optional and the bundle may be resolved * without the import or require bundle being resolved. If the import or * require bundle is not resolved when the bundle is resolved, the import or * require bundle may not be resolved before the bundle is refreshed. * *

* The directive value is encoded in the Import-Package or Require-Bundle * manifest header like: * *

	 *   Import-Package: org.osgi.framework; resolution:="optional"
	 *   Require-Bundle: com.acme.module.test; resolution:="optional"
	 * 
* * @see Constants#RESOLUTION_DIRECTIVE * @since 1.3 */ public final static String RESOLUTION_OPTIONAL = "optional"; /** * Manifest header directive (named "uses") identifying a list of * packages that an exported package uses. * *

* The directive value is encoded in the Export-Package manifest header * like: * *

	 *   Export-Package: org.osgi.util.tracker; uses:="org.osgi.framework"
	 * 
* * @since 1.3 */ public final static String USES_DIRECTIVE = "uses"; /** * Manifest header directive (named "include") identifying a list * of classes and/or resources of the specified package which must be * allowed to be exported in the Export-Package manifest header. * *

* The directive value is encoded in the Export-Package manifest header * like: * *

	 *   Export-Package: org.osgi.framework; include:="MyStuff*"
	 * 
* * @since 1.3 */ public final static String INCLUDE_DIRECTIVE = "include"; /** * Manifest header directive (named "exclude") identifying a list * of classes and/or resources of the specified package which must not be * allowed to be exported in the Export-Package manifest header. * *

* The directive value is encoded in the Export-Package manifest header * like: * *

	 *   Export-Package: org.osgi.framework; exclude:="MyStuff*"
	 * 
* * @since 1.3 */ public final static String EXCLUDE_DIRECTIVE = "exclude"; /** * Manifest header directive (named "mandatory") identifying names * of matching attributes which must be specified by matching Import-Package * statements in the Export-Package manifest header. * *

* The directive value is encoded in the Export-Package manifest header * like: * *

	 *   Export-Package: org.osgi.framework; mandatory:="bundle-symbolic-name"
	 * 
* * @since 1.3 */ public final static String MANDATORY_DIRECTIVE = "mandatory"; /** * Manifest header directive (named "visibility") identifying the * visibility of a reqiured bundle in the Require-Bundle manifest header. * *

* The directive value is encoded in the Require-Bundle manifest header * like: * *

	 *   Require-Bundle: com.acme.module.test; visibility:="reexport"
	 * 
* * @see Constants#VISIBILITY_PRIVATE * @see Constants#VISIBILITY_REEXPORT * @since 1.3 */ public final static String VISIBILITY_DIRECTIVE = "visibility"; /** * Manifest header directive value (named "private") identifying a * private visibility type. A private visibility type indicates that any * packages that are exported by the required bundle are not made visible on * the export signature of the requiring bundle. * *

* The directive value is encoded in the Require-Bundle manifest header * like: * *

	 *   Require-Bundle: com.acme.module.test; visibility:="private"
	 * 
* * @see Constants#VISIBILITY_DIRECTIVE * @since 1.3 */ public final static String VISIBILITY_PRIVATE = "private"; /** * Manifest header directive value (named "reexport") identifying * a reexport visibility type. A reexport visibility type indicates any * packages that are exported by the required bundle are re-exported by the * requiring bundle. Any arbitrary arbitrary matching attributes with which * they were exported by the required bundle are deleted. * *

* The directive value is encoded in the Require-Bundle manifest header * like: * *

	 *   Require-Bundle: com.acme.module.test; visibility:="reexport"
	 * 
* * @see Constants#VISIBILITY_DIRECTIVE * @since 1.3 */ public final static String VISIBILITY_REEXPORT = "reexport"; /** * Manifest header directive (named "extension") * identifying the type of the extension fragment. * *

* The directive value is encoded in the Fragment-Host manifest header * like: * *

	 *   Fragment-Host: system.bundle; extension:="framework"
	 * 
* * @see Constants#EXTENSION_FRAMEWORK * @see Constants#EXTENSION_BOOTCLASSPATH * @since 1.3 */ public final static String EXTENSION_DIRECTIVE = "extension"; /** * Manifest header directive value (named "framework") identifying * the type of extension fragment. An extension fragment type of framework * indicates that the extension fragment is to be loaded by * the framework's class loader. * *

* The directive value is encoded in the Fragment-Host manifest header * like: * *

	 *   Fragment-Host: system.bundle; extension:="framework"
	 * 
* * @see Constants#EXTENSION_DIRECTIVE * @since 1.3 */ public final static String EXTENSION_FRAMEWORK = "framework"; /** * Manifest header directive value (named "bootclasspath") identifying * the type of extension fragment. An extension fragment type of bootclasspath * indicates that the extension fragment is to be loaded by * the boot class loader. * *

* The directive value is encoded in the Fragment-Host manifest header * like: * *

	 *   Fragment-Host: system.bundle; extension:="bootclasspath"
	 * 
* * @see Constants#EXTENSION_DIRECTIVE * @since 1.3 */ public final static String EXTENSION_BOOTCLASSPATH = "bootclasspath"; }PK L 31Kz+OSGI-OPT/src/org/osgi/framework/Filter.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/Filter.java,v 1.12 2005/07/30 02:22:41 hargrave Exp $ * * Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; import java.util.Dictionary; /** * An RFC 1960-based Filter. *

* Filter objects can be created by calling * {@link BundleContext#createFilter} with the chosen filter string. *

* A Filter object can be used numerous times to determine if the * match argument matches the filter string that was used to create the * Filter object. *

* Some examples of LDAP filters are: * *

 *      "(cn=Babs Jensen)"
 *      "(!(cn=Tim Howes))"
 *      "(&(" + Constants.OBJECTCLASS + "=Person)(|(sn=Jensen)(cn=Babs J*)))"
 *      "(o=univ*of*mich*)"
 * 
* * @version $Revision: 1.12 $ * @since 1.1 * @see "Framework specification for a description of the filter string syntax." */ public interface Filter { /** * Filter using a service's properties. *

* The filter is executed using the keys and values of the referenced * service's properties. The keys are case insensitively matched with the * filter. * * @param reference The reference to the service whose properties are used * in the match. * * @return true if the service's properties match this * filter; false otherwise. */ public boolean match(ServiceReference reference); /** * Filter using a Dictionary object. The Filter is executed * using the Dictionary object's keys and values. The keys * are case insensitively matched with the filter. * * @param dictionary The Dictionary object whose keys are * used in the match. * * @return true if the Dictionary object's * keys and values match this filter; false * otherwise. * * @throws IllegalArgumentException If dictionary contains * case variants of the same key name. */ public boolean match(Dictionary dictionary); /** * Returns this Filter object's filter string. *

* The filter string is normalized by removing whitespace which does not * affect the meaning of the filter. * * @return Filter string. */ public String toString(); /** * Compares this Filter object to another object. * * @param obj The object to compare against this Filter * object. * * @return If the other object is a Filter object, then * returns this.toString().equals(obj.toString();false * otherwise. */ public boolean equals(Object obj); /** * Returns the hashCode for this Filter object. * * @return The hashCode of the filter string; that is, * this.toString().hashCode(). */ public int hashCode(); /** * Filter with case sensitivity using a Dictionary object. * The Filter is executed using the Dictionary object's keys * and values. The keys are case sensitively matched with the filter. * * @param dictionary The Dictionary object whose keys are * used in the match. * * @return true if the Dictionary object's * keys and values match this filter; false * otherwise. * * @since 1.3 */ public boolean matchCase(Dictionary dictionary); }PK L 37,3OSGI-OPT/src/org/osgi/framework/FrameworkEvent.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/FrameworkEvent.java,v 1.11 2005/08/05 03:22:00 hargrave Exp $ * * Copyright (c) OSGi Alliance (2004, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; import java.util.EventObject; /** * A general event from the Framework. * *

* FrameworkEvent is the event class used when notifying * listeners of general events occuring within the OSGI environment. A type code * is used to identify the event type for future extendability. * *

* OSGi Alliance reserves the right to extend the set of event types. * * @version $Revision: 1.11 $ */ public class FrameworkEvent extends EventObject { static final long serialVersionUID = 207051004521261705L; /** * Bundle related to the event. */ private Bundle bundle; /** * Exception related to the event. */ private Throwable throwable; /** * Type of event. */ private int type; /** * The Framework has started. * *

* This event is fired when the Framework has started after all * installed bundles that are marked to be started have been started and the * Framework has reached the intitial start level. * *

* The value of STARTED is 0x00000001. * * @see "StartLevel" */ public final static int STARTED = 0x00000001; /** * An error has occurred. * *

* There was an error associated with a bundle. * *

* The value of ERROR is 0x00000002. */ public final static int ERROR = 0x00000002; /** * A PackageAdmin.refreshPackage operation has completed. * *

* This event is fired when the Framework has completed the refresh * packages operation initiated by a call to the * PackageAdmin.refreshPackages method. * *

* The value of PACKAGES_REFRESHED is 0x00000004. * * @since 1.2 * @see "PackageAdmin.refreshPackages" */ public final static int PACKAGES_REFRESHED = 0x00000004; /** * A StartLevel.setStartLevel operation has completed. * *

* This event is fired when the Framework has completed changing the * active start level initiated by a call to the StartLevel.setStartLevel * method. * *

* The value of STARTLEVEL_CHANGED is 0x00000008. * * @since 1.2 * @see "StartLevel" */ public final static int STARTLEVEL_CHANGED = 0x00000008; /** * A warning has occurred. * *

* There was a warning associated with a bundle. * *

* The value of WARNING is 0x00000010. * * @since 1.3 */ public final static int WARNING = 0x00000010; /** * An informational event has occurred. * *

* There was an informational event associated with a bundle. * *

* The value of INFO is 0x00000020. * * @since 1.3 */ public final static int INFO = 0x00000020; /** * Creates a Framework event. * * @param type The event type. * @param source The event source object. This may not be null. * @deprecated Since 1.2. This constructor is deprecated in favor of using * the other constructor with the System Bundle as the event * source. */ public FrameworkEvent(int type, Object source) { super(source); this.type = type; this.bundle = null; this.throwable = null; } /** * Creates a Framework event regarding the specified bundle. * * @param type The event type. * @param bundle The event source. * @param throwable The related exception. This argument may be * null if there is no related exception. */ public FrameworkEvent(int type, Bundle bundle, Throwable throwable) { super(bundle); this.type = type; this.bundle = bundle; this.throwable = throwable; } /** * Returns the exception related to this event. * * @return The related exception or null if none. */ public Throwable getThrowable() { return throwable; } /** * Returns the bundle associated with the event. This bundle is also the * source of the event. * * @return The bundle associated with the event. */ public Bundle getBundle() { return bundle; } /** * Returns the type of framework event. *

* The type values are: *

    *
  • {@link #STARTED} *
  • {@link #ERROR} *
  • {@link #WARNING} *
  • {@link #INFO} *
  • {@link #PACKAGES_REFRESHED} *
  • {@link #STARTLEVEL_CHANGED} *
* * @return The type of state change. */ public int getType() { return type; } } PK L 3@6OSGI-OPT/src/org/osgi/framework/FrameworkListener.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/FrameworkListener.java,v 1.8 2005/08/05 03:22:00 hargrave Exp $ * * Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; import java.util.EventListener; /** * A FrameworkEvent listener. When a FrameworkEvent is * fired, it is asynchronously delivered to a FrameworkListener. * *

* FrameworkListener is a listener interface that may be * implemented by a bundle developer. A FrameworkListener object * is registered with the Framework using the * {@link BundleContext#addFrameworkListener} method. * FrameworkListener objects are called with a * FrameworkEvent objects when the Framework starts and when * asynchronous errors occur. * * @version $Revision: 1.8 $ * @see FrameworkEvent */ public interface FrameworkListener extends EventListener { /** * Receives notification of a general FrameworkEvent object. * * @param event The FrameworkEvent object. */ public void frameworkEvent(FrameworkEvent event); } PK L 3?2OSGI-OPT/src/org/osgi/framework/FrameworkUtil.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/FrameworkUtil.java,v 1.4 2005/08/12 20:10:13 hargrave Exp $ * * Copyright (c) OSGi Alliance (2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; import java.lang.reflect.*; import java.security.AccessController; import java.security.PrivilegedAction; /** * Framework Utility class. * *

* This class contains utility methods which access Framework functions that may * be useful to bundles. * * @version $Revision: 1.4 $ * @since 1.3 */ public class FrameworkUtil { /* * NOTE: A framework implementor may also choose to replace this class in * their distribution with a class that directly interfaces with the * framework implementation. */ /* * This class will load the FrameworkUtil class in the package named by the * org.osgi.vendor.framework package. For each instance of this class, an * instance of the vendor FrameworkUtil class will be created and this class * will delegate method calls to the vendor FrameworkUtil instance. */ private static final String packageProperty = "org.osgi.vendor.framework"; /* * This is the delegate method used by createFilter. */ private final static Method createFilter; static { createFilter = (Method) AccessController .doPrivileged(new PrivilegedAction() { public Object run() { String packageName = System .getProperty(packageProperty); if (packageName == null) { throw new NoClassDefFoundError(packageProperty + " property not set"); } Class delegateClass; try { delegateClass = Class.forName(packageName + ".FrameworkUtil"); } catch (ClassNotFoundException e) { throw new NoClassDefFoundError(e.toString()); } Method result; try { result = delegateClass.getMethod("createFilter", new Class[] {String.class}); } catch (NoSuchMethodException e) { throw new NoSuchMethodError(e.toString()); } if (!Modifier.isStatic(result.getModifiers())) { throw new NoSuchMethodError( "createFilter method must be static"); } return result; } }); } /** * FrameworkUtil objects may not be constructed. */ private FrameworkUtil() {} /** * Creates a Filter object. This Filter object * may be used to match a ServiceReference object or a * Dictionary object. * *

* If the filter cannot be parsed, an {@link InvalidSyntaxException} will be * thrown with a human readable message where the filter became unparsable. * * @param filter The filter string. * @return A Filter object encapsulating the filter string. * @throws InvalidSyntaxException If filter contains an * invalid filter string that cannot be parsed. * @throws NullPointerException If filter is null. * * @see Filter */ public static Filter createFilter(String filter) throws InvalidSyntaxException { try { try { return (Filter) createFilter .invoke(null, new Object[] {filter}); } catch (InvocationTargetException e) { throw e.getTargetException(); } } catch (InvalidSyntaxException e) { throw e; } catch (Error e) { throw e; } catch (RuntimeException e) { throw e; } catch (Throwable e) { throw new RuntimeException(e.toString()); } } } PK L 3i i ;OSGI-OPT/src/org/osgi/framework/InvalidSyntaxException.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/InvalidSyntaxException.java,v 1.12 2005/08/11 03:07:30 hargrave Exp $ * * Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; /** * A Framework exception. * *

* An InvalidSyntaxException object indicates that a filter * string parameter has an invalid syntax and cannot be parsed. * *

* See {@link Filter} for a description of the filter string syntax. * * @version $Revision: 1.12 $ */ public class InvalidSyntaxException extends Exception { static final long serialVersionUID = -4295194420816491875L; /** * The invalid filter string. */ private String filter; /** * Nested exception. */ private Throwable cause; /** * Creates an exception of type InvalidSyntaxException. * *

* This method creates an InvalidSyntaxException object with * the specified message and the filter string which generated the * exception. * * @param msg The message. * @param filter The invalid filter string. */ public InvalidSyntaxException(String msg, String filter) { super(msg); this.filter = filter; this.cause = null; } /** * Creates an exception of type InvalidSyntaxException. * *

* This method creates an InvalidSyntaxException object with * the specified message and the filter string which generated the * exception. * * @param msg The message. * @param filter The invalid filter string. * @param cause The cause of this exception. * @since 1.3 */ public InvalidSyntaxException(String msg, String filter, Throwable cause) { super(msg); this.filter = filter; this.cause = cause; } /** * Returns the filter string that generated the * InvalidSyntaxException object. * * @return The invalid filter string. * @see BundleContext#getServiceReferences * @see BundleContext#addServiceListener(ServiceListener,String) */ public String getFilter() { return filter; } /** * Returns the cause of this exception or null if no cause * was specified when this exception was created. * * @return The cause of this exception or null if no cause * was specified. * @since 1.3 */ public Throwable getCause() { return cause; } /** * The cause of this exception can only be set when constructed. * * @param cause Cause of the exception. * @return This object. * @throws java.lang.IllegalStateException This method will always throw an * IllegalStateException since the cause of this * exception can only be set when constructed. * @since 1.3 */ public Throwable initCause(Throwable cause) { throw new IllegalStateException(); } } PK L 3776OSGI-OPT/src/org/osgi/framework/PackagePermission.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/PackagePermission.java,v 1.12 2005/07/30 02:22:41 hargrave Exp $ * * Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; import java.io.IOException; import java.security.*; import java.util.Enumeration; import java.util.Hashtable; /** * A bundle's authority to import or export a package. * *

* A package is a dot-separated string that defines a fully qualified Java * package. *

* For example: * *

 * 
 * org.osgi.service.http
 * 
 * 
* *

* PackagePermission has two actions: EXPORT and * IMPORT. The EXPORT action implies the * IMPORT action. * * @version $Revision: 1.12 $ */ public final class PackagePermission extends BasicPermission { static final long serialVersionUID = -5107705877071099135L; /** * The action string export. */ public final static String EXPORT = "export"; /** * The action string import. */ public final static String IMPORT = "import"; private final static int ACTION_EXPORT = 0x00000001; private final static int ACTION_IMPORT = 0x00000002; private final static int ACTION_ALL = ACTION_EXPORT | ACTION_IMPORT; private final static int ACTION_NONE = 0; /** * The actions mask. */ private transient int action_mask = ACTION_NONE; /** * The actions in canonical form. * * @serial */ private String actions = null; /** * Defines the authority to import and/or export a package within the OSGi * environment. *

* The name is specified as a normal Java package name: a dot-separated * string. Wildcards may be used. For example: * *

	 * org.osgi.service.http
	 * javax.servlet.*
	 * *
	 * 
* *

* Package Permissions are granted over all possible versions of a package. * * A bundle that needs to export a package must have the appropriate * PackagePermission for that package; similarly, a bundle * that needs to import a package must have the appropriate * PackagePermssion for that package. *

* Permission is granted for both classes and resources. * * @param name Package name. * @param actions EXPORT,IMPORT (canonical * order). */ public PackagePermission(String name, String actions) { this(name, getMask(actions)); } /** * Package private constructor used by PackagePermissionCollection. * * @param name class name * @param mask action mask */ PackagePermission(String name, int mask) { super(name); init(mask); } /** * Called by constructors and when deserialized. * * @param mask action mask */ private void init(int mask) { if ((mask == ACTION_NONE) || ((mask & ACTION_ALL) != mask)) { throw new IllegalArgumentException("invalid action string"); } action_mask = mask; } /** * Parse action string into action mask. * * @param actions Action string. * @return action mask. */ private static int getMask(String actions) { boolean seencomma = false; int mask = ACTION_NONE; if (actions == null) { return (mask); } char[] a = actions.toCharArray(); int i = a.length - 1; if (i < 0) return (mask); while (i != -1) { char c; // skip whitespace while ((i != -1) && ((c = a[i]) == ' ' || c == '\r' || c == '\n' || c == '\f' || c == '\t')) i--; // check for the known strings int matchlen; if (i >= 5 && (a[i - 5] == 'i' || a[i - 5] == 'I') && (a[i - 4] == 'm' || a[i - 4] == 'M') && (a[i - 3] == 'p' || a[i - 3] == 'P') && (a[i - 2] == 'o' || a[i - 2] == 'O') && (a[i - 1] == 'r' || a[i - 1] == 'R') && (a[i] == 't' || a[i] == 'T')) { matchlen = 6; mask |= ACTION_IMPORT; } else if (i >= 5 && (a[i - 5] == 'e' || a[i - 5] == 'E') && (a[i - 4] == 'x' || a[i - 4] == 'X') && (a[i - 3] == 'p' || a[i - 3] == 'P') && (a[i - 2] == 'o' || a[i - 2] == 'O') && (a[i - 1] == 'r' || a[i - 1] == 'R') && (a[i] == 't' || a[i] == 'T')) { matchlen = 6; mask |= ACTION_EXPORT | ACTION_IMPORT; } else { // parse error throw new IllegalArgumentException("invalid permission: " + actions); } // make sure we didn't just match the tail of a word // like "ackbarfimport". Also, skip to the comma. seencomma = false; while (i >= matchlen && !seencomma) { switch (a[i - matchlen]) { case ',' : seencomma = true; /* FALLTHROUGH */ case ' ' : case '\r' : case '\n' : case '\f' : case '\t' : break; default : throw new IllegalArgumentException( "invalid permission: " + actions); } i--; } // point i at the location of the comma minus one (or -1). i -= matchlen; } if (seencomma) { throw new IllegalArgumentException("invalid permission: " + actions); } return (mask); } /** * Determines if the specified permission is implied by this object. * *

* This method checks that the package name of the target is implied by the * package name of this object. The list of PackagePermission * actions must either match or allow for the list of the target object to * imply the target PackagePermission action. *

* The permission to export a package implies the permission to import the * named package. * *

	 * x.y.*,"export" -> x.y.z,"export" is true
	 * *,"import" -> x.y, "import"      is true
	 * *,"export" -> x.y, "import"      is true
	 * x.y,"export" -> x.y.z, "export"  is false
	 * 
* * @param p The target permission to interrogate. * @return true if the specified * PackagePermission action is implied by this * object; false otherwise. */ public boolean implies(Permission p) { if (p instanceof PackagePermission) { PackagePermission target = (PackagePermission) p; return (((action_mask & target.action_mask) == target.action_mask) && super .implies(p)); } return (false); } /** * Returns the canonical string representation of the * PackagePermission actions. * *

* Always returns present PackagePermission actions in the * following order: EXPORT,IMPORT. * * @return Canonical string representation of the * PackagePermission actions. */ public String getActions() { if (actions == null) { StringBuffer sb = new StringBuffer(); boolean comma = false; if ((action_mask & ACTION_EXPORT) == ACTION_EXPORT) { sb.append(EXPORT); comma = true; } if ((action_mask & ACTION_IMPORT) == ACTION_IMPORT) { if (comma) sb.append(','); sb.append(IMPORT); } actions = sb.toString(); } return (actions); } /** * Returns a new PermissionCollection object suitable for * storing PackagePermission objects. * * @return A new PermissionCollection object. */ public PermissionCollection newPermissionCollection() { return (new PackagePermissionCollection()); } /** * Determines the equality of two PackagePermission objects. * * This method checks that specified package has the same package name and * PackagePermission actions as this * PackagePermission object. * * @param obj The object to test for equality with this * PackagePermission object. * @return true if obj is a * PackagePermission, and has the same package name * and actions as this PackagePermission object; * false otherwise. */ public boolean equals(Object obj) { if (obj == this) { return (true); } if (!(obj instanceof PackagePermission)) { return (false); } PackagePermission p = (PackagePermission) obj; return ((action_mask == p.action_mask) && getName().equals(p.getName())); } /** * Returns the hash code value for this object. * * @return A hash code value for this object. */ public int hashCode() { return (getName().hashCode() ^ getActions().hashCode()); } /** * Returns the current action mask. *

* Used by the PackagePermissionCollection class. * * @return Current action mask. */ int getMask() { return (action_mask); } /** * WriteObject is called to save the state of this permission object to a * stream. The actions are serialized, and the superclass takes care of the * name. */ private synchronized void writeObject(java.io.ObjectOutputStream s) throws IOException { // Write out the actions. The superclass takes care of the name // call getActions to make sure actions field is initialized if (actions == null) getActions(); s.defaultWriteObject(); } /** * readObject is called to restore the state of this permission from a * stream. */ private synchronized void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException { // Read in the action, then initialize the rest s.defaultReadObject(); init(getMask(actions)); } } /** * Stores a set of PackagePermission permissions. * * @see java.security.Permission * @see java.security.Permissions * @see java.security.PermissionCollection */ final class PackagePermissionCollection extends PermissionCollection { static final long serialVersionUID = -3350758995234427603L; /** * Table of permissions. * * @serial */ private Hashtable permissions; /** * Boolean saying if "*" is in the collection. * * @serial */ private boolean all_allowed; /** * Create an empty PackagePermissions object. */ public PackagePermissionCollection() { permissions = new Hashtable(); all_allowed = false; } /** * Adds a permission to the PackagePermission objects. The * key for the hash is the name. * * @param permission The PackagePermission object to add. * * @throws IllegalArgumentException If the permission is not a * PackagePermission instance. * * @throws SecurityException If this * PackagePermissionCollection object has been marked * read-only. */ public void add(Permission permission) { if (!(permission instanceof PackagePermission)) throw new IllegalArgumentException("invalid permission: " + permission); if (isReadOnly()) throw new SecurityException("attempt to add a Permission to a " + "readonly PermissionCollection"); PackagePermission pp = (PackagePermission) permission; String name = pp.getName(); PackagePermission existing = (PackagePermission) permissions.get(name); if (existing != null) { int oldMask = existing.getMask(); int newMask = pp.getMask(); if (oldMask != newMask) { permissions.put(name, new PackagePermission(name, oldMask | newMask)); } } else { permissions.put(name, permission); } if (!all_allowed) { if (name.equals("*")) all_allowed = true; } } /** * Determines if the specified permissions implies the permissions expressed * in permission. * * @param permission The Permission object to compare with this * PackagePermission object. * * @return true if permission is a proper * subset of a permission in the set; false * otherwise. */ public boolean implies(Permission permission) { if (!(permission instanceof PackagePermission)) return (false); PackagePermission pp = (PackagePermission) permission; PackagePermission x; int desired = pp.getMask(); int effective = 0; // short circuit if the "*" Permission was added if (all_allowed) { x = (PackagePermission) permissions.get("*"); if (x != null) { effective |= x.getMask(); if ((effective & desired) == desired) return (true); } } // strategy: // Check for full match first. Then work our way up the // name looking for matches on a.b.* String name = pp.getName(); x = (PackagePermission) permissions.get(name); if (x != null) { // we have a direct hit! effective |= x.getMask(); if ((effective & desired) == desired) return (true); } // work our way up the tree... int last, offset; offset = name.length() - 1; while ((last = name.lastIndexOf(".", offset)) != -1) { name = name.substring(0, last + 1) + "*"; x = (PackagePermission) permissions.get(name); if (x != null) { effective |= x.getMask(); if ((effective & desired) == desired) return (true); } offset = last - 1; } // we don't have to check for "*" as it was already checked // at the top (all_allowed), so we just return false return (false); } /** * Returns an enumeration of all PackagePermission objects in * the container. * * @return Enumeration of all PackagePermission objects. */ public Enumeration elements() { return (permissions.elements()); } } PK L 3h1OSGI-OPT/src/org/osgi/framework/ServiceEvent.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/ServiceEvent.java,v 1.12 2005/08/05 14:50:04 hargrave Exp $ * * Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; import java.util.EventObject; /** * An event from the Framework describing a service lifecycle change. *

* ServiceEvent objects are delivered to a * ServiceListener objects when a change occurs in this service's * lifecycle. A type code is used to identify the event type for future * extendability. * *

* OSGi Alliance reserves the right to extend the set of types. * * @version $Revision: 1.12 $ * @see ServiceListener */ public class ServiceEvent extends EventObject { static final long serialVersionUID = 8792901483909409299L; /** * Reference to the service that had a change occur in its lifecycle. */ private ServiceReference reference; /** * Type of service lifecycle change. */ private int type; /** * This service has been registered. *

* This event is synchronously delivered after the service * has been registered with the Framework. * *

* The value of REGISTERED is 0x00000001. * * @see BundleContext#registerService(String[],Object,java.util.Dictionary) */ public final static int REGISTERED = 0x00000001; /** * The properties of a registered service have been modified. *

* This event is synchronously delivered after the service * properties have been modified. * *

* The value of MODIFIED is 0x00000002. * * @see ServiceRegistration#setProperties */ public final static int MODIFIED = 0x00000002; /** * This service is in the process of being unregistered. *

* This event is synchronously delivered before the * service has completed unregistering. * *

* If a bundle is using a service that is UNREGISTERING, the * bundle should release its use of the service when it receives this event. * If the bundle does not release its use of the service when it receives * this event, the Framework will automatically release the bundle's use of * the service while completing the service unregistration operation. * *

* The value of UNREGISTERING is 0x00000004. * * @see ServiceRegistration#unregister * @see BundleContext#ungetService */ public final static int UNREGISTERING = 0x00000004; /** * Creates a new service event object. * * @param type The event type. * @param reference A ServiceReference object to the service * that had a lifecycle change. */ public ServiceEvent(int type, ServiceReference reference) { super(reference); this.reference = reference; this.type = type; } /** * Returns a reference to the service that had a change occur in its * lifecycle. *

* This reference is the source of the event. * * @return Reference to the service that had a lifecycle change. */ public ServiceReference getServiceReference() { return reference; } /** * Returns the type of event. The event type values are: *

    *
  • {@link #REGISTERED} *
  • {@link #MODIFIED} *
  • {@link #UNREGISTERING} *
* * @return Type of service lifecycle change. */ public int getType() { return type; } } PK L 3DS 3OSGI-OPT/src/org/osgi/framework/ServiceFactory.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/ServiceFactory.java,v 1.7 2005/07/30 02:22:40 hargrave Exp $ * * Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; /** * Allows services to provide customized service objects in the OSGi * environment. * *

* When registering a service, a ServiceFactory object can be * used instead of a service object, so that the bundle developer can gain * control of the specific service object granted to a bundle that is using the * service. * *

* When this happens, the * BundleContext.getService(ServiceReference) method calls the * ServiceFactory.getService method to create a service object * specifically for the requesting bundle. The service object returned by the * ServiceFactory object is cached by the Framework until the * bundle releases its use of the service. * *

* When the bundle's use count for the service equals zero (including the bundle * stopping or the service being unregistered), the * ServiceFactory.ungetService method is called. * *

* ServiceFactory objects are only used by the Framework and are * not made available to other bundles in the OSGi environment. * * @version $Revision: 1.7 $ * @see BundleContext#getService */ public interface ServiceFactory { /** * Creates a new service object. * *

* The Framework invokes this method the first time the specified * bundle requests a service object using the * BundleContext.getService(ServiceReference) method. The * service factory can then return a specific service object for each * bundle. * *

* The Framework caches the value returned (unless it is null), * and will return the same service object on any future call to * BundleContext.getService from the same bundle. * *

* The Framework will check if the returned service object is an instance of * all the classes named when the service was registered. If not, then * null is returned to the bundle. * * @param bundle The bundle using the service. * @param registration The ServiceRegistration object for the * service. * @return A service object that must be an instance of * all the classes named when the service was registered. * @see BundleContext#getService */ public Object getService(Bundle bundle, ServiceRegistration registration); /** * Releases a service object. * *

* The Framework invokes this method when a service has been released by a * bundle. The service object may then be destroyed. * * @param bundle The bundle releasing the service. * @param registration The ServiceRegistration object for the * service. * @param service The service object returned by a previous call to the * ServiceFactory.getService method. * @see BundleContext#ungetService */ public void ungetService(Bundle bundle, ServiceRegistration registration, Object service); } PK L 34OSGI-OPT/src/org/osgi/framework/ServiceListener.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/ServiceListener.java,v 1.10 2005/08/05 03:22:00 hargrave Exp $ * * Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; import java.util.EventListener; /** * A ServiceEvent listener. When a ServiceEvent is * fired, it is synchronously delivered to a BundleListener. * *

* ServiceListener is a listener interface that may be * implemented by a bundle developer. *

* A ServiceListener object is registered with the Framework * using the BundleContext.addServiceListener method. * ServiceListener objects are called with a * ServiceEvent object when a service is registered, modified, or * is in the process of unregistering. * *

* ServiceEvent object delivery to ServiceListener * objects is filtered by the filter specified when the listener was registered. * If the Java Runtime Environment supports permissions, then additional * filtering is done. ServiceEvent objects are only delivered to * the listener if the bundle which defines the listener object's class has the * appropriate ServicePermission to get the service using at * least one of the named classes the service was registered under. * *

* ServiceEvent object delivery to ServiceListener * objects is further filtered according to package sources as defined in * {@link ServiceReference#isAssignableTo(Bundle, String)}. * * @version $Revision: 1.10 $ * @see ServiceEvent * @see ServicePermission */ public interface ServiceListener extends EventListener { /** * Receives notification that a service has had a lifecycle change. * * @param event The ServiceEvent object. */ public void serviceChanged(ServiceEvent event); } PK L 3#{3{36OSGI-OPT/src/org/osgi/framework/ServicePermission.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/ServicePermission.java,v 1.12 2005/07/30 02:22:40 hargrave Exp $ * * Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; import java.io.IOException; import java.security.*; import java.util.Enumeration; import java.util.Hashtable; /** * Indicates a bundle's authority to register or get a service. *

    *
  • The ServicePermission.REGISTER action allows a bundle to * register a service on the specified names. *
  • The ServicePermission.GET action allows a bundle to * detect a service and get it. *
* Permission to get a service is required in order to detect events regarding * the service. Untrusted bundles should not be able to detect the presence of * certain services unless they have the appropriate * ServicePermission to get the specific service. * * @version $Revision: 1.12 $ */ final public class ServicePermission extends BasicPermission { static final long serialVersionUID = -7662148639076511574L; /** * The action string get (Value is "get"). */ public final static String GET = "get"; /** * The action string register (Value is "register"). */ public final static String REGISTER = "register"; private final static int ACTION_GET = 0x00000001; private final static int ACTION_REGISTER = 0x00000002; private final static int ACTION_ALL = ACTION_GET | ACTION_REGISTER; private final static int ACTION_NONE = 0; /** * The actions mask. */ private transient int action_mask = ACTION_NONE; /** * The actions in canonical form. * * @serial */ private String actions = null; /** * Create a new ServicePermission. * *

* The name of the service is specified as a fully qualified class name. * *

	 * ClassName ::= <class name> | <class name ending in ".*">
	 * 
* * Examples: * *
	 * org.osgi.service.http.HttpService
	 * org.osgi.service.http.*
	 * org.osgi.service.snmp.*
	 * 
* *

* There are two possible actions: get and * register. The get permission allows the * owner of this permission to obtain a service with this name. The * register permission allows the bundle to register a * service under that name. * * @param name class name * @param actions get,register (canonical * order) */ public ServicePermission(String name, String actions) { this(name, getMask(actions)); } /** * Package private constructor used by ServicePermissionCollection. * * @param name class name * @param mask action mask */ ServicePermission(String name, int mask) { super(name); init(mask); } /** * Called by constructors and when deserialized. * * @param mask action mask */ private void init(int mask) { if ((mask == ACTION_NONE) || ((mask & ACTION_ALL) != mask)) { throw new IllegalArgumentException("invalid action string"); } action_mask = mask; } /** * Parse action string into action mask. * * @param actions Action string. * @return action mask. */ private static int getMask(String actions) { boolean seencomma = false; int mask = ACTION_NONE; if (actions == null) { return mask; } char[] a = actions.toCharArray(); int i = a.length - 1; if (i < 0) return mask; while (i != -1) { char c; // skip whitespace while ((i != -1) && ((c = a[i]) == ' ' || c == '\r' || c == '\n' || c == '\f' || c == '\t')) i--; // check for the known strings int matchlen; if (i >= 2 && (a[i - 2] == 'g' || a[i - 2] == 'G') && (a[i - 1] == 'e' || a[i - 1] == 'E') && (a[i] == 't' || a[i] == 'T')) { matchlen = 3; mask |= ACTION_GET; } else if (i >= 7 && (a[i - 7] == 'r' || a[i - 7] == 'R') && (a[i - 6] == 'e' || a[i - 6] == 'E') && (a[i - 5] == 'g' || a[i - 5] == 'G') && (a[i - 4] == 'i' || a[i - 4] == 'I') && (a[i - 3] == 's' || a[i - 3] == 'S') && (a[i - 2] == 't' || a[i - 2] == 'T') && (a[i - 1] == 'e' || a[i - 1] == 'E') && (a[i] == 'r' || a[i] == 'R')) { matchlen = 8; mask |= ACTION_REGISTER; } else { // parse error throw new IllegalArgumentException("invalid permission: " + actions); } // make sure we didn't just match the tail of a word // like "ackbarfregister". Also, skip to the comma. seencomma = false; while (i >= matchlen && !seencomma) { switch (a[i - matchlen]) { case ',' : seencomma = true; /* FALLTHROUGH */ case ' ' : case '\r' : case '\n' : case '\f' : case '\t' : break; default : throw new IllegalArgumentException( "invalid permission: " + actions); } i--; } // point i at the location of the comma minus one (or -1). i -= matchlen; } if (seencomma) { throw new IllegalArgumentException("invalid permission: " + actions); } return mask; } /** * Determines if a ServicePermission object "implies" the * specified permission. * * @param p The target permission to check. * @return true if the specified permission is implied by * this object; false otherwise. */ public boolean implies(Permission p) { if (p instanceof ServicePermission) { ServicePermission target = (ServicePermission) p; return (((action_mask & target.action_mask) == target.action_mask) && super .implies(p)); } return (false); } /** * Returns the canonical string representation of the actions. Always * returns present actions in the following order: get, * register. * * @return The canonical string representation of the actions. */ public String getActions() { if (actions == null) { StringBuffer sb = new StringBuffer(); boolean comma = false; if ((action_mask & ACTION_GET) == ACTION_GET) { sb.append(GET); comma = true; } if ((action_mask & ACTION_REGISTER) == ACTION_REGISTER) { if (comma) sb.append(','); sb.append(REGISTER); } actions = sb.toString(); } return (actions); } /** * Returns a new PermissionCollection object for storing * ServicePermission objects. * * @return A new PermissionCollection object suitable for storing * ServicePermission objects. */ public PermissionCollection newPermissionCollection() { return (new ServicePermissionCollection()); } /** * Determines the equalty of two ServicePermission objects. * * Checks that specified object has the same class name and action as this * ServicePermission. * * @param obj The object to test for equality. * @return true if obj is a ServicePermission, and has the * same class name and actions as this * ServicePermission object; false * otherwise. */ public boolean equals(Object obj) { if (obj == this) { return (true); } if (!(obj instanceof ServicePermission)) { return (false); } ServicePermission p = (ServicePermission) obj; return ((action_mask == p.action_mask) && getName().equals(p.getName())); } /** * Returns the hash code value for this object. * * @return Hash code value for this object. */ public int hashCode() { return (getName().hashCode() ^ getActions().hashCode()); } /** * Returns the current action mask. Used by the ServicePermissionCollection * object. * * @return The actions mask. */ int getMask() { return (action_mask); } /** * WriteObject is called to save the state of this permission to a stream. * The actions are serialized, and the superclass takes care of the name. */ private synchronized void writeObject(java.io.ObjectOutputStream s) throws IOException { // Write out the actions. The superclass takes care of the name // call getActions to make sure actions field is initialized if (actions == null) getActions(); s.defaultWriteObject(); } /** * readObject is called to restore the state of this permission from a * stream. */ private synchronized void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException { // Read in the action, then initialize the rest s.defaultReadObject(); init(getMask(actions)); } } /** * Stores a set of ServicePermission permissions. * * @see java.security.Permission * @see java.security.Permissions * @see java.security.PermissionCollection */ final class ServicePermissionCollection extends PermissionCollection { static final long serialVersionUID = 662615640374640621L; /** * Table of permissions. * * @serial */ private Hashtable permissions; /** * Boolean saying if "*" is in the collection. * * @serial */ private boolean all_allowed; /** * Creates an empty ServicePermissions object. */ public ServicePermissionCollection() { permissions = new Hashtable(); all_allowed = false; } /** * Adds a permission to the ServicePermission objects using * the key for the hash as the name. * * @param permission The Permission object to add. * * @throws IllegalArgumentException If the permission is not a * ServicePermission object. * @throws SecurityException If this * ServicePermissionCollection object has been marked * read-only. */ public void add(Permission permission) { if (!(permission instanceof ServicePermission)) throw new IllegalArgumentException("invalid permission: " + permission); if (isReadOnly()) throw new SecurityException("attempt to add a Permission to a " + "readonly PermissionCollection"); ServicePermission sp = (ServicePermission) permission; String name = sp.getName(); ServicePermission existing = (ServicePermission) permissions.get(name); if (existing != null) { int oldMask = existing.getMask(); int newMask = sp.getMask(); if (oldMask != newMask) { permissions.put(name, new ServicePermission(name, oldMask | newMask)); } } else { permissions.put(name, permission); } if (!all_allowed) { if (name.equals("*")) all_allowed = true; } } /** * Determines if a set of permissions implies the permissions expressed in * permission. * * @param permission The Permission object to compare. * * @return true if permission is a proper * subset of a permission in the set; false * otherwise. */ public boolean implies(Permission permission) { if (!(permission instanceof ServicePermission)) return (false); ServicePermission sp = (ServicePermission) permission; ServicePermission x; int desired = sp.getMask(); int effective = 0; // short circuit if the "*" Permission was added if (all_allowed) { x = (ServicePermission) permissions.get("*"); if (x != null) { effective |= x.getMask(); if ((effective & desired) == desired) return (true); } } // strategy: // Check for full match first. Then work our way up the // name looking for matches on a.b.* String name = sp.getName(); x = (ServicePermission) permissions.get(name); if (x != null) { // we have a direct hit! effective |= x.getMask(); if ((effective & desired) == desired) return (true); } // work our way up the tree... int last, offset; offset = name.length() - 1; while ((last = name.lastIndexOf(".", offset)) != -1) { name = name.substring(0, last + 1) + "*"; x = (ServicePermission) permissions.get(name); if (x != null) { effective |= x.getMask(); if ((effective & desired) == desired) return (true); } offset = last - 1; } // we don't have to check for "*" as it was already checked // at the top (all_allowed), so we just return false return (false); } /** * Returns an enumeration of all the ServicePermission * objects in the container. * * @return Enumeration of all the ServicePermission objects. */ public Enumeration elements() { return (permissions.elements()); } } PK L 3:o%ee5OSGI-OPT/src/org/osgi/framework/ServiceReference.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/ServiceReference.java,v 1.13 2005/08/05 14:43:17 hargrave Exp $ * * Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; /** * A reference to a service. * *

* The Framework returns ServiceReference objects from the * BundleContext.getServiceReference and * BundleContext.getServiceReferences methods. *

* A ServiceReference object may be shared between bundles and * can be used to examine the properties of the service and to get the service * object. *

* Every service registered in the Framework has a unique * ServiceRegistration object and may have multiple, distinct * ServiceReference objects referring to it. * ServiceReference objects associated with a * ServiceRegistration object have the same hashCode * and are considered equal (more specifically, their equals() * method will return true when compared). *

* If the same service object is registered multiple times, * ServiceReference objects associated with different * ServiceRegistration objects are not equal. * * @version $Revision: 1.13 $ * @see BundleContext#getServiceReference * @see BundleContext#getServiceReferences * @see BundleContext#getService */ public interface ServiceReference { /** * Returns the property value to which the specified property key is mapped * in the properties Dictionary object of the service * referenced by this ServiceReference object. * *

* Property keys are case-insensitive. * *

* This method must continue to return property values after the service has * been unregistered. This is so references to unregistered services (for * example, ServiceReference objects stored in the log) can * still be interrogated. * * @param key The property key. * @return The property value to which the key is mapped; null * if there is no property named after the key. */ public Object getProperty(String key); /** * Returns an array of the keys in the properties Dictionary * object of the service referenced by this ServiceReference * object. * *

* This method will continue to return the keys after the service has been * unregistered. This is so references to unregistered services (for * example, ServiceReference objects stored in the log) can * still be interrogated. * *

* This method is case-preserving ; this means that every key in the * returned array must have the same case as the corresponding key in the * properties Dictionary that was passed to the * {@link BundleContext#registerService(String[],Object,java.util.Dictionary)} or * {@link ServiceRegistration#setProperties} methods. * * @return An array of property keys. */ public String[] getPropertyKeys(); /** * Returns the bundle that registered the service referenced by this * ServiceReference object. * *

* This method must return null when the service has been * unregistered. This can be used to determine if the service has been * unregistered. * * @return The bundle that registered the service referenced by this * ServiceReference object; null if * that service has already been unregistered. * @see BundleContext#registerService(String[],Object,java.util.Dictionary) */ public Bundle getBundle(); /** * Returns the bundles that are using the service referenced by this * ServiceReference object. Specifically, this method returns * the bundles whose usage count for that service is greater than zero. * * @return An array of bundles whose usage count for the service referenced * by this ServiceReference object is greater than * zero; null if no bundles are currently using that * service. * * @since 1.1 */ public Bundle[] getUsingBundles(); /** * Tests if the bundle that registered the service referenced by this * ServiceReference and the specified bundle use the same * source for the package of the specified class name. *

* This method performs the following checks: *

    *
  1. Get the package name from the specified class name.
  2. *
  3. For the bundle that registered the service referenced by this * ServiceReference (registrant bundle); find the source for * the package. If no source is found then return true if the * registrant bundle is equal to the specified bundle; otherwise return * false.
  4. *
  5. If the package source of the registrant bundle is equal to the * package source of the specified bundle then return true; * otherwise return false.
  6. *
* * @param bundle The Bundle object to check. * @param className The class name to check. * @return true if the bundle which registered the service * referenced by this ServiceReference and the * specified bundle use the same source for the package of the * specified class name. Otherwise false is returned. * * @since 1.3 */ public boolean isAssignableTo(Bundle bundle, String className); } PK L 3IA;;8OSGI-OPT/src/org/osgi/framework/ServiceRegistration.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/ServiceRegistration.java,v 1.10 2005/08/05 03:22:00 hargrave Exp $ * * Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; import java.util.Dictionary; /** * A registered service. * *

* The Framework returns a ServiceRegistration object when a * BundleContext.registerService method invocation is successful. * The ServiceRegistration object is for the private use of the * registering bundle and should not be shared with other bundles. *

* The ServiceRegistration object may be used to update the * properties of the service or to unregister the service. * * @version $Revision: 1.10 $ * @see BundleContext#registerService(String[],Object,Dictionary) */ public interface ServiceRegistration { /** * Returns a ServiceReference object for a service being * registered. *

* The ServiceReference object may be shared with other * bundles. * * @throws java.lang.IllegalStateException If this * ServiceRegistration object has already been * unregistered. * @return ServiceReference object. */ public ServiceReference getReference(); /** * Updates the properties associated with a service. * *

* The {@link Constants#OBJECTCLASS} and {@link Constants#SERVICE_ID} keys * cannot be modified by this method. These values are set by the Framework * when the service is registered in the OSGi environment. * *

* The following steps are required to modify service properties: *

    *
  1. The service's properties are replaced with the provided properties. *
  2. A service event of type {@link ServiceEvent#MODIFIED} is * fired. *
* * @param properties The properties for this service. See {@link Constants} * for a list of standard service property keys. Changes should not * be made to this object after calling this method. To update the * service's properties this method should be called again. * * @throws IllegalStateException If this ServiceRegistration * object has already been unregistered. * @throws IllegalArgumentException If properties contains * case variants of the same key name. */ public void setProperties(Dictionary properties); /** * Unregisters a service. Remove a ServiceRegistration object * from the Framework service registry. All ServiceReference * objects associated with this ServiceRegistration object * can no longer be used to interact with the service. * *

* The following steps are required to unregister a service: *

    *
  1. The service is removed from the Framework service registry so that * it can no longer be used. ServiceReference objects for the * service may no longer be used to get a service object for the service. *
  2. A service event of type {@link ServiceEvent#UNREGISTERING} is * fired so that bundles using this service can release their * use of it. *
  3. For each bundle whose use count for this service is greater than * zero:
    * The bundle's use count for this service is set to zero.
    * If the service was registered with a {@link ServiceFactory} object, the * ServiceFactory.ungetService method is called to release * the service object for the bundle. *
* * @throws java.lang.IllegalStateException If this * ServiceRegistration object has already been * unregistered. * @see BundleContext#ungetService * @see ServiceFactory#ungetService */ public void unregister(); } PK L 3#mm>OSGI-OPT/src/org/osgi/framework/SynchronousBundleListener.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/SynchronousBundleListener.java,v 1.12 2005/08/05 03:22:00 hargrave Exp $ * * Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; /** * A synchronous BundleEvent listener. When a BundleEvent is * fired, it is synchronously delivered to a BundleListener. * *

* SynchronousBundleListener is a listener interface that may be * implemented by a bundle developer. *

* A SynchronousBundleListener object is registered with the * Framework using the {@link BundleContext#addBundleListener} method. * SynchronousBundleListener objects are called with a * BundleEvent object when a bundle has been installed, resolved, * starting, started, stopping, stopped, updated, unresolved, or uninstalled. *

* Unlike normal BundleListener objects, * SynchronousBundleListeners are synchronously called during * bundle lifecycle processing. The bundle lifecycle processing will not proceed * until all SynchronousBundleListeners have completed. * SynchronousBundleListener objects will be called prior to * BundleListener objects. *

* AdminPermission[bundle,LISTENER] is required to add or remove a * SynchronousBundleListener object. * * @version $Revision: 1.12 $ * @since 1.1 * @see BundleEvent */ public interface SynchronousBundleListener extends BundleListener { // This is a marker interface } PK L 3-v'',OSGI-OPT/src/org/osgi/framework/Version.java/* * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/Version.java,v 1.14 2005/07/30 02:22:40 hargrave Exp $ * * Copyright (c) OSGi Alliance (2004, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.framework; import java.util.NoSuchElementException; import java.util.StringTokenizer; /** * Version identifier for bundles and packages. * *

* Version identifiers have four components. *

    *
  1. Major version. A non-negative integer.
  2. *
  3. Minor version. A non-negative integer.
  4. *
  5. Micro version. A non-negative integer.
  6. *
  7. Qualifier. A text string. See Version(String) for the * format of the qualifier string.
  8. *
* *

* Version objects are immutable. * * @version $Revision: 1.14 $ * @since 1.3 */ public class Version implements Comparable { private final int major; private final int minor; private final int micro; private final String qualifier; private static final String SEPARATOR = "."; //$NON-NLS-1$ /** * The empty version "0.0.0". Equivalent to calling * new Version(0,0,0). */ public static final Version emptyVersion = new Version(0, 0, 0); /** * Creates a version identifier from the specified numerical components. * *

* The qualifier is set to the empty string. * * @param major Major component of the version identifier. * @param minor Minor component of the version identifier. * @param micro Micro component of the version identifier. * @throws IllegalArgumentException If the numerical components are * negative. */ public Version(int major, int minor, int micro) { this(major, minor, micro, null); } /** * Creates a version identifier from the specifed components. * * @param major Major component of the version identifier. * @param minor Minor component of the version identifier. * @param micro Micro component of the version identifier. * @param qualifier Qualifier component of the version identifier. If * null is specified, then the qualifier will be set * to the empty string. * @throws IllegalArgumentException If the numerical components are negative * or the qualifier string is invalid. */ public Version(int major, int minor, int micro, String qualifier) { if (qualifier == null) { qualifier = ""; //$NON-NLS-1$ } this.major = major; this.minor = minor; this.micro = micro; this.qualifier = qualifier; validate(); } /** * Created a version identifier from the specified string. * *

* Here is the grammar for version strings. * *

	 * version ::= major('.'minor('.'micro('.'qualifier)?)?)?
	 * major ::= digit+
	 * minor ::= digit+
	 * micro ::= digit+
	 * qualifier ::= (alpha|digit|'_'|'-')+
	 * digit ::= [0..9]
	 * alpha ::= [a..zA..Z]
	 * 
* * There must be no whitespace in version. * * @param version String representation of the version identifier. * @throws IllegalArgumentException If version is improperly * formatted. */ public Version(String version) { int major = 0; int minor = 0; int micro = 0; String qualifier = ""; //$NON-NLS-1$ try { StringTokenizer st = new StringTokenizer(version, SEPARATOR, true); major = Integer.parseInt(st.nextToken()); if (st.hasMoreTokens()) { st.nextToken(); // consume delimiter minor = Integer.parseInt(st.nextToken()); if (st.hasMoreTokens()) { st.nextToken(); // consume delimiter micro = Integer.parseInt(st.nextToken()); if (st.hasMoreTokens()) { st.nextToken(); // consume delimiter qualifier = st.nextToken(); if (st.hasMoreTokens()) { throw new IllegalArgumentException("invalid format"); //$NON-NLS-1$ } } } } } catch (NoSuchElementException e) { throw new IllegalArgumentException("invalid format"); //$NON-NLS-1$ } this.major = major; this.minor = minor; this.micro = micro; this.qualifier = qualifier; validate(); } /** * Called by the Version constructors to validate the version components. * * @throws IllegalArgumentException If the numerical components are negative * or the qualifier string is invalid. */ private void validate() { if (major < 0) { throw new IllegalArgumentException("negative major"); //$NON-NLS-1$ } if (minor < 0) { throw new IllegalArgumentException("negative minor"); //$NON-NLS-1$ } if (micro < 0) { throw new IllegalArgumentException("negative micro"); //$NON-NLS-1$ } int length = qualifier.length(); for (int i = 0; i < length; i++) { if ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-".indexOf(qualifier.charAt(i)) == -1) { //$NON-NLS-1$ throw new IllegalArgumentException("invalid qualifier"); //$NON-NLS-1$ } } } /** * Parses a version identifier from the specified string. * *

* See Version(String) for the format of the version string. * * @param version String representation of the version identifier. Leading * and trailing whitespace will be ignored. * @return A Version object representing the version * identifier. If version is null or * the empty string then emptyVersion will be * returned. * @throws IllegalArgumentException If version is improperly * formatted. */ public static Version parseVersion(String version) { if (version == null) { return emptyVersion; } version = version.trim(); if (version.length() == 0) { return emptyVersion; } return new Version(version); } /** * Returns the major component of this version identifier. * * @return The major component. */ public int getMajor() { return major; } /** * Returns the minor component of this version identifier. * * @return The minor component. */ public int getMinor() { return minor; } /** * Returns the micro component of this version identifier. * * @return The micro component. */ public int getMicro() { return micro; } /** * Returns the qualifier component of this version identifier. * * @return The qualifier component. */ public String getQualifier() { return qualifier; } /** * Returns the string representation of this version identifier. * *

* The format of the version string will be major.minor.micro * if qualifier is the empty string or * major.minor.micro.qualifier otherwise. * * @return The string representation of this version identifier. */ public String toString() { String base = major + SEPARATOR + minor + SEPARATOR + micro; if (qualifier.length() == 0) { //$NON-NLS-1$ return base; } else { return base + SEPARATOR + qualifier; } } /** * Returns a hash code value for the object. * * @return An integer which is a hash code value for this object. */ public int hashCode() { return (major << 24) + (minor << 16) + (micro << 8) + qualifier.hashCode(); } /** * Compares this Version object to another object. * *

* A version is considered to be equal to another version if the * major, minor and micro components are equal and the qualifier component * is equal (using String.equals). * * @param object The Version object to be compared. * @return true if object is a * Version and is equal to this object; * false otherwise. */ public boolean equals(Object object) { if (object == this) { // quicktest return true; } if (!(object instanceof Version)) { return false; } Version other = (Version) object; return (major == other.major) && (minor == other.minor) && (micro == other.micro) && qualifier.equals(other.qualifier); } /** * Compares this Version object to another object. * *

* A version is considered to be less than another version if its * major component is less than the other version's major component, or the * major components are equal and its minor component is less than the other * version's minor component, or the major and minor components are equal * and its micro component is less than the other version's micro component, * or the major, minor and micro components are equal and it's qualifier * component is less than the other version's qualifier component (using * String.compareTo). * *

* A version is considered to be equal to another version if the * major, minor and micro components are equal and the qualifier component * is equal (using String.compareTo). * * @param object The Version object to be compared. * @return A negative integer, zero, or a positive integer if this object is * less than, equal to, or greater than the specified * Version object. * @throws ClassCastException If the specified object is not a * Version. */ public int compareTo(Object object) { if (object == this) { // quicktest return 0; } Version other = (Version) object; int result = major - other.major; if (result != 0) { return result; } result = minor - other.minor; if (result != 0) { return result; } result = micro - other.micro; if (result != 0) { return result; } return qualifier.compareTo(other.qualifier); } }PK L 3^0,OSGI-OPT/src/org/osgi/framework/package.html

The OSGi Framework Package. Specification Version 1.3.

Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. For example:

Import-Package: org.osgi.framework;version=1.3
PK L 3OSGI-OPT/src/org/osgi/service/PK L 3,OSGI-OPT/src/org/osgi/service/condpermadmin/PK L 3HOSGI-OPT/src/org/osgi/service/condpermadmin/BundleLocationCondition.java/* * $Header: /cvshome/build/org.osgi.service.condpermadmin/src/org/osgi/service/condpermadmin/BundleLocationCondition.java,v 1.16 2005/08/11 03:07:41 hargrave Exp $ * * Copyright (c) OSGi Alliance (2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.service.condpermadmin; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.Hashtable; import org.osgi.framework.*; /** * Condition to test if the location of a bundle matches a pattern. Pattern * matching is done according to the filter string matching rules. * * @version $Revision: 1.16 $ */ public class BundleLocationCondition { private static final String CONDITION_TYPE = "org.osgi.service.condpermadmin.BundleLocationCondition"; /** * Constructs a condition that tries to match the passed Bundle's location * to the location pattern. * * @param bundle The Bundle being evaluated. * @param info The ConditionInfo to construct the condition for. The args of * the ConditionInfo must be a single String which specifies the * location pattern to match against the Bundle location. Matching is * done according to the filter string matching rules. Any '*' * characters in the location argument are used as wildcards when * matching bundle locations unless they are escaped with a '\' * character. * @return Condition object for the requested condition. */ static public Condition getCondition(final Bundle bundle, ConditionInfo info) { if (!CONDITION_TYPE.equals(info.getType())) throw new IllegalArgumentException( "ConditionInfo must be of type \"" + CONDITION_TYPE + "\""); String[] args = info.getArgs(); if (args.length != 1) throw new IllegalArgumentException("Illegal number of args: " + args.length); String bundleLocation = (String) AccessController .doPrivileged(new PrivilegedAction() { public Object run() { return bundle.getLocation(); } }); Filter filter = null; try { filter = FrameworkUtil.createFilter("(location=" + escapeLocation(args[0]) + ")"); } catch (InvalidSyntaxException e) { // this should never happen, but just incase throw new RuntimeException("Invalid filter: " + e.getFilter()); } Hashtable matchProps = new Hashtable(2); matchProps.put("location", bundleLocation); return filter.match(matchProps) ? Condition.TRUE : Condition.FALSE; } private BundleLocationCondition() { // private constructor to prevent objects of this type } /** * Escape the value string such that '(', ')' and '\' are escaped. The '\' * char is only escaped if it is not followed by a '*'. * * @param value unescaped value string. * @return escaped value string. */ private static String escapeLocation(String value) { boolean escaped = false; int inlen = value.length(); int outlen = inlen << 1; /* inlen * 2 */ char[] output = new char[outlen]; value.getChars(0, inlen, output, inlen); int cursor = 0; for (int i = inlen; i < outlen; i++) { char c = output[i]; switch (c) { case '\\' : if (i + 1 < outlen && output[i + 1] == '*') break; case '(' : case ')' : output[cursor] = '\\'; cursor++; escaped = true; break; } output[cursor] = c; cursor++; } return escaped ? new String(output, 0, cursor) : value; } } PK L 3j ,FOSGI-OPT/src/org/osgi/service/condpermadmin/BundleSignerCondition.java/* * $Header: /cvshome/build/org.osgi.service.condpermadmin/src/org/osgi/service/condpermadmin/BundleSignerCondition.java,v 1.8 2005/08/05 01:36:21 hargrave Exp $ * * Copyright (c) OSGi Alliance (2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.service.condpermadmin; import java.lang.reflect.*; import java.security.AccessController; import java.security.PrivilegedAction; import org.osgi.framework.Bundle; /** * Condition to test if the signer of a bundle matches a pattern. Since the bundle's signer can * only change when the bundle is updated, this condition is immutable. *

* The condition expressed using a single String that specifies a Distinguished * Name (DN) chain to match bundle signers against. DN's are encoded using IETF * RFC 2253. Usually signers use certificates that are issued by certificate * authorities, which also have a corresponding DN and certificate. The * certificate authorities can form a chain of trust where the last DN and * certificate is known by the framework. The signer of a bundle is expressed as * signers DN followed by the DN of its issuer followed by the DN of the next * issuer until the DN of the root certificate authority. Each DN is separated * by a semicolon. *

* A bundle can satisfy this condition if one of its signers has a DN chain that * matches the DN chain used to construct this condition. Wildcards (`*') can be * used to allow greater flexibility in specifying the DN chains. Wildcards can * be used in place of DNs, RDNs, or the value in an RDN. If a wildcard is used * for a value of an RDN, the value must be exactly "*" and will match any value * for the corresponding type in that RDN. If a wildcard is used for a RDN, it * must be the first RDN and will match any number of RDNs (including zero * RDNs). * * @version $Revision: 1.8 $ */ public class BundleSignerCondition { /* * NOTE: A framework implementor may also choose to replace this class in * their distribution with a class that directly interfaces with the * framework implementation. This replacement class MUST NOT alter the * public/protected signature of this class. */ /* * This class will load the BundleSignerCondition class in the package named * by the org.osgi.vendor.condpermadmin package. This class will delegate * getCondition methods calls to the vendor BundleSignerCondition class. */ private static final String packageProperty = "org.osgi.vendor.condpermadmin"; private static final Method getCondition; static { getCondition = (Method) AccessController .doPrivileged(new PrivilegedAction() { public Object run() { String packageName = System .getProperty(packageProperty); if (packageName == null) { throw new NoClassDefFoundError(packageProperty + " property not set"); } Class delegateClass; try { delegateClass = Class.forName(packageName + ".BundleSignerCondition"); } catch (ClassNotFoundException e) { throw new NoClassDefFoundError(e.toString()); } Method result; try { result = delegateClass.getMethod("getCondition", new Class[] {Bundle.class, ConditionInfo.class }); } catch (NoSuchMethodException e) { throw new NoSuchMethodError(e.toString()); } if (!Modifier.isStatic(result.getModifiers())) { throw new NoSuchMethodError( "getCondition method must be static"); } return result; } }); } private static final String CONDITION_TYPE = "org.osgi.service.condpermadmin.BundleSignerCondition"; /** * Constructs a Condition that tries to match the passed Bundle's location * to the location pattern. * * @param bundle The Bundle being evaluated. * @param info The ConditionInfo to construct the condition for. The args of * the ConditionInfo specify a single String specifying the chain of * distinguished names pattern to match against the signer of the * Bundle. * @return A Condition which checks the signers of the specified bundle. */ static public Condition getCondition(Bundle bundle, ConditionInfo info) { if (!CONDITION_TYPE.equals(info.getType())) throw new IllegalArgumentException( "ConditionInfo must be of type \"" + CONDITION_TYPE + "\""); String[] args = info.getArgs(); if (args.length != 1) throw new IllegalArgumentException("Illegal number of args: " + args.length); try { try { return (Condition) getCondition.invoke(null, new Object[] { bundle, info}); } catch (InvocationTargetException e) { throw e.getTargetException(); } } catch (Error e) { throw e; } catch (RuntimeException e) { throw e; } catch (Throwable e) { throw new RuntimeException(e.toString()); } } private BundleSignerCondition() { // private constructor to prevent objects of this type } } PK L 3xx:OSGI-OPT/src/org/osgi/service/condpermadmin/Condition.java/* * $Header: /cvshome/build/org.osgi.service.condpermadmin/src/org/osgi/service/condpermadmin/Condition.java,v 1.10 2005/08/05 01:36:21 hargrave Exp $ * * Copyright (c) OSGi Alliance (2004, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.service.condpermadmin; import java.util.Dictionary; /** * The interface implemented by a Condition. Conditions are bound to Permissions * using Conditional Permission Info. The Permissions of a ConditionalPermission * Info can only be used if the associated Conditions are satisfied. * * @version $Revision: 1.10 $ */ public interface Condition { /** * A Condition object that will always evaluate to true and that is never * postponed. */ public final static Condition TRUE = new BooleanCondition(true); /** * A Condition object that will always evaluate to false and that is never * postponed. */ public final static Condition FALSE = new BooleanCondition(false); /** * Returns whether the evaluation must be postponed until the end of the * permission check. This method returns true if the * evaluation of the Condition must be postponed until the end of the * permission check. If this method returns false, this * Condition must be able to directly answer the {@link #isSatisfied()} * method. In other words, isSatisfied() will return very quickly since no * external sources, such as for example users, need to be consulted. * * @return true to indicate the evaluation must be postponed. * Otherwise, false if the evaluation can be * immediately performed. */ boolean isPostponed(); /** * Returns whether the Condition is satisfied. * * @return true to indicate the Conditions is satisfied. must * be postponed. Otherwise, false if the Condition is * not satisfied. */ boolean isSatisfied(); /** * Returns whether the Condition is mutable. * * @return true to indicate the value returned by * {@link #isSatisfied()} can change. Otherwise, false * if the value returned by {@link #isSatisfied()} will not change. */ boolean isMutable(); /** * Returns whether a the set of Conditions are satisfied. Although this * method is not static, it must be implemented as if it were static. All of * the passed Conditions will be of the same type and will correspond to the * class type of the object on which this method is invoked. * * @param conditions The array of Conditions. * @param context A Dictionary object that implementors can use to track * state. If this method is invoked multiple times in the same * permission evaluation, the same Dictionary will be passed multiple * times. The SecurityManager treats this Dictionary as an opaque * object and simply creates an empty dictionary and passes it to * subsequent invocations if multiple invocatios are needed. * @return true if all the Conditions are satisfied. * Otherwise, false if one of the Conditions is not * satisfied. */ boolean isSatisfied(Condition conditions[], Dictionary context); } /** * Package internal class used to define the {@link Condition#FALSE} and * {@link Condition#TRUE} constants. */ final class BooleanCondition implements Condition { final boolean satisfied; BooleanCondition(boolean satisfied) { this.satisfied = satisfied; } public boolean isPostponed() { return false; } public boolean isSatisfied() { return satisfied; } public boolean isMutable() { return false; } public boolean isSatisfied(Condition[] conds, Dictionary context) { for (int i = 0; i < conds.length; i++) { if (!conds[i].isSatisfied()) return false; } return true; } } PK L 3&u?%%>OSGI-OPT/src/org/osgi/service/condpermadmin/ConditionInfo.java/* * $Header: /cvshome/build/org.osgi.service.condpermadmin/src/org/osgi/service/condpermadmin/ConditionInfo.java,v 1.11 2005/08/05 01:36:21 hargrave Exp $ * * Copyright (c) OSGi Alliance (2004, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.service.condpermadmin; import java.util.ArrayList; /** * Condition representation used by the Conditional Permission Admin service. * *

* This class encapsulates two pieces of information: a Condition type * (class name), which must implement Condition, and the * arguments passed to its constructor. * *

* In order for a Condition represented by a ConditionInfo to be * instantiated and considered during a permission check, its Condition class * must be available from the system classpath. * *

* The Condition class must either: *

    *
  • Declare a public static getCondition method that takes a * Bundle object and a ConditionInfo object as * arguments. That method must return an object that implements the * Condition interface.
  • *
  • Implement the Condition interface and define a public * constructor that takes a Bundle object and a * ConditionInfo object as arguments. *
* * @version $Revision: 1.11 $ */ public class ConditionInfo { private String type; private String[] args; /** * Constructs a ConditionInfo from the specified type and * args. * * @param type The fully qualified class name of the Condition represented * by this ConditionInfo. * @param args The arguments for the Condition. These arguments are * available to the newly created Condition by calling the * {@link #getArgs()} method. * @throws java.lang.NullPointerException If type is * null. */ public ConditionInfo(String type, String[] args) { this.type = type; this.args = args != null ? args : new String[0]; if (type == null) { throw new NullPointerException("type is null"); } } /** * Constructs a ConditionInfo object from the specified * encoded ConditionInfo string. White space in the encoded * ConditionInfo string is ignored. * * @param encodedCondition The encoded ConditionInfo. * @see #getEncoded * @throws java.lang.IllegalArgumentException If the * encodedCondition is not properly formatted. */ public ConditionInfo(String encodedCondition) { if (encodedCondition == null) { throw new NullPointerException("missing encoded condition"); } if (encodedCondition.length() == 0) { throw new IllegalArgumentException("empty encoded condition"); } try { char[] encoded = encodedCondition.toCharArray(); int length = encoded.length; int pos = 0; /* skip whitespace */ while (Character.isWhitespace(encoded[pos])) { pos++; } /* the first character must be '[' */ if (encoded[pos] != '[') { throw new IllegalArgumentException("expecting open bracket"); } pos++; /* skip whitespace */ while (Character.isWhitespace(encoded[pos])) { pos++; } /* type is not quoted or encoded */ int begin = pos; while (!Character.isWhitespace(encoded[pos]) && (encoded[pos] != ']')) { pos++; } if (pos == begin || encoded[begin] == '"') { throw new IllegalArgumentException("expecting type"); } this.type = new String(encoded, begin, pos - begin); /* skip whitespace */ while (Character.isWhitespace(encoded[pos])) { pos++; } /* type may be followed by args which are quoted and encoded */ ArrayList argsList = new ArrayList(); while (encoded[pos] == '"') { pos++; begin = pos; while (encoded[pos] != '"') { if (encoded[pos] == '\\') { pos++; } pos++; } argsList.add(unescapeString(encoded, begin, pos)); pos++; if (Character.isWhitespace(encoded[pos])) { /* skip whitespace */ while (Character.isWhitespace(encoded[pos])) { pos++; } } } this.args = (String[]) argsList .toArray(new String[argsList.size()]); /* the final character must be ']' */ char c = encoded[pos]; pos++; while ((pos < length) && Character.isWhitespace(encoded[pos])) { pos++; } if ((c != ']') || (pos != length)) { throw new IllegalArgumentException("expecting close bracket"); } } catch (ArrayIndexOutOfBoundsException e) { throw new IllegalArgumentException("parsing terminated abruptly"); } } /** * Returns the string encoding of this ConditionInfo in a * form suitable for restoring this ConditionInfo. * *

* The encoding format is: * *

	 *   [type "arg0" "arg1" ...]
	 * 
* * where argN are strings that are encoded for proper parsing. * Specifically, the ", \, carriage return, * and linefeed characters are escaped using \", * \\, \r, and \n, * respectively. * *

* The encoded string contains no leading or trailing whitespace characters. * A single space character is used between type and "arg0" and * between the arguments. * * @return The string encoding of this ConditionInfo. */ public final String getEncoded() { StringBuffer output = new StringBuffer(); output.append('['); output.append(type); for (int i = 0; i < args.length; i++) { output.append(" \""); escapeString(args[i], output); output.append('\"'); } output.append(']'); return output.toString(); } /** * Returns the string representation of this ConditionInfo. * The string is created by calling the getEncoded method on * this ConditionInfo. * * @return The string representation of this ConditionInfo. */ public String toString() { return getEncoded(); } /** * Returns the fully qualified class name of the condition represented by * this ConditionInfo. * * @return The fully qualified class name of the condition represented by * this ConditionInfo. */ public final String getType() { return type; } /** * Returns arguments of this ConditionInfo. * * @return The arguments of this ConditionInfo. An empty * array is returned if the ConditionInfo has no * arguments. */ public final String[] getArgs() { return args; } /** * Determines the equality of two ConditionInfo objects. * * This method checks that specified object has the same type and args as * this ConditionInfo object. * * @param obj The object to test for equality with this * ConditionInfo object. * @return true if obj is a * ConditionInfo, and has the same type and args as * this ConditionInfo object; false * otherwise. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ConditionInfo)) { return false; } ConditionInfo other = (ConditionInfo) obj; if (!type.equals(other.type) || args.length != other.args.length) return false; for (int i = 0; i < args.length; i++) { if (!args[i].equals(other.args[i])) return false; } return true; } /** * Returns the hash code value for this object. * * @return A hash code value for this object. */ public int hashCode() { int hash = type.hashCode(); for (int i = 0; i < args.length; i++) { hash ^= args[i].hashCode(); } return hash; } /** * This escapes the quotes, backslashes, \n, and \r in the string using a * backslash and appends the newly escaped string to a StringBuffer. */ private static void escapeString(String str, StringBuffer output) { int len = str.length(); for (int i = 0; i < len; i++) { char c = str.charAt(i); switch (c) { case '"' : case '\\' : output.append('\\'); output.append(c); break; case '\r' : output.append("\\r"); break; case '\n' : output.append("\\n"); break; default : output.append(c); break; } } } /** * Takes an encoded character array and decodes it into a new String. */ private static String unescapeString(char[] str, int begin, int end) { StringBuffer output = new StringBuffer(end - begin); for (int i = begin; i < end; i++) { char c = str[i]; if (c == '\\') { i++; if (i < end) { c = str[i]; switch (c) { case '"' : case '\\' : break; case 'r' : c = '\r'; break; case 'n' : c = '\n'; break; default : c = '\\'; i--; break; } } } output.append(c); } return output.toString(); } } PK L 3m$KOSGI-OPT/src/org/osgi/service/condpermadmin/ConditionalPermissionAdmin.java/* * $Header: /cvshome/build/org.osgi.service.condpermadmin/src/org/osgi/service/condpermadmin/ConditionalPermissionAdmin.java,v 1.9 2005/08/11 03:07:41 hargrave Exp $ * * Copyright (c) OSGi Alliance (2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.service.condpermadmin; import java.security.AccessControlContext; import java.util.Enumeration; import org.osgi.service.permissionadmin.PermissionInfo; /** * Framework service to administer Conditional Permissions. Conditional * Permissions can be added to, retrieved from, and removed from the framework. * * @version $Revision: 1.9 $ */ public interface ConditionalPermissionAdmin { /** * Create a new Conditional Permission Info. * * The Conditional Permission Info will be given a unique, never reused * name. * * @param conds The Conditions that need to be satisfied to enable the * corresponding Permissions. * @param perms The Permissions that are enable when the corresponding * Conditions are satisfied. * @return The ConditionalPermissionInfo for the specified Conditions and * Permissions. * @throws SecurityException If the caller does not have * AllPermission. */ public ConditionalPermissionInfo addConditionalPermissionInfo( ConditionInfo conds[], PermissionInfo perms[]); /** * Set or create a Conditional Permission Info with a specified name. * * If the specified name is null, a new Conditional * Permission Info must be created and will be given a unique, never reused * name. If there is currently no Conditional Permission Info with the * specified name, a new Conditional Permission Info must be created with * the specified name. Otherwise, the Conditional Permission Info with the * specified name must be updated with the specified Conditions and * Permissions. * * @param name The name of the Conditional Permission Info, or * null. * @param conds The Conditions that need to be satisfied to enable the * corresponding Permissions. * @param perms The Permissions that are enable when the corresponding * Conditions are satisfied. * @return The ConditionalPermissionInfo that for the specified name, * Conditions and Permissions. * @throws SecurityException If the caller does not have * AllPermission. */ public ConditionalPermissionInfo setConditionalPermissionInfo(String name, ConditionInfo conds[], PermissionInfo perms[]); /** * Returns the Conditional Permission Infos that are currently managed by * Conditional Permission Admin. Calling * {@link ConditionalPermissionInfo#delete()} will remove the Conditional * Permission Info from Conditional Permission Admin. * * @return An enumeration of the Conditional Permission Infos that are * currently managed by Conditional Permission Admin. */ public Enumeration getConditionalPermissionInfos(); /** * Return the Conditional Permission Info with the specified name. * * @param name The name of the Conditional Permission Info to be returned. * @return The Conditional Permission Info with the specified name. */ public ConditionalPermissionInfo getConditionalPermissionInfo(String name); /** * Returns the Access Control Context that corresponds to the specified * signers. * * @param signers The signers for which to return an Access Control Context. * @return An AccessControlContext that has the Permissions * associated with the signer. */ public AccessControlContext getAccessControlContext(String[] signers); } PK L 3Q{6JOSGI-OPT/src/org/osgi/service/condpermadmin/ConditionalPermissionInfo.java/* * $Header: /cvshome/build/org.osgi.service.condpermadmin/src/org/osgi/service/condpermadmin/ConditionalPermissionInfo.java,v 1.9 2005/08/05 01:36:21 hargrave Exp $ * * Copyright (c) OSGi Alliance (2004, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.service.condpermadmin; import org.osgi.service.permissionadmin.PermissionInfo; /** * A binding of a set of Conditions to a set of Permissions. Instances of this * interface are obtained from the Conditional Permission Admin service. * * @version $Revision: 1.9 $ */ public interface ConditionalPermissionInfo { /** * Returns the Condition Infos for the Conditions that must be satisfied to * enable the Permissions. * * @return The Condition Infos for the Conditions in this Conditional * Permission Info. */ public ConditionInfo[] getConditionInfos(); /** * Returns the Permission Infos for the Permission in this Conditional * Permission Info. * * @return The Permission Infos for the Permission in this Conditional * Permission Info. */ public PermissionInfo[] getPermissionInfos(); /** * Removes this Conditional Permission Info from the Conditional Permission * Admin. * * @throws SecurityException If the caller does not have * AllPermission. */ public void delete(); /** * Returns the name of this Conditional Permission Info. * * @return The name of this Conditional Permission Info. */ public String getName(); } PK L 38OSGI-OPT/src/org/osgi/service/condpermadmin/package.html

The OSGi Conditional Permission Admin Specification Version 1.0.

Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. For example:

Import-Package: org.osgi.service.condpermadmin; version=1.0
PK L 3+OSGI-OPT/src/org/osgi/service/packageadmin/PK L 3mHf?OSGI-OPT/src/org/osgi/service/packageadmin/ExportedPackage.java/* * $Header: /cvshome/build/org.osgi.service.packageadmin/src/org/osgi/service/packageadmin/ExportedPackage.java,v 1.11 2005/07/30 01:58:30 hargrave Exp $ * * Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.service.packageadmin; import org.osgi.framework.Bundle; import org.osgi.framework.Version; /** * An exported package. * * Objects implementing this interface are created by the Package Admin service. * *

* The term exported package refers to a package that has been exported * from a resolved bundle. This package may or may not be currently wired to * other bundles. * *

* The information about an exported package provided by this object may change. * An ExportedPackage object becomes stale if the package it * references has been updated or removed as a result of calling * PackageAdmin.refreshPackages(). * * If this object becomes stale, its getName() and * getVersion() methods continue to return their original values, * isRemovalPending() returns true, and * getExportingBundle() and getImportingBundles() * return null. * * @version $Revision: 1.11 $ */ public interface ExportedPackage { /** * Returns the name of the package associated with this exported package. * * @return The name of this exported package. */ public String getName(); /** * Returns the bundle exporting the package associated with this exported * package. * * @return The exporting bundle, or null if this * ExportedPackage object has become stale. */ public Bundle getExportingBundle(); /** * Returns the resolved bundles that are currently wired to this exported * package. * *

* Bundles which require the exporting bundle associated with this exported * package are considered to be wired to this exported package are included * in the returned array. See {@link RequiredBundle#getRequiringBundles()}. * * @return The array of resolved bundles currently wired to this exported * package, or null if this * ExportedPackage object has become stale. */ public Bundle[] getImportingBundles(); /** * Returns the version of this exported package. * * @return The version of this exported package, or null if * no version information is available. * @deprecated Since 1.2. This method has been replaced by * {@link #getVersion}. */ public String getSpecificationVersion(); /** * Returns the version of this exported package. * * @return The version of this exported package, or * {@link Version#emptyVersion} if no version information is * available. * @since 1.2 */ public Version getVersion(); /** * Returns true if the package associated with this * ExportedPackage object has been exported by a bundle that * has been updated or uninstalled. * * @return true if the associated package is being exported * by a bundle that has been updated or uninstalled, or if this * ExportedPackage object has become stale; * false otherwise. */ public boolean isRemovalPending(); }PK L 3>l^-^-<OSGI-OPT/src/org/osgi/service/packageadmin/PackageAdmin.java/* * $Header: /cvshome/build/org.osgi.service.packageadmin/src/org/osgi/service/packageadmin/PackageAdmin.java,v 1.17 2005/08/11 03:07:32 hargrave Exp $ * * Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.service.packageadmin; import org.osgi.framework.Bundle; /** * Framework service which allows bundle programmers to inspect the package * wiring state of bundles in the Framework as well as other functions related * to the class loader network among bundles. * *

* If present, there will only be a single instance of this service registered * with the Framework. * * @version $Revision: 1.17 $ * @see org.osgi.service.packageadmin.ExportedPackage * @see org.osgi.service.packageadmin.RequiredBundle */ public interface PackageAdmin { /** * Gets the exported packages for the specified bundle. * * @param bundle The bundle whose exported packages are to be returned, or * null if all exported packages are to be returned. * If the specified bundle is the system bundle (that is, the bundle * with id zero), this method returns all the packages known to be * exported by the system bundle. This will include the package * specified by the org.osgi.framework.system.packages * system property as well as any other package exported by the * framework implementation. * * @return An array of exported packages, or null if the * specified bundle has no exported packages. */ public ExportedPackage[] getExportedPackages(Bundle bundle); /** * Gets the exported packages for the specified package name. * * @param name The name of the exported packages to be returned. * * @return An array of the exported packages, or null if no * exported packages with the specified name exists. * @since 1.2 */ public ExportedPackage[] getExportedPackages(String name); /** * Gets the exported package for the specified package name. * *

* If there are multiple exported packages with specified name, the exported * package with the highest version will be returned. * * @param name The name of the exported package to be returned. * * @return The exported package, or null if no exported * package with the specified name exists. * @see #getExportedPackages(String) */ public ExportedPackage getExportedPackage(String name); /** * Forces the update (replacement) or removal of packages exported by the * specified bundles. * *

* If no bundles are specified, this method will update or remove any * packages exported by any bundles that were previously updated or * uninstalled since the last call to this method. The technique by which * this is accomplished may vary among different Framework implementations. * One permissible implementation is to stop and restart the Framework. * *

* This method returns to the caller immediately and then performs the * following steps on a separate thread: * *

    *
  1. Compute a graph of bundles starting with the specified bundles. If * no bundles are specified, compute a graph of bundles starting with bundle * updated or uninstalled since the last call to this method. Add to the * graph any bundle that is wired to a package that is currently exported by * a bundle in the graph. The graph is fully constructed when there is no * bundle outside the graph that is wired to a bundle in the graph. The * graph may contain UNINSTALLED bundles that are currently * still exporting packages. * *
  2. Each bundle in the graph that is in the ACTIVE state * will be stopped as described in the Bundle.stop method. * *
  3. Each bundle in the graph that is in the RESOLVED * state is unresolved and thus moved to the INSTALLED state. * The effect of this step is that bundles in the graph are no longer * RESOLVED. * *
  4. Each bundle in the graph that is in the UNINSTALLED * state is removed from the graph and is now completely removed from the * Framework. * *
  5. Each bundle in the graph that was in the ACTIVE state * prior to Step 2 is started as described in the Bundle.start * method, causing all bundles required for the restart to be resolved. It * is possible that, as a result of the previous steps, packages that were * previously exported no longer are. Therefore, some bundles may be * unresolvable until another bundle offering a compatible package for * export has been installed in the Framework. *
  6. A framework event of type * FrameworkEvent.PACKAGES_REFRESHED is fired. *
* *

* For any exceptions that are thrown during any of these steps, a * FrameworkEvent of type ERROR is fired * containing the exception. The source bundle for these events should be * the specific bundle to which the exception is related. If no specific * bundle can be associated with the exception then the System Bundle must * be used as the source bundle for the event. * * @param bundles The bundles whose exported packages are to be updated or * removed, or null for all bundles updated or * uninstalled since the last call to this method. * @throws SecurityException If the caller does not have * AdminPermission[System Bundle,RESOLVE] and the * Java runtime environment supports permissions. */ public void refreshPackages(Bundle[] bundles); /** * Resolve the specified bundles. The Framework must attempt to resolve the * specified bundles that are unresolved. Additional bundles that are not * included in the specified bundles may be resolved as a result of calling * this method. A permissible implementation of this method is to attempt to * resolve all unresolved bundles installed in the framework. * *

* If null is specified then the Framework will attempt to * resolve all unresolved bundles. This method must not cause any bundle to * be refreshed, stopped, or started. This method will not return until the * operation has completed. * * @param bundles The bundles to resolve or null to resolve * all unresolved bundles installed in the Framework. * @return true if all specified bundles are resolved; * @throws SecurityException If the caller does not have * AdminPermission[System Bundle,RESOLVE] and the * Java runtime environment supports permissions. * @since 1.2 */ public boolean resolveBundles(Bundle[] bundles); /** * Returns an array of required bundles having the specified symbolic name. * *

* If null is specified, then all required bundles will be * returned. * * @param symbolicName The bundle symbolic name or null for * all required bundles. * @return An array of required bundles or null if no * required bundles exist for the specified symbolic name. * @since 1.2 */ public RequiredBundle[] getRequiredBundles(String symbolicName); /** * Returns the bundles with the specified symbolic name whose bundle version * is within the specified version range. If no bundles are installed that * have the specified symbolic name, then null is returned. * If a version range is specified, then only the bundles that have the * specified symbolic name and whose bundle versions belong to the specified * version range are returned. The returned bundles are ordered by version * in descending version order so that the first element of the array * contains the bundle with the highest version. * * @see org.osgi.framework.Constants#BUNDLE_VERSION_ATTRIBUTE * @param symbolicName The symbolic name of the desired bundles. * @param versionRange The version range of the desired bundles, or * null if all versions are desired. * @return An array of bundles with the specified name belonging to the * specified version range ordered in descending version order, or * null if no bundles are found. * @since 1.2 */ public Bundle[] getBundles(String symbolicName, String versionRange); /** * Returns an array of attached fragment bundles for the specified bundle. * If the specified bundle is a fragment then null is * returned. If no fragments are attached to the specified bundle then * null is returned. *

* This method does not attempt to resolve the specified bundle. If the * specified bundle is not resolved then null is returned. * * @param bundle The bundle whose attached fragment bundles are to be * returned. * @return An array of fragment bundles or null if the bundle * does not have any attached fragment bundles or the bundle is not * resolved. * @since 1.2 */ public Bundle[] getFragments(Bundle bundle); /** * Returns an array containing the host bundle to which the specified * fragment bundle is attached or null if the specified * bundle is not attached to a host or is not a fragment bundle. A fragment * may only be attached to a single host bundle. * * @param bundle The bundle whose host bundle is to be returned. * @return An array containing the host bundle or null if the * bundle does not have a host bundle. * @since 1.2 */ public Bundle[] getHosts(Bundle bundle); /** * Returns the bundle from which the specified class is loaded. The class * loader of the returned bundle must have been used to load the specified * class. If the class was not loaded by a bundle class loader then * null is returned. * * @param clazz The class object from which to locate the bundle. * @return The bundle from which the specified class is loaded or * null if the class was not loaded by a bundle class * loader. * @since 1.2 */ public Bundle getBundle(Class clazz); /** * Bundle type indicating the bundle is a fragment bundle. * *

* The value of BUNDLE_TYPE_FRAGMENT is 0x00000001. * * @since 1.2 */ public static final int BUNDLE_TYPE_FRAGMENT = 0x00000001; /** * Returns the special type of the specified bundle. The bundle type values * are: *

    *
  • {@link #BUNDLE_TYPE_FRAGMENT} *
* * A bundle may be more than one type at a time. A type code is used to * identify the bundle type for future extendability. * *

* If a bundle is not one or more of the defined types then 0x00000000 is * returned. * * @param bundle The bundle for which to return the special type. * @return The special type of the bundle. * @since 1.2 */ public int getBundleType(Bundle bundle); }PK L 3} } >OSGI-OPT/src/org/osgi/service/packageadmin/RequiredBundle.java/* * $Header: /cvshome/build/org.osgi.service.packageadmin/src/org/osgi/service/packageadmin/RequiredBundle.java,v 1.8 2005/07/27 18:11:04 hargrave Exp $ * * Copyright (c) OSGi Alliance (2004, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.service.packageadmin; import org.osgi.framework.Bundle; import org.osgi.framework.Version; /** * A required bundle. * * Objects implementing this interface are created by the Package Admin service. * *

* The term required bundle refers to a resolved bundle that has a * bundle symbolic name and is not a fragment. That is, a bundle that may be * required by other bundles. This bundle may or may not be currently required * by other bundles. * *

* The information about a required bundle provided by this object may change. A * RequiredBundle object becomes stale if an exported package of * the bundle it references has been updated or removed as a result of calling * PackageAdmin.refreshPackages()). * * If this object becomes stale, its getSymbolicName() and * getVersion() methods continue to return their original values, * isRemovalPending() returns true, and getBundle() * and getRequiringBundles() return null. * * @since 1.2 */ public interface RequiredBundle { /** * Returns the symbolic name of this required bundle. * * @return The symbolic name of this required bundle. */ public String getSymbolicName(); /** * Returns the bundle associated with this required bundle. * * @return The bundle, or null if this * RequiredBundle object has become stale. */ public Bundle getBundle(); /** * Returns the bundles that currently require this required bundle. * *

* If this required bundle is required and then re-exported by another * bundle then all the requiring bundles of the re-exporting bundle are * included in the returned array. * * @return An array of bundles currently requiring this required bundle, or * null if this RequiredBundle object * has become stale. */ public Bundle[] getRequiringBundles(); /** * Returns the version of this required bundle. * * @return The version of this required bundle, or * {@link Version#emptyVersion} if no version information is * available. */ public Version getVersion(); /** * Returns true if the bundle associated with this * RequiredBundle object has been updated or uninstalled. * * @return true if the reqiured bundle has been updated or * uninstalled, or if the RequiredBundle object has * become stale; false otherwise. */ public boolean isRemovalPending(); }PK L 387OSGI-OPT/src/org/osgi/service/packageadmin/package.html

The OSGi Package Admin service Package. Specification Version 1.2.

Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. For example:

Import-Package: org.osgi.service.packageadmin; version=1.2
PK L 3.OSGI-OPT/src/org/osgi/service/permissionadmin/PK L 3)%%BOSGI-OPT/src/org/osgi/service/permissionadmin/PermissionAdmin.java/* * $Header: /cvshome/build/org.osgi.service.permissionadmin/src/org/osgi/service/permissionadmin/PermissionAdmin.java,v 1.10 2005/08/04 03:34:57 hargrave Exp $ * * Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.service.permissionadmin; /** * The Permission Admin service allows management agents to manage the * permissions of bundles. There is at most one Permission Admin service present * in the OSGi environment. *

* Access to the Permission Admin service is protected by corresponding * ServicePermission. In addition AdminPermission is * required to actually set permissions. * *

* Bundle permissions are managed using a permission table. A bundle's location * serves as the key into this permission table. The value of a table entry is * the set of permissions (of type PermissionInfo) granted to the * bundle named by the given location. A bundle may have an entry in the * permission table prior to being installed in the Framework. * *

* The permissions specified in setDefaultPermissions are used as the * default permissions which are granted to all bundles that do not have an * entry in the permission table. * *

* Any changes to a bundle's permissions in the permission table will take * effect no later than when bundle's java.security.ProtectionDomain * is next involved in a permission check, and will be made persistent. * *

* Only permission classes on the system classpath or from an exported package * are considered during a permission check. Additionally, only permission * classes that are subclasses of java.security.Permission and define * a 2-argument constructor that takes a name string and an actions * string can be used. *

* Permissions implicitly granted by the Framework (for example, a bundle's * permission to access its persistent storage area) cannot be changed, and are * not reflected in the permissions returned by getPermissions and * getDefaultPermissions. * * @version $Revision: 1.10 $ */ public interface PermissionAdmin { /** * Gets the permissions assigned to the bundle with the specified location. * * @param location The location of the bundle whose permissions are to be * returned. * * @return The permissions assigned to the bundle with the specified * location, or null if that bundle has not been assigned * any permissions. */ PermissionInfo[] getPermissions(String location); /** * Assigns the specified permissions to the bundle with the specified * location. * * @param location The location of the bundle that will be assigned the * permissions. * @param permissions The permissions to be assigned, or null if * the specified location is to be removed from the permission table. * @throws SecurityException If the caller does not have * AllPermission. */ void setPermissions(String location, PermissionInfo[] permissions); /** * Returns the bundle locations that have permissions assigned to them, that * is, bundle locations for which an entry exists in the permission table. * * @return The locations of bundles that have been assigned any permissions, * or null if the permission table is empty. */ String[] getLocations(); /** * Gets the default permissions. * *

* These are the permissions granted to any bundle that does not have * permissions assigned to its location. * * @return The default permissions, or null if no default * permissions are set. */ PermissionInfo[] getDefaultPermissions(); /** * Sets the default permissions. * *

* These are the permissions granted to any bundle that does not have * permissions assigned to its location. * * @param permissions The default permissions, or null if the * default permissions are to be removed from the permission table. * @throws SecurityException If the caller does not have * AllPermission. */ void setDefaultPermissions(PermissionInfo[] permissions); }PK L 3iK-K-AOSGI-OPT/src/org/osgi/service/permissionadmin/PermissionInfo.java/* * $Header: /cvshome/build/org.osgi.service.permissionadmin/src/org/osgi/service/permissionadmin/PermissionInfo.java,v 1.14 2005/08/05 01:35:43 hargrave Exp $ * * Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.service.permissionadmin; /** * Permission representation used by the Permission Admin service. * *

* This class encapsulates three pieces of information: a Permission type * (class name), which must be a subclass of * java.security.Permission, and the name and actions * arguments passed to its constructor. * *

* In order for a permission represented by a PermissionInfo to be * instantiated and considered during a permission check, its Permission class * must be available from the system classpath or an exported package. This * means that the instantiation of a permission represented by a * PermissionInfo may be delayed until the package containing its * Permission class has been exported by a bundle. * * @version $Revision: 1.14 $ */ public class PermissionInfo { private String type; private String name; private String actions; /** * Constructs a PermissionInfo from the specified type, name, and * actions. * * @param type The fully qualified class name of the permission represented * by this PermissionInfo. The class must be a subclass * of java.security.Permission and must define a * 2-argument constructor that takes a name string and an * actions string. * * @param name The permission name that will be passed as the first argument * to the constructor of the Permission class identified * by type. * * @param actions The permission actions that will be passed as the second * argument to the constructor of the Permission class * identified by type. * * @throws java.lang.NullPointerException if type is * null. * @throws java.lang.IllegalArgumentException if action is not * null and name is null. */ public PermissionInfo(String type, String name, String actions) { this.type = type; this.name = name; this.actions = actions; if (type == null) { throw new NullPointerException("type is null"); } if ((name == null) && (actions != null)) { throw new IllegalArgumentException("name missing"); } } /** * Constructs a PermissionInfo object from the specified encoded * PermissionInfo string. White space in the encoded * PermissionInfo string is ignored. * * * @param encodedPermission The encoded PermissionInfo. * @see #getEncoded * @throws java.lang.IllegalArgumentException If the * encodedPermission is not properly formatted. */ public PermissionInfo(String encodedPermission) { if (encodedPermission == null) { throw new NullPointerException("missing encoded permission"); } if (encodedPermission.length() == 0) { throw new IllegalArgumentException("empty encoded permission"); } try { char[] encoded = encodedPermission.toCharArray(); int length = encoded.length; int pos = 0; /* skip whitespace */ while (Character.isWhitespace(encoded[pos])) { pos++; } /* the first character must be '(' */ if (encoded[pos] != '(') { throw new IllegalArgumentException( "expecting open parenthesis"); } pos++; /* skip whitespace */ while (Character.isWhitespace(encoded[pos])) { pos++; } /* type is not quoted or encoded */ int begin = pos; while (!Character.isWhitespace(encoded[pos]) && (encoded[pos] != ')')) { pos++; } if (pos == begin || encoded[begin] == '"') { throw new IllegalArgumentException("expecting type"); } this.type = new String(encoded, begin, pos - begin); /* skip whitespace */ while (Character.isWhitespace(encoded[pos])) { pos++; } /* type may be followed by name which is quoted and encoded */ if (encoded[pos] == '"') { pos++; begin = pos; while (encoded[pos] != '"') { if (encoded[pos] == '\\') { pos++; } pos++; } this.name = unescapeString(encoded, begin, pos); pos++; if (Character.isWhitespace(encoded[pos])) { /* skip whitespace */ while (Character.isWhitespace(encoded[pos])) { pos++; } /* name may be followed by actions which is quoted and encoded */ if (encoded[pos] == '"') { pos++; begin = pos; while (encoded[pos] != '"') { if (encoded[pos] == '\\') { pos++; } pos++; } this.actions = unescapeString(encoded, begin, pos); pos++; /* skip whitespace */ while (Character.isWhitespace(encoded[pos])) { pos++; } } } } /* the final character must be ')' */ char c = encoded[pos]; pos++; while ((pos < length) && Character.isWhitespace(encoded[pos])) { pos++; } if ((c != ')') || (pos != length)) { throw new IllegalArgumentException("expecting close parenthesis"); } } catch (ArrayIndexOutOfBoundsException e) { throw new IllegalArgumentException("parsing terminated abruptly"); } } /** * Returns the string encoding of this PermissionInfo in a form * suitable for restoring this PermissionInfo. * *

* The encoded format is: * *

	 * (type)
	 * 
* * or * *
	 * (type "name")
	 * 
* * or * *
	 * (type "name" "actions")
	 * 
* * where name and actions are strings that are encoded for * proper parsing. Specifically, the ",\, carriage * return, and linefeed characters are escaped using \", * \\,\r, and \n, respectively. * *

* The encoded string contains no leading or trailing whitespace * characters. A single space character is used between type and * "name" and between "name" and "actions". * * @return The string encoding of this PermissionInfo. */ public final String getEncoded() { StringBuffer output = new StringBuffer( 8 + type.length() + ((((name == null) ? 0 : name.length()) + ((actions == null) ? 0 : actions.length())) << 1)); output.append('('); output.append(type); if (name != null) { output.append(" \""); escapeString(name, output); if (actions != null) { output.append("\" \""); escapeString(actions, output); } output.append('\"'); } output.append(')'); return output.toString(); } /** * Returns the string representation of this PermissionInfo. The * string is created by calling the getEncoded method on this * PermissionInfo. * * @return The string representation of this PermissionInfo. */ public String toString() { return getEncoded(); } /** * Returns the fully qualified class name of the permission represented by * this PermissionInfo. * * @return The fully qualified class name of the permission represented by * this PermissionInfo. */ public final String getType() { return type; } /** * Returns the name of the permission represented by this * PermissionInfo. * * @return The name of the permission represented by this * PermissionInfo, or null if the permission * does not have a name. */ public final String getName() { return name; } /** * Returns the actions of the permission represented by this * PermissionInfo. * * @return The actions of the permission represented by this * PermissionInfo, or null if the permission * does not have any actions associated with it. */ public final String getActions() { return actions; } /** * Determines the equality of two PermissionInfo objects. * * This method checks that specified object has the same type, name and * actions as this PermissionInfo object. * * @param obj The object to test for equality with this * PermissionInfo object. * @return true if obj is a PermissionInfo, * and has the same type, name and actions as this * PermissionInfo object; false otherwise. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PermissionInfo)) { return false; } PermissionInfo other = (PermissionInfo) obj; if (!type.equals(other.type) || ((name == null) ^ (other.name == null)) || ((actions == null) ^ (other.actions == null))) { return false; } if (name != null) { if (actions != null) { return name.equals(other.name) && actions .equals(other.actions); } else { return name.equals(other.name); } } else { return true; } } /** * Returns the hash code value for this object. * * @return A hash code value for this object. */ public int hashCode() { int hash = type.hashCode(); if (name != null) { hash ^= name.hashCode(); if (actions != null) { hash ^= actions.hashCode(); } } return hash; } /** * This escapes the quotes, backslashes, \n, and \r in the string using a * backslash and appends the newly escaped string to a StringBuffer. */ private static void escapeString(String str, StringBuffer output) { int len = str.length(); for (int i = 0; i < len; i++) { char c = str.charAt(i); switch (c) { case '"' : case '\\' : output.append('\\'); output.append(c); break; case '\r' : output.append("\\r"); break; case '\n' : output.append("\\n"); break; default : output.append(c); break; } } } /** * Takes an encoded character array and decodes it into a new String. */ private static String unescapeString(char[] str, int begin, int end) { StringBuffer output = new StringBuffer(end - begin); for (int i = begin; i < end; i++) { char c = str[i]; if (c == '\\') { i++; if (i < end) { c = str[i]; switch (c) { case '"' : case '\\' : break; case 'r' : c = '\r'; break; case 'n' : c = '\n'; break; default : c = '\\'; i--; break; } } } output.append(c); } return output.toString(); } }PK L 3L:OSGI-OPT/src/org/osgi/service/permissionadmin/package.html

The OSGi Permission Admin service Package. Specification Version 1.2.

Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. For example:

Import-Package: org.osgi.service.permissionadmin; version=1.2
PK L 3)OSGI-OPT/src/org/osgi/service/startlevel/PK L 3-x8(8(8OSGI-OPT/src/org/osgi/service/startlevel/StartLevel.java/* * $Header: /cvshome/build/org.osgi.service.startlevel/src/org/osgi/service/startlevel/StartLevel.java,v 1.11 2005/08/11 03:07:40 hargrave Exp $ * * Copyright (c) OSGi Alliance (2002, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.service.startlevel; import org.osgi.framework.Bundle; /** * The StartLevel service allows management agents to manage a start level * assigned to each bundle and the active start level of the Framework. There is * at most one StartLevel service present in the OSGi environment. * *

* A start level is defined to be a state of execution in which the Framework * exists. StartLevel values are defined as unsigned integers with 0 (zero) * being the state where the Framework is not launched. Progressively higher * integral values represent progressively higher start levels. e.g. 2 is a * higher start level than 1. *

* Access to the StartLevel service is protected by corresponding * ServicePermission. In addition AdminPermission * is required to actually modify start level information. *

* Start Level support in the Framework includes the ability to control the * beginning start level of the Framework, to modify the active start level of * the Framework and to assign a specific start level to a bundle. How the * beginning start level of a Framework is specified is implementation * dependent. It may be a command line argument when invoking the Framework * implementation. *

* When the Framework is first started it must be at start level zero. In this * state, no bundles are running. This is the initial state of the Framework * before it is launched. * * When the Framework is launched, the Framework will enter start level one and * all bundles which are assigned to start level one and are persistently marked * to be started are started as described in the Bundle.start * method. Within a start level, bundles are started in ascending order by * Bundle.getBundleId. The Framework will continue to increase * the start level, starting bundles at each start level, until the Framework * has reached a beginning start level. At this point the Framework has * completed starting bundles and will then fire a Framework event of type * FrameworkEvent.STARTED to announce it has completed its * launch. * *

* The StartLevel service can be used by management bundles to alter the active * start level of the framework. * * @version $Revision: 1.11 $ */ public interface StartLevel { /** * Return the active start level value of the Framework. * * If the Framework is in the process of changing the start level this * method must return the active start level if this differs from the * requested start level. * * @return The active start level value of the Framework. */ public int getStartLevel(); /** * Modify the active start level of the Framework. * *

* The Framework will move to the requested start level. This method will * return immediately to the caller and the start level change will occur * asynchronously on another thread. * *

* If the specified start level is higher than the active start level, the * Framework will continue to increase the start level until the Framework * has reached the specified start level, starting bundles at each start * level which are persistently marked to be started as described in the * Bundle.start method. * * At each intermediate start level value on the way to and including the * target start level, the framework must: *

    *
  1. Change the active start level to the intermediate start level value. *
  2. Start bundles at the intermediate start level in ascending order by * Bundle.getBundleId. *
* When this process completes after the specified start level is reached, * the Framework will fire a Framework event of type * FrameworkEvent.STARTLEVEL_CHANGED to announce it has moved * to the specified start level. * *

* If the specified start level is lower than the active start level, the * Framework will continue to decrease the start level until the Framework * has reached the specified start level stopping bundles at each start * level as described in the Bundle.stop method except that * their persistently recorded state indicates that they must be restarted * in the future. * * At each intermediate start level value on the way to and including the * specified start level, the framework must: *

    *
  1. Stop bundles at the intermediate start level in descending order by * Bundle.getBundleId. *
  2. Change the active start level to the intermediate start level value. *
* When this process completes after the specified start level is reached, * the Framework will fire a Framework event of type * FrameworkEvent.STARTLEVEL_CHANGED to announce it has moved * to the specified start level. * *

* If the specified start level is equal to the active start level, then no * bundles are started or stopped, however, the Framework must fire a * Framework event of type FrameworkEvent.STARTLEVEL_CHANGED * to announce it has finished moving to the specified start level. This * event may arrive before the this method return. * * @param startlevel The requested start level for the Framework. * @throws IllegalArgumentException If the specified start level is less * than or equal to zero. * @throws SecurityException If the caller does not have * AdminPermission[System Bundle,STARTLEVEL] and the Java runtime * environment supports permissions. */ public void setStartLevel(int startlevel); /** * Return the assigned start level value for the specified Bundle. * * @param bundle The target bundle. * @return The start level value of the specified Bundle. * @throws java.lang.IllegalArgumentException If the specified bundle has * been uninstalled. */ public int getBundleStartLevel(Bundle bundle); /** * Assign a start level value to the specified Bundle. * *

* The specified bundle will be assigned the specified start level. The * start level value assigned to the bundle will be persistently recorded by * the Framework. * * If the new start level for the bundle is lower than or equal to the * active start level of the Framework, the Framework will start the * specified bundle as described in the Bundle.start method * if the bundle is persistently marked to be started. The actual starting * of this bundle must occur asynchronously. * * If the new start level for the bundle is higher than the active start * level of the Framework, the Framework will stop the specified bundle as * described in the Bundle.stop method except that the * persistently recorded state for the bundle indicates that the bundle must * be restarted in the future. The actual stopping of this bundle must occur * asynchronously. * * @param bundle The target bundle. * @param startlevel The new start level for the specified Bundle. * @throws IllegalArgumentException If the specified bundle has been * uninstalled or if the specified start level is less than or equal * to zero, or the specified bundle is the system bundle. * @throws SecurityException If the caller does not have * AdminPermission[bundle,EXECUTE] and the Java runtime * environment supports permissions. */ public void setBundleStartLevel(Bundle bundle, int startlevel); /** * Return the initial start level value that is assigned to a Bundle when it * is first installed. * * @return The initial start level value for Bundles. * @see #setInitialBundleStartLevel */ public int getInitialBundleStartLevel(); /** * Set the initial start level value that is assigned to a Bundle when it is * first installed. * *

* The initial bundle start level will be set to the specified start level. * The initial bundle start level value will be persistently recorded by the * Framework. * *

* When a Bundle is installed via BundleContext.installBundle, * it is assigned the initial bundle start level value. * *

* The default initial bundle start level value is 1 unless this method has * been called to assign a different initial bundle start level value. * *

* Thie method does not change the start level values of installed bundles. * * @param startlevel The initial start level for newly installed bundles. * @throws IllegalArgumentException If the specified start level is less * than or equal to zero. * @throws SecurityException If the caller does not have * AdminPermission[System Bundle,STARTLEVEL] and the Java runtime * environment supports permissions. */ public void setInitialBundleStartLevel(int startlevel); /** * Return the persistent state of the specified bundle. * *

* This method returns the persistent state of a bundle. The persistent * state of a bundle indicates whether a bundle is persistently marked to be * started when it's start level is reached. * * @param bundle The bundle for which to return the persistently started state. * @return true if the bundle is persistently marked to be * started, false if the bundle is not persistently * marked to be started. * @throws java.lang.IllegalArgumentException If the specified bundle has * been uninstalled. */ public boolean isBundlePersistentlyStarted(Bundle bundle); }PK L 3 dU5OSGI-OPT/src/org/osgi/service/startlevel/package.html

The OSGi StartLevel service Package. Specification Version 1.0.

Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. For example:

Import-Package: org.osgi.service.startlevel; version=1.0
PK L 3"OSGI-OPT/src/org/osgi/service/url/PK L 3s:__FOSGI-OPT/src/org/osgi/service/url/AbstractURLStreamHandlerService.java/* * $Header: /cvshome/build/org.osgi.service.url/src/org/osgi/service/url/AbstractURLStreamHandlerService.java,v 1.6 2005/05/13 20:32:35 hargrave Exp $ * * Copyright (c) OSGi Alliance (2002, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.service.url; import java.net.*; /** * Abstract implementation of the URLStreamHandlerService interface. * All the methods simply invoke the corresponding methods on * java.net.URLStreamHandler except for parseURL and * setURL, which use the URLStreamHandlerSetter * parameter. Subclasses of this abstract class should not need to override the * setURL and parseURL(URLStreamHandlerSetter,...) * methods. * * @version $Revision: 1.6 $ */ public abstract class AbstractURLStreamHandlerService extends URLStreamHandler implements URLStreamHandlerService { /** * @see "java.net.URLStreamHandler.openConnection" */ public abstract URLConnection openConnection(URL u) throws java.io.IOException; /** * The URLStreamHandlerSetter object passed to the parseURL * method. */ protected URLStreamHandlerSetter realHandler; /** * Parse a URL using the URLStreamHandlerSetter object. This * method sets the realHandler field with the specified * URLStreamHandlerSetter object and then calls * parseURL(URL,String,int,int). * * @param realHandler The object on which the setURL method must * be invoked for the specified URL. * @see "java.net.URLStreamHandler.parseURL" */ public void parseURL(URLStreamHandlerSetter realHandler, URL u, String spec, int start, int limit) { this.realHandler = realHandler; parseURL(u, spec, start, limit); } /** * This method calls super.toExternalForm. * * @see "java.net.URLStreamHandler.toExternalForm" */ public String toExternalForm(URL u) { return super.toExternalForm(u); } /** * This method calls super.equals(URL,URL). * * @see "java.net.URLStreamHandler.equals(URL,URL)" */ public boolean equals(URL u1, URL u2) { return super.equals(u1, u2); } /** * This method calls super.getDefaultPort. * * @see "java.net.URLStreamHandler.getDefaultPort" */ public int getDefaultPort() { return super.getDefaultPort(); } /** * This method calls super.getHostAddress. * * @see "java.net.URLStreamHandler.getHostAddress" */ public InetAddress getHostAddress(URL u) { return super.getHostAddress(u); } /** * This method calls super.hashCode(URL). * * @see "java.net.URLStreamHandler.hashCode(URL)" */ public int hashCode(URL u) { return super.hashCode(u); } /** * This method calls super.hostsEqual. * * @see "java.net.URLStreamHandler.hostsEqual" */ public boolean hostsEqual(URL u1, URL u2) { return super.hostsEqual(u1, u2); } /** * This method calls super.sameFile. * * @see "java.net.URLStreamHandler.sameFile" */ public boolean sameFile(URL u1, URL u2) { return super.sameFile(u1, u2); } /** * This method calls * realHandler.setURL(URL,String,String,int,String,String). * * @see "java.net.URLStreamHandler.setURL(URL,String,String,int,String,String)" * @deprecated This method is only for compatibility with handlers written * for JDK 1.1. */ protected void setURL(URL u, String proto, String host, int port, String file, String ref) { realHandler.setURL(u, proto, host, port, file, ref); } /** * This method calls * realHandler.setURL(URL,String,String,int,String,String,String,String). * * @see "java.net.URLStreamHandler.setURL(URL,String,String,int,String,String,String,String)" */ protected void setURL(URL u, String proto, String host, int port, String auth, String user, String path, String query, String ref) { realHandler.setURL(u, proto, host, port, auth, user, path, query, ref); } }PK L 3xX9r3OSGI-OPT/src/org/osgi/service/url/URLConstants.java/* * $Header: /cvshome/build/org.osgi.service.url/src/org/osgi/service/url/URLConstants.java,v 1.6 2005/05/13 20:32:35 hargrave Exp $ * * Copyright (c) OSGi Alliance (2002, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.service.url; /** * Defines standard names for property keys associated with * {@link URLStreamHandlerService}and java.net.ContentHandler * services. * *

* The values associated with these keys are of type java.lang.String[], * unless otherwise indicated. * * @version $Revision: 1.6 $ */ public interface URLConstants { /** * Service property naming the protocols serviced by a * URLStreamHandlerService. The property's value is an array of protocol * names. */ public static final String URL_HANDLER_PROTOCOL = "url.handler.protocol"; /** * Service property naming the MIME types serviced by a * java.net.ContentHandler. The property's value is an array of MIME types. */ public static final String URL_CONTENT_MIMETYPE = "url.content.mimetype"; }PK L 3o o >OSGI-OPT/src/org/osgi/service/url/URLStreamHandlerService.java/* * $Header: /cvshome/build/org.osgi.service.url/src/org/osgi/service/url/URLStreamHandlerService.java,v 1.6 2005/05/13 20:32:35 hargrave Exp $ * * Copyright (c) OSGi Alliance (2002, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.service.url; import java.net.*; /** * Service interface with public versions of the protected * java.net.URLStreamHandler methods. *

* The important differences between this interface and the * URLStreamHandler class are that the setURL method is * absent and the parseURL method takes a * {@link URLStreamHandlerSetter}object as the first argument. Classes * implementing this interface must call the setURL method on the * URLStreamHandlerSetter object received in the parseURL * method instead of URLStreamHandler.setURL to avoid a * SecurityException. * * @see AbstractURLStreamHandlerService * * @version $Revision: 1.6 $ */ public interface URLStreamHandlerService { /** * @see "java.net.URLStreamHandler.openConnection" */ public URLConnection openConnection(URL u) throws java.io.IOException; /** * Parse a URL. This method is called by the URLStreamHandler * proxy, instead of java.net.URLStreamHandler.parseURL, passing * a URLStreamHandlerSetter object. * * @param realHandler The object on which setURL must be invoked * for this URL. * @see "java.net.URLStreamHandler.parseURL" */ public void parseURL(URLStreamHandlerSetter realHandler, URL u, String spec, int start, int limit); /** * @see "java.net.URLStreamHandler.toExternalForm" */ public String toExternalForm(URL u); /** * @see "java.net.URLStreamHandler.equals(URL, URL)" */ public boolean equals(URL u1, URL u2); /** * @see "java.net.URLStreamHandler.getDefaultPort" */ public int getDefaultPort(); /** * @see "java.net.URLStreamHandler.getHostAddress" */ public InetAddress getHostAddress(URL u); /** * @see "java.net.URLStreamHandler.hashCode(URL)" */ public int hashCode(URL u); /** * @see "java.net.URLStreamHandler.hostsEqual" */ public boolean hostsEqual(URL u1, URL u2); /** * @see "java.net.URLStreamHandler.sameFile" */ public boolean sameFile(URL u1, URL u2); }PK L 3%=OSGI-OPT/src/org/osgi/service/url/URLStreamHandlerSetter.java/* * $Header: /cvshome/build/org.osgi.service.url/src/org/osgi/service/url/URLStreamHandlerSetter.java,v 1.6 2005/05/13 20:32:35 hargrave Exp $ * * Copyright (c) OSGi Alliance (2002, 2005). All Rights Reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. */ package org.osgi.service.url; import java.net.URL; /** * Interface used by URLStreamHandlerService objects to call the * setURL method on the proxy URLStreamHandler object. * *

* Objects of this type are passed to the * {@link URLStreamHandlerService#parseURL}method. Invoking the setURL * method on the URLStreamHandlerSetter object will invoke the * setURL method on the proxy URLStreamHandler object that * is actually registered with java.net.URL for the protocol. * * @version $Revision: 1.6 $ */ public interface URLStreamHandlerSetter { /** * @see "java.net.URLStreamHandler.setURL(URL,String,String,int,String,String)" * * @deprecated This method is only for compatibility with handlers written * for JDK 1.1. */ public void setURL(URL u, String protocol, String host, int port, String file, String ref); /** * @see "java.net.URLStreamHandler.setURL(URL,String,String,int,String,String,String,String)" */ public void setURL(URL u, String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref); }PK L 36{.OSGI-OPT/src/org/osgi/service/url/package.html

The OSGi URL Stream and Content Handlers API Package. Specification Version 1.0.

Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. For example:

Import-Package: org.osgi.service.url; version=1.0
PK L 3gZ. . about.html About

About This Content

Copyright

Copyright (c) 2000, 2005

OSGi Alliance
Bishop Ranch 6
2400 Camino Ramon, Suite 375
San Ramon, CA 94583 USA

All Rights Reserved.

License

The OSGi Alliance makes available all content in this jar ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, "Program" will mean the Content.

If you did not receive this Content directly from the OSGi Alliance, the Content is being redistributed by another party ("Redistributor") and different terms and conditions may apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise indicated below, the terms and conditions of the EPL still apply to any source code in the Content.

Notices

Implementation of certain elements of the Content may be subject to third party intellectual property rights, including without limitation, patent rights (such a third party may or may not be a member of the OSGi Alliance). The OSGi Alliance and its members are not responsible and shall not be held responsible in any manner for identifying or failing to identify any or all such third party intellectual property rights.

OSGi(TM) is a trademark, registered trademark, or service mark of The OSGi Alliance in the US and other countries. Java is a trademark, registered trademark, or service mark of Sun Microsystems, Inc. in the US and other countries. All other trademarks, registered trademarks, or service marks used in the Content are the property of their respective owners and are hereby recognized.

PK L 3n%AA epl-v10.html Eclipse Public License - Version 1.0

Eclipse Public License - v 1.0

THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.

1. DEFINITIONS

"Contribution" means:

a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
b) in the case of each subsequent Contributor:

i) changes to the Program, and

ii) additions to the Program;

where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.

"Contributor" means any person or entity that distributes the Program.

"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.

"Program" means the Contributions distributed in accordance with this Agreement.

"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.

2. GRANT OF RIGHTS

a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.

b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.

c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.

d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.

3. REQUIREMENTS

A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:

a) it complies with the terms and conditions of this Agreement; and

b) its license agreement:

i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;

ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;

iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and

iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.

When the Program is made available in source code form:

a) it must be made available under this Agreement; and

b) a copy of this Agreement must be included with each copy of the Program.

Contributors may not remove or alter any copyright notices contained within the Program.

Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.

4. COMMERCIAL DISTRIBUTION

Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.

For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.

5. NO WARRANTY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.

6. DISCLAIMER OF LIABILITY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. GENERAL

If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.

If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.

All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.

Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.

This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.

 

PK L 3org/PK L 3 org/osgi/PK L 3org/osgi/framework/PK L 3woo*org/osgi/framework/AdminPermission$1.class._ 45 6789 :; 4 <= > ?@ >AB CDE CF G CHIJK > :LMN()VCodeLineNumberTableLocalVariableTablethis InnerClasses&Lorg/osgi/framework/AdminPermission$1;run()Ljava/lang/Object; delegateClassLjava/lang/Class;e"Ljava/lang/ClassNotFoundException;!Ljava/lang/NoSuchMethodException; packageNameLjava/lang/String;result [Ljava/lang/reflect/Constructor; SourceFileAdminPermission.java org.osgi.vendor.frameworkO PQjava/lang/NoClassDefFoundError*org.osgi.vendor.framework property not set Rjava/lang/StringBuffer ST.AdminPermission UV WX java/lang/ClassNotFoundExceptionjava/lang/reflect/Constructorjava/lang/ClassY Z*java.lang.String [X \] ^*org.osgi.framework.Bundlejava/lang/NoSuchMethodExceptionjava/lang/NoSuchMethodError$org/osgi/framework/AdminPermission$1java/lang/Objectjava/security/PrivilegedActionjava/lang/System getProperty&(Ljava/lang/String;)Ljava/lang/String;(Ljava/lang/String;)Vappend,(Ljava/lang/String;)Ljava/lang/StringBuffer;toString()Ljava/lang/String;forName%(Ljava/lang/String;)Ljava/lang/Class;"org/osgi/framework/AdminPermissionclass$java$lang$Stringclass$getConstructor3([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;class$org$osgi$framework$Bundle  /*!" #&'( tL+ YY+  MNY-N-,YYSYYSS-,YYSYYSS:Y-+. @!: +./;@{"H+)*/ +, +-#&./;)*@0123% PK L 3u||(org/osgi/framework/AdminPermission.class. {|}~    )              % xserialVersionUIDJ ConstantValueBCjCLASSLjava/lang/String;EXECUTEEXTENSIONLIFECYCLE LIFECYCLELISTENERMETADATARESOLVERESOURCE STARTLEVELpackagePropertyinitStringStringLjava/lang/reflect/Constructor;initBundleStringdelegateLjava/security/Permission;class$java$lang$StringLjava/lang/Class; Syntheticclass$org$osgi$framework$Bundle()VCodeLineNumberTableLocalVariableTablethis$Lorg/osgi/framework/AdminPermission;'(Ljava/lang/String;Ljava/lang/String;)Ve-Ljava/lang/reflect/InvocationTargetException;Ljava/lang/Error;Ljava/lang/RuntimeException;Ljava/lang/Throwable;filteractions0(Lorg/osgi/framework/Bundle;Ljava/lang/String;)VbundleLorg/osgi/framework/Bundle; createName/(Lorg/osgi/framework/Bundle;)Ljava/lang/String;sbLjava/lang/StringBuffer;equals(Ljava/lang/Object;)ZobjLjava/lang/Object;phashCode()I getActions()Ljava/lang/String;implies(Ljava/security/Permission;)ZppnewPermissionCollection&()Ljava/security/PermissionCollection;class$%(Ljava/lang/String;)Ljava/lang/Class;x1"Ljava/lang/ClassNotFoundException;x0 constructors [Ljava/lang/reflect/Constructor; SourceFileAdminPermission.java r java/lang/ClassNotFoundExceptionjava/lang/NoClassDefFoundError k M* MT DEjava/lang/Object java/security/Permission GH+java/lang/reflect/InvocationTargetException java/lang/Errorjava/lang/RuntimeExceptionjava/lang/Throwable k _` FEjava/lang/StringBuffer MN(id=  )"org/osgi/framework/AdminPermission cd hi jk lm op$org/osgi/framework/AdminPermission$1 InnerClasses java/security/BasicPermissionclassexecuteextensionLifecycle lifecyclelistenermetadataresolveresource startlevelorg.osgi.vendor.frameworkjava/lang/ClassforName getMessage(Ljava/lang/String;)Vjava/lang/reflect/Constructor newInstance'([Ljava/lang/Object;)Ljava/lang/Object;getTargetException()Ljava/lang/Throwable;toStringappend,(Ljava/lang/String;)Ljava/lang/StringBuffer;org/osgi/framework/Bundle getBundleId()J(J)Ljava/lang/StringBuffer;java/security/AccessController doPrivileged4(Ljava/security/PrivilegedAction;)Ljava/lang/Object;1)*+,-/0,120,340,560,780,9:0,;<0,=>0,?@0,AB0,CDEFEGHIJKLJK MNO7 *P Q  RSMTOG*++*  Y+SY,S N-N-N-NY-'*030609P6 '*+034679:FQH+UV4UW7UX: UYGRSGZ0G[0M\OA*+* Y+SY,S N-N-N-NY-!$*-*0*3P6 !$%*-. 0 1 34@QH%UV.UW1UX4 UYARSA]^A[0 _`Oj&YL+W+*W+W+P!Q&]^abcdOs!+*++M* , P)*-.13Q !RS!ef gShiO2* !P<Q RSjkO2* "PNQ RSlmOd++M* , #Pop stQ RSgH nSopO2* $P~Q RSqrON*LY+PQ stu0KvNOQ%Y&'(K*2 *2PQ  wxyz %PK L 3˜+org/osgi/framework/AllServiceListener.class.  SourceFileAllServiceListener.java%org/osgi/framework/AllServiceListenerjava/lang/Object"org/osgi/framework/ServiceListenerPK L 3#<<org/osgi/framework/Bundle.class.<78 UNINSTALLEDI ConstantValue INSTALLEDRESOLVEDSTARTINGSTOPPINGACTIVE getState()Istart()V Exceptions9stopupdate(Ljava/io/InputStream;)V uninstall getHeaders()Ljava/util/Dictionary; getBundleId()J getLocation()Ljava/lang/String;getRegisteredServices(()[Lorg/osgi/framework/ServiceReference;getServicesInUse hasPermission(Ljava/lang/Object;)Z getResource"(Ljava/lang/String;)Ljava/net/URL;*(Ljava/lang/String;)Ljava/util/Dictionary;getSymbolicName loadClass%(Ljava/lang/String;)Ljava/lang/Class;: getResources+(Ljava/lang/String;)Ljava/util/Enumeration;; getEntryPathsgetEntrygetLastModified findEntries>(Ljava/lang/String;Ljava/lang/String;Z)Ljava/util/Enumeration; SourceFile Bundle.javaorg/osgi/framework/Bundlejava/lang/Object"org/osgi/framework/BundleException java/lang/ClassNotFoundExceptionjava/io/IOException      !"#"$%&'() *+,-./0.1'23456PK L 3*(org/osgi/framework/BundleActivator.class.   start%(Lorg/osgi/framework/BundleContext;)V Exceptions stop SourceFileBundleActivator.java"org/osgi/framework/BundleActivatorjava/lang/Objectjava/lang/Exception PK L 3A&org/osgi/framework/BundleContext.class-0 org/osgi/framework/BundleContextjava/lang/Object getProperty&(Ljava/lang/String;)Ljava/lang/String; getBundle()Lorg/osgi/framework/Bundle; installBundle/(Ljava/lang/String;)Lorg/osgi/framework/Bundle; Exceptions"org/osgi/framework/BundleException D(Ljava/lang/String;Ljava/io/InputStream;)Lorg/osgi/framework/Bundle;(J)Lorg/osgi/framework/Bundle; getBundles()[Lorg/osgi/framework/Bundle;addServiceListener9(Lorg/osgi/framework/ServiceListener;Ljava/lang/String;)V)org/osgi/framework/InvalidSyntaxException'(Lorg/osgi/framework/ServiceListener;)VremoveServiceListeneraddBundleListener&(Lorg/osgi/framework/BundleListener;)VremoveBundleListeneraddFrameworkListener)(Lorg/osgi/framework/FrameworkListener;)VremoveFrameworkListenerregisterServicee([Ljava/lang/String;Ljava/lang/Object;Ljava/util/Dictionary;)Lorg/osgi/framework/ServiceRegistration;d(Ljava/lang/String;Ljava/lang/Object;Ljava/util/Dictionary;)Lorg/osgi/framework/ServiceRegistration;getServiceReferencesL(Ljava/lang/String;Ljava/lang/String;)[Lorg/osgi/framework/ServiceReference;getAllServiceReferencesgetServiceReference9(Ljava/lang/String;)Lorg/osgi/framework/ServiceReference; getService9(Lorg/osgi/framework/ServiceReference;)Ljava/lang/Object; ungetService((Lorg/osgi/framework/ServiceReference;)Z getDataFile"(Ljava/lang/String;)Ljava/io/File; createFilter/(Ljava/lang/String;)Lorg/osgi/framework/Filter; SourceFileBundleContext.java        !" #" $%&'()*+,- ./PK L 3-z$org/osgi/framework/BundleEvent.class.4 . / 012serialVersionUIDJ ConstantValue8Y?X0[bundleLorg/osgi/framework/Bundle;typeI INSTALLEDSTARTEDSTOPPEDUPDATED UNINSTALLEDRESOLVED  UNRESOLVED@STARTINGSTOPPING(ILorg/osgi/framework/Bundle;)VCodeLineNumberTableLocalVariableTablethis Lorg/osgi/framework/BundleEvent; getBundle()Lorg/osgi/framework/Bundle;getType()I SourceFileBundleEvent.java !3 org/osgi/framework/BundleEventjava/util/EventObject(Ljava/lang/Object;)V!     !"#Z*,*,*$ % &'  ()#/*$% &'*+#/*$% &',-PK L 3)ae(org/osgi/framework/BundleException.class.&   ! "#$serialVersionUIDJ ConstantValue1acauseLjava/lang/Throwable;*(Ljava/lang/String;Ljava/lang/Throwable;)VCodeLineNumberTableLocalVariableTablethis$Lorg/osgi/framework/BundleException;msgLjava/lang/String;(Ljava/lang/String;)VgetNestedException()Ljava/lang/Throwable;getCause initCause,(Ljava/lang/Throwable;)Ljava/lang/Throwable; SourceFileBundleException.java  java/lang/IllegalStateException %"org/osgi/framework/BundleExceptionjava/lang/Exception()V!   Q *+*,+, -    G *+*67 8  /*F /*R <Y` PK L 3'org/osgi/framework/BundleListener.class.    bundleChanged#(Lorg/osgi/framework/BundleEvent;)V SourceFileBundleListener.java!org/osgi/framework/BundleListenerjava/lang/Objectjava/util/EventListenerPK L 3e<)org/osgi/framework/BundlePermission.class. m n o p q rst o uvw xy z {| }~  x  u u  serialVersionUIDJ ConstantValue-6292344PROVIDELjava/lang/String;REQUIREHOSTFRAGMENTACTION_PROVIDEIACTION_REQUIRE ACTION_HOSTACTION_FRAGMENT ACTION_ALL ACTION_NONE action_maskactions'(Ljava/lang/String;Ljava/lang/String;)VCodeLineNumberTableLocalVariableTablethis%Lorg/osgi/framework/BundlePermission; symbolicName(Ljava/lang/String;I)Vmaskinit(I)VgetMask(Ljava/lang/String;)IcCmatchlen seencommaZa[Ciimplies(Ljava/security/Permission;)ZtargetpLjava/security/Permission; getActions()Ljava/lang/String;sbLjava/lang/StringBuffer;commanewPermissionCollection&()Ljava/security/PermissionCollection;equals(Ljava/lang/Object;)ZobjLjava/lang/Object;hashCode()I writeObject(Ljava/io/ObjectOutputStream;)VsLjava/io/ObjectOutputStream; Exceptions readObject(Ljava/io/ObjectInputStream;)VLjava/io/ObjectInputStream; SourceFileBundlePermission.java EF 9A 9 7+ 8& CD"java/lang/IllegalArgumentExceptioninvalid action string java/lang/StringBuffer 9invalid permission: U#org/osgi/framework/BundlePermission OPprovide requirehostfragment-org/osgi/framework/BundlePermissionCollection U [\ _` TU  java/security/BasicPermissionjava/io/IOException java/lang/ClassNotFoundException(Ljava/lang/String;)Vjava/lang/String toCharArray()[C()Vappend,(Ljava/lang/String;)Ljava/lang/StringBuffer;toString(C)Ljava/lang/StringBuffer;getNamejava/io/ObjectOutputStreamdefaultWriteObjectjava/io/ObjectInputStreamdefaultReadObject1  !"#%&"'&"(&")&"*+",-+"./+"01+"23+"45+"67+8& 9:;L *+,< h i=  >? @& 8&9A;c*+***<rM Tst= >?@&B+CD;\ ~ Y *<| }=>?B+ EF;<=** N-d6M1-4Y6     -d4p-d4P-d4r-d4Rx-d4o-d4Ob-d4v-d4VL-d4i-d4I6-d4d-d4D -4e -4E6=-d4r-d4R-d4e-d4Ex-d4q-d4Qb-d4u-d4UL-d4i-d4I6-d4r-d4R -4e -4E6=Ea-d4h-d4HK-d4o-d4O5-d4s-d4S-4t -4T 6=-d4f-d4F-d4r-d4R-d4a-d4Ay-d4g-d4Gc-d4m-d4MM-d4e-d4E7-d4n-d4N!-4t -4T6=Y Y  * <pl-d4A > > > > >,<<Y Y  * d6Y Y  * <# "PV<>A\blp=f /'GHI+I+I+I+8&JKB+~LMxN+OP;v,+&+M*,~,*+<  *=  Q?,>?,RSTU;* Y L=*~ +W=*~ +,W+W=*~ +,W+W=*~ +,W+W*+*<Z#$%'(")$,.-2.9/@0B3L4P5W6^7`:l;p<w=~@C= wVWuXK>?YZ;2Y<M= >?[\;4+*++M*,*,<_`cdgi= 4>?4]^R?_`;:**<s= >?E`;/*<~= >?"ab;Q**W+< =>?cdef"gh;L+**<=>?ciefjklPK L 3L[dI I 3org/osgi/framework/BundlePermissionCollection.class.~ HI H J KLMN HO P Q R S TUV S W X Y Z [\ ]^ ]_` ]a ]b cdeserialVersionUIDJ ConstantValue-8032677 permissionsLjava/util/Hashtable; all_allowedZ()VCodeLineNumberTableLocalVariableTablethis/Lorg/osgi/framework/BundlePermissionCollection;add(Ljava/security/Permission;)VoldMaskInewMask permissionLjava/security/Permission;bp%Lorg/osgi/framework/BundlePermission;nameLjava/lang/String;existingimplies(Ljava/security/Permission;)Zxdesired effectivelastoffsetelements()Ljava/util/Enumeration; SourceFileBundlePermission.java *+java/util/Hashtable &' ()#org/osgi/framework/BundlePermission"java/lang/IllegalArgumentExceptionjava/lang/StringBufferinvalid permission: fg fh ij *k lmjava/lang/SecurityException>attempt to add a Permission to a readonly PermissionCollection nj op qr *s tu*v wx yr. z{ |} DE-org/osgi/framework/BundlePermissionCollection"java/security/PermissionCollectionappend,(Ljava/lang/String;)Ljava/lang/StringBuffer;,(Ljava/lang/Object;)Ljava/lang/StringBuffer;toString()Ljava/lang/String;(Ljava/lang/String;)V isReadOnly()ZgetNameget&(Ljava/lang/Object;)Ljava/lang/Object;getMask()I(Ljava/lang/String;I)Vput8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;java/lang/Stringequals(Ljava/lang/Object;)Zlength lastIndexOf(Ljava/lang/String;I)I substring(II)Ljava/lang/String;0 !"#$&'()*+,K**Y*-. /012,B+YY  + * Y+M,N*-:06,6*-Y-W *-+W*-*-F")38=JOV\c|.HV#34\54/0678d89=_:;JR<9=>, ++M,66*)*N--6~,:*N--6~d6Y6PY `  :*N--6~d6-n +/ 8 B DJW[dnp!y#%&()*+-2.f +?9/06789W?9@4A4J:;SB4y_C4DE,2*-=. /0FGPK L 30C a%org/osgi/framework/Configurable.class.  getConfigurationObject()Ljava/lang/Object; Deprecated SourceFileConfigurable.javaorg/osgi/framework/Configurablejava/lang/ObjectPK L 3gD~"org/osgi/framework/Constants.class.SYSTEM_BUNDLE_LOCATIONLjava/lang/String; ConstantValueSYSTEM_BUNDLE_SYMBOLICNAMEBUNDLE_CATEGORYBUNDLE_CLASSPATHBUNDLE_COPYRIGHTBUNDLE_DESCRIPTION BUNDLE_NAMEBUNDLE_NATIVECODEEXPORT_PACKAGEEXPORT_SERVICEIMPORT_PACKAGEDYNAMICIMPORT_PACKAGEIMPORT_SERVICE BUNDLE_VENDORBUNDLE_VERSION BUNDLE_DOCURLBUNDLE_CONTACTADDRESSBUNDLE_ACTIVATORBUNDLE_UPDATELOCATIONPACKAGE_SPECIFICATION_VERSION DeprecatedBUNDLE_NATIVECODE_PROCESSORBUNDLE_NATIVECODE_OSNAMEBUNDLE_NATIVECODE_OSVERSIONBUNDLE_NATIVECODE_LANGUAGE#BUNDLE_REQUIREDEXECUTIONENVIRONMENTFRAMEWORK_VERSIONFRAMEWORK_VENDORFRAMEWORK_LANGUAGEFRAMEWORK_OS_NAMEFRAMEWORK_OS_VERSIONFRAMEWORK_PROCESSORFRAMEWORK_EXECUTIONENVIRONMENTFRAMEWORK_BOOTDELEGATIONFRAMEWORK_SYSTEMPACKAGESSUPPORTS_FRAMEWORK_EXTENSION SUPPORTS_BOOTCLASSPATH_EXTENSIONSUPPORTS_FRAMEWORK_FRAGMENT SUPPORTS_FRAMEWORK_REQUIREBUNDLE OBJECTCLASS SERVICE_ID SERVICE_PIDSERVICE_RANKINGSERVICE_VENDORSERVICE_DESCRIPTIONBUNDLE_SYMBOLICNAMESINGLETON_DIRECTIVEFRAGMENT_ATTACHMENT_DIRECTIVEFRAGMENT_ATTACHMENT_ALWAYSFRAGMENT_ATTACHMENT_RESOLVETIMEFRAGMENT_ATTACHMENT_NEVERBUNDLE_LOCALIZATION$BUNDLE_LOCALIZATION_DEFAULT_BASENAMEREQUIRE_BUNDLEBUNDLE_VERSION_ATTRIBUTE FRAGMENT_HOSTSELECTION_FILTER_ATTRIBUTEBUNDLE_MANIFESTVERSIONVERSION_ATTRIBUTEBUNDLE_SYMBOLICNAME_ATTRIBUTERESOLUTION_DIRECTIVERESOLUTION_MANDATORYRESOLUTION_OPTIONALUSES_DIRECTIVEINCLUDE_DIRECTIVEEXCLUDE_DIRECTIVEMANDATORY_DIRECTIVEVISIBILITY_DIRECTIVEVISIBILITY_PRIVATEVISIBILITY_REEXPORTEXTENSION_DIRECTIVEEXTENSION_FRAMEWORKEXTENSION_BOOTCLASSPATH SourceFileConstants.javaorg/osgi/framework/Constantsjava/lang/Object System Bundle system.bundleBundle-CategoryBundle-ClassPathBundle-CopyrightBundle-Description Bundle-NameBundle-NativeCodeExport-PackageExport-ServiceImport-PackageDynamicImport-PackageImport-Service Bundle-VendorBundle-Version Bundle-DocURLBundle-ContactAddressBundle-ActivatorBundle-UpdateLocationspecification-version processorosname osversionlanguage#Bundle-RequiredExecutionEnvironmentorg.osgi.framework.versionorg.osgi.framework.vendororg.osgi.framework.languageorg.osgi.framework.os.nameorg.osgi.framework.os.versionorg.osgi.framework.processor'org.osgi.framework.executionenvironment!org.osgi.framework.bootdelegation"org.osgi.framework.system.packages%org.osgi.supports.framework.extension)org.osgi.supports.bootclasspath.extension$org.osgi.supports.framework.fragment)org.osgi.supports.framework.requirebundle objectClass service.id service.pidservice.rankingservice.vendorservice.descriptionBundle-SymbolicName singletonfragment-attachmentalways resolve-timeneverBundle-LocalizationOSGI-INF/l10n/bundleRequire-Bundlebundle-version Fragment-Hostselection-filterBundle-ManifestVersionversionbundle-symbolic-name resolution mandatoryoptionalusesincludeexclude visibilityprivatereexport extension framework bootclasspathH      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~PK L 3(yKOOorg/osgi/framework/Filter.class.match((Lorg/osgi/framework/ServiceReference;)Z(Ljava/util/Dictionary;)ZtoString()Ljava/lang/String;equals(Ljava/lang/Object;)ZhashCode()I matchCase SourceFile Filter.javaorg/osgi/framework/Filterjava/lang/Object    PK L 3D9++'org/osgi/framework/FrameworkEvent.class.8 1 2 3 456serialVersionUIDJ ConstantValueߗʦઉbundleLorg/osgi/framework/Bundle; throwableLjava/lang/Throwable;typeISTARTEDERRORPACKAGES_REFRESHEDSTARTLEVEL_CHANGEDWARNINGINFO (ILjava/lang/Object;)VCodeLineNumberTableLocalVariableTablethis#Lorg/osgi/framework/FrameworkEvent;sourceLjava/lang/Object; Deprecated4(ILorg/osgi/framework/Bundle;Ljava/lang/Throwable;)V getThrowable()Ljava/lang/Throwable; getBundle()Lorg/osgi/framework/Bundle;getType()I SourceFileFrameworkEvent.java 7  !org/osgi/framework/FrameworkEventjava/util/EventObject(Ljava/lang/Object;)V!           c*,***! " #$%&'( m*,**,*-! "*#$ )* /*!" #$+, /*!" #$-. /*!" #$/0PK L 3x<*org/osgi/framework/FrameworkListener.class.   frameworkEvent&(Lorg/osgi/framework/FrameworkEvent;)V SourceFileFrameworkListener.java$org/osgi/framework/FrameworkListenerjava/lang/Objectjava/util/EventListenerPK L 3#x(org/osgi/framework/FrameworkUtil$1.class-n"org/osgi/framework/FrameworkUtil$1java/lang/Objectjava/security/PrivilegedAction()VCode   LineNumberTableLocalVariableTablethis$Lorg/osgi/framework/FrameworkUtil$1;run()Ljava/lang/Object;org.osgi.vendor.frameworkjava/lang/System getProperty&(Ljava/lang/String;)Ljava/lang/String;  java/lang/NoClassDefFoundError*org.osgi.vendor.framework property not set(Ljava/lang/String;)V  java/lang/StringBuffer!java/lang/String#valueOf&(Ljava/lang/Object;)Ljava/lang/String; %& $' ".FrameworkUtil*append,(Ljava/lang/String;)Ljava/lang/StringBuffer; ,- ".toString()Ljava/lang/String; 01 "2java/lang/Class4forName%(Ljava/lang/String;)Ljava/lang/Class; 67 58java/lang/Throwable: ;2 createFilter= org/osgi/framework/FrameworkUtil?class$0Ljava/lang/Class; AB @Cjava.lang.StringE getMessage G1 ;H getMethod@(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method; JK 5Ljava/lang/NoSuchMethodErrorN Ojava/lang/reflect/MethodQ getModifiers()I ST RUjava/lang/reflect/ModifierWisStatic(I)Z YZ X["createFilter method must be static] java/lang/ClassNotFoundException_java/lang/NoSuchMethodExceptiona packageNameLjava/lang/String; delegateClasse"Ljava/lang/ClassNotFoundException;resultLjava/lang/reflect/Method;!Ljava/lang/NoSuchMethodException; SourceFileFrameworkUtil.java InnerClasses0 3*  1  aL+ Y "Y+()+/39MNY-< ,>5YDYWF9YDZ_I SMN:OY<P-V\ OY^P-..`LQX`;llb N435 6<=$<.?/@;E>FeElHnI{LMNMQ Rcd+eB;VeB/ fgihi{hin fjklm PK L 3sț&org/osgi/framework/FrameworkUtil.class-M org/osgi/framework/FrameworkUtiljava/lang/ObjectpackagePropertyLjava/lang/String; ConstantValueorg.osgi.vendor.framework createFilterLjava/lang/reflect/Method;class$0Ljava/lang/Class; Synthetic()VCode"org/osgi/framework/FrameworkUtil$1  java/security/AccessController doPrivileged4(Ljava/security/PrivilegedAction;)Ljava/lang/Object;  java/lang/reflect/Method LineNumberTableLocalVariableTable this"Lorg/osgi/framework/FrameworkUtil;/(Ljava/lang/String;)Lorg/osgi/framework/Filter; Exceptions)org/osgi/framework/InvalidSyntaxException(invoke9(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; *+ ,org/osgi/framework/Filter.+java/lang/reflect/InvocationTargetException0getTargetException()Ljava/lang/Throwable; 23 14java/lang/RuntimeException6java/lang/Throwable8toString()Ljava/lang/String; :; 9<(Ljava/lang/String;)V > 7?java/lang/ErrorAfiltere-Ljava/lang/reflect/InvocationTargetException;+Lorg/osgi/framework/InvalidSyntaxException;Ljava/lang/Error;Ljava/lang/RuntimeException;Ljava/lang/Throwable; SourceFileFrameworkUtil.java InnerClasses!   9Y !1 0"/*#!Z" $% &')/ Y*S-/L+5L+L+L+L7Y+=@1)B7"9!6 qrqtuxy{|~ "#">/CDEDFDG DH# DIJKL PK L 3DD/org/osgi/framework/InvalidSyntaxException.class.+ " # $% &'(serialVersionUIDJ ConstantValuedgnaJfilterLjava/lang/String;causeLjava/lang/Throwable;'(Ljava/lang/String;Ljava/lang/String;)VCodeLineNumberTableLocalVariableTablethis+Lorg/osgi/framework/InvalidSyntaxException;msg<(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V getFilter()Ljava/lang/String;getCause()Ljava/lang/Throwable; initCause,(Ljava/lang/Throwable;)Ljava/lang/Throwable; SourceFileInvalidSyntaxException.java )  java/lang/IllegalStateException *)org/osgi/framework/InvalidSyntaxExceptionjava/lang/Exception(Ljava/lang/String;)V()V!    Z*+*,*12 34  d*+*,*-DE FG* /*R /*^ <Yl !PK L 3SQ5kk*org/osgi/framework/PackagePermission.class. e f g h i jkl g mno pq r st uv wxy p z m{ m| } ~ serialVersionUIDJ ConstantValueȑ EXPORTLjava/lang/String;IMPORT ACTION_EXPORTI ACTION_IMPORT ACTION_ALL ACTION_NONE action_maskactions'(Ljava/lang/String;Ljava/lang/String;)VCodeLineNumberTableLocalVariableTablethis&Lorg/osgi/framework/PackagePermission;name(Ljava/lang/String;I)Vmaskinit(I)VgetMask(Ljava/lang/String;)IcCmatchlen seencommaZa[Ciimplies(Ljava/security/Permission;)ZtargetpLjava/security/Permission; getActions()Ljava/lang/String;sbLjava/lang/StringBuffer;commanewPermissionCollection&()Ljava/security/PermissionCollection;equals(Ljava/lang/Object;)ZobjLjava/lang/Object;hashCode()I writeObject(Ljava/io/ObjectOutputStream;)VsLjava/io/ObjectOutputStream; Exceptions readObject(Ljava/io/ObjectInputStream;)VLjava/io/ObjectInputStream; SourceFilePackagePermission.java => 19 1 /' 0$ ;<"java/lang/IllegalArgumentExceptioninvalid action string java/lang/StringBuffer 1invalid permission: M$org/osgi/framework/PackagePermission GHexport import.org/osgi/framework/PackagePermissionCollection M ST WX LM  java/security/BasicPermissionjava/io/IOException java/lang/ClassNotFoundException(Ljava/lang/String;)Vjava/lang/String toCharArray()[C()Vappend,(Ljava/lang/String;)Ljava/lang/StringBuffer;toString(C)Ljava/lang/StringBuffer;getNamejava/io/ObjectOutputStreamdefaultWriteObjectjava/io/ObjectInputStreamdefaultReadObject1  !#$ %$ &' ()' *+' ,-' ./'0$ 123L *+,4 c d5  67 8$ 0$193c*+***4m= Dno5 678$:';<3[ ~ Y *4w x{|567:' =>31<=** N-d61-4Y6     -d4i-d4Ix-d4m-d4Mb-d4p-d4PL-d4o-d4O6-d4r-d4R -4t -4T6=-d4e-d4Ex-d4x-d4Xb-d4p-d4PL-d4o-d4O6-d4r-d4R -4t -4T6=Y Y  * <mi-d4> ; ; ; ; ;,9<Y Y  * d6Y Y  * 4v "PVmqx/5R/'?@A'qA'10$/BC-:'"DEF'GH3v,+&+M*,~,*+4 *5  I7,67,JKLM3M*D Y L=*~ +W=*~ +,W+W*+*42    "$.29@H5 9NO7PCM67QR32Y4'5 67ST34+*++M*,*,49:=>AC5 4674UVJ7WX3:**4M5 67=X3/*4X5 67"YZ3Q**W+4ef gh567[\]^"_`3L+**4qrs567[a]^bcdPK L 3mcN N 4org/osgi/framework/PackagePermissionCollection.class.~ HI H J KLMN HO P Q R S TUV S W X Y Z [\ ]^ ]_` ]a ]b cdeserialVersionUIDJ ConstantValuerim- permissionsLjava/util/Hashtable; all_allowedZ()VCodeLineNumberTableLocalVariableTablethis0Lorg/osgi/framework/PackagePermissionCollection;add(Ljava/security/Permission;)VoldMaskInewMask permissionLjava/security/Permission;pp&Lorg/osgi/framework/PackagePermission;nameLjava/lang/String;existingimplies(Ljava/security/Permission;)Zxdesired effectivelastoffsetelements()Ljava/util/Enumeration; SourceFilePackagePermission.java *+java/util/Hashtable &' ()$org/osgi/framework/PackagePermission"java/lang/IllegalArgumentExceptionjava/lang/StringBufferinvalid permission: fg fh ij *k lmjava/lang/SecurityException>attempt to add a Permission to a readonly PermissionCollection nj op qr *s tu*v wx yr. z{ |} DE.org/osgi/framework/PackagePermissionCollection"java/security/PermissionCollectionappend,(Ljava/lang/String;)Ljava/lang/StringBuffer;,(Ljava/lang/Object;)Ljava/lang/StringBuffer;toString()Ljava/lang/String;(Ljava/lang/String;)V isReadOnly()ZgetNameget&(Ljava/lang/Object;)Ljava/lang/Object;getMask()I(Ljava/lang/String;I)Vput8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;java/lang/Stringequals(Ljava/lang/Object;)Zlength lastIndexOf(Ljava/lang/String;I)I substring(II)Ljava/lang/String;0 !"#$&'()*+,K**Y*-. /012,B+YY  + * Y+M,N*-:06,6*-Y-W *-+W*-*-F")38=JOV\c|.HV#34\54/0678d89=_:;JR<9=>, ++M,66*)*N--6~,:*N--6~d6Y6PY `  :*N--6~d6-n +/8BDJW[dnpy.f +?9/06789W?9@4A4J:;SB4y_C4DE,2*-. /0FGPK L 3 mm%org/osgi/framework/ServiceEvent.class.( " # $%&serialVersionUIDJ ConstantValuezPl reference%Lorg/osgi/framework/ServiceReference;typeI REGISTEREDMODIFIED UNREGISTERING)(ILorg/osgi/framework/ServiceReference;)VCodeLineNumberTableLocalVariableTablethis!Lorg/osgi/framework/ServiceEvent;getServiceReference'()Lorg/osgi/framework/ServiceReference;getType()I SourceFileServiceEvent.java ' org/osgi/framework/ServiceEventjava/util/EventObject(Ljava/lang/Object;)V!   Z*,*,*ab cd   /*o /*~  !PK L 3Eaa'org/osgi/framework/ServiceFactory.class.    getServiceW(Lorg/osgi/framework/Bundle;Lorg/osgi/framework/ServiceRegistration;)Ljava/lang/Object; ungetServiceX(Lorg/osgi/framework/Bundle;Lorg/osgi/framework/ServiceRegistration;Ljava/lang/Object;)V SourceFileServiceFactory.java!org/osgi/framework/ServiceFactoryjava/lang/ObjectPK L 3;(org/osgi/framework/ServiceListener.class.   serviceChanged$(Lorg/osgi/framework/ServiceEvent;)V SourceFileServiceListener.java"org/osgi/framework/ServiceListenerjava/lang/Objectjava/util/EventListenerPK L 3GXX*org/osgi/framework/ServicePermission.class. e f g h i jkl g mno pq r st uv wxy p z m{ m| } ~ serialVersionUIDJ ConstantValuehGETLjava/lang/String;REGISTER ACTION_GETIACTION_REGISTER ACTION_ALL ACTION_NONE action_maskactions'(Ljava/lang/String;Ljava/lang/String;)VCodeLineNumberTableLocalVariableTablethis&Lorg/osgi/framework/ServicePermission;name(Ljava/lang/String;I)Vmaskinit(I)VgetMask(Ljava/lang/String;)IcCmatchlen seencommaZa[Ciimplies(Ljava/security/Permission;)ZtargetpLjava/security/Permission; getActions()Ljava/lang/String;sbLjava/lang/StringBuffer;commanewPermissionCollection&()Ljava/security/PermissionCollection;equals(Ljava/lang/Object;)ZobjLjava/lang/Object;hashCode()I writeObject(Ljava/io/ObjectOutputStream;)VsLjava/io/ObjectOutputStream; Exceptions readObject(Ljava/io/ObjectInputStream;)VLjava/io/ObjectInputStream; SourceFileServicePermission.java => 19 1 /' 0$ ;<"java/lang/IllegalArgumentExceptioninvalid action string java/lang/StringBuffer 1invalid permission: M$org/osgi/framework/ServicePermission GHget register.org/osgi/framework/ServicePermissionCollection M ST WX LM  java/security/BasicPermissionjava/io/IOException java/lang/ClassNotFoundException(Ljava/lang/String;)Vjava/lang/String toCharArray()[C()Vappend,(Ljava/lang/String;)Ljava/lang/StringBuffer;toString(C)Ljava/lang/StringBuffer;getNamejava/io/ObjectOutputStreamdefaultWriteObjectjava/io/ObjectInputStreamdefaultReadObject1  !#$ %$ &' ()' *+' ,-' ./'0$ 123L *+,4 ] ^5  67 8$ 0$193c*+***4g5 <ij5 678$:';<3[ ~ Y *4r svw567:' =>3!<=** N-d61-4Y6     K-d4g-d4G5-d4e-d4E-4t -4T 6=-d4r-d4R-d4e-d4E-d4g-d4Gx-d4i-d4Ib-d4s-d4SL-d4t-d4T6-d4e-d4E -4r -4R6=Y Y  * <ok-d4@ = = = = =,;<Y Y  * d6Y Y  * 4v "PV[_f5R/'?@A'_A'!0$BC:'DE F'GH3v,+&+M*,~,*+4 *5  I7,67,JKLM3M*D Y L=*~ +W=*~ +,W+W*+*42 "$.29@H5 9NO7PCM67QR32Y4 5 67ST34+*++M*,*,4!"%'5 4674UVJ7WX3:**415 67=X3/*4;5 67"YZ3Q**W+4GH IJ567[\]^"_`3L+**4STU567[a]^bcdPK L 3\FN N 4org/osgi/framework/ServicePermissionCollection.class.~ HI H J KLMN HO P Q R S TUV S W X Y Z [\ ]^ ]_` ]a ]b cdeserialVersionUIDJ ConstantValue 2j % permissionsLjava/util/Hashtable; all_allowedZ()VCodeLineNumberTableLocalVariableTablethis0Lorg/osgi/framework/ServicePermissionCollection;add(Ljava/security/Permission;)VoldMaskInewMask permissionLjava/security/Permission;sp&Lorg/osgi/framework/ServicePermission;nameLjava/lang/String;existingimplies(Ljava/security/Permission;)Zxdesired effectivelastoffsetelements()Ljava/util/Enumeration; SourceFileServicePermission.java *+java/util/Hashtable &' ()$org/osgi/framework/ServicePermission"java/lang/IllegalArgumentExceptionjava/lang/StringBufferinvalid permission: fg fh ij *k lmjava/lang/SecurityException>attempt to add a Permission to a readonly PermissionCollection nj op qr *s tu*v wx yr. z{ |} DE.org/osgi/framework/ServicePermissionCollection"java/security/PermissionCollectionappend,(Ljava/lang/String;)Ljava/lang/StringBuffer;,(Ljava/lang/Object;)Ljava/lang/StringBuffer;toString()Ljava/lang/String;(Ljava/lang/String;)V isReadOnly()ZgetNameget&(Ljava/lang/Object;)Ljava/lang/Object;getMask()I(Ljava/lang/String;I)Vput8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;java/lang/Stringequals(Ljava/lang/Object;)Zlength lastIndexOf(Ljava/lang/String;I)I substring(II)Ljava/lang/String;0 !"#$&'()*+,K**Y*-tuvw. /012,B+YY  + * Y+M,N*-:06,6*-Y-W *-+W*-*-F")38=JOV\c|.HV#34\54/0678d89=_:;JR<9=>, ++M,66*)*N--6~,:*N--6~d6Y6PY `  :*N--6~d6-n +/8BDJW[dnpy.f +?9/06789W?9@4A4J:;SB4y_C4DE,2*-. /0FGPK L 3Mu3)org/osgi/framework/ServiceReference.class. getProperty&(Ljava/lang/String;)Ljava/lang/Object;getPropertyKeys()[Ljava/lang/String; getBundle()Lorg/osgi/framework/Bundle;getUsingBundles()[Lorg/osgi/framework/Bundle;isAssignableTo0(Lorg/osgi/framework/Bundle;Ljava/lang/String;)Z SourceFileServiceReference.java#org/osgi/framework/ServiceReferencejava/lang/Object   PK L 3 ,org/osgi/framework/ServiceRegistration.class.    getReference'()Lorg/osgi/framework/ServiceReference; setProperties(Ljava/util/Dictionary;)V unregister()V SourceFileServiceRegistration.java&org/osgi/framework/ServiceRegistrationjava/lang/Object  PK L 3Gݿ2org/osgi/framework/SynchronousBundleListener.class.  SourceFileSynchronousBundleListener.java,org/osgi/framework/SynchronousBundleListenerjava/lang/Object!org/osgi/framework/BundleListenerPK L 3J;; org/osgi/framework/Version.class. [ (\] ^ _ ` a bcd e f gh ijk lmnop qrs qt quv w qxy lz \ { | } q~ q q majorIminormicro qualifierLjava/lang/String; SEPARATOR ConstantValue emptyVersionLorg/osgi/framework/Version;(III)VCodeLineNumberTableLocalVariableTablethis(IIILjava/lang/String;)V(Ljava/lang/String;)VstLjava/util/StringTokenizer;e"Ljava/util/NoSuchElementException;versionvalidate()Vilength parseVersion0(Ljava/lang/String;)Lorg/osgi/framework/Version;getMajor()IgetMinorgetMicro getQualifier()Ljava/lang/String;toStringbasehashCodeequals(Ljava/lang/Object;)ZobjectLjava/lang/Object;other compareTo(Ljava/lang/Object;)Iresult SourceFile Version.java 4: 4B *+ ,+ -+ ./ ABjava/util/StringTokenizer. 4 L "java/lang/IllegalArgumentExceptioninvalid format 4; java/util/NoSuchElementExceptionnegative majornegative minornegative micro DH@ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_- invalid qualifier 23 Lorg/osgi/framework/Versionjava/lang/StringBuffer ML OH PQ U 45java/lang/Objectjava/lang/Comparable((Ljava/lang/String;Ljava/lang/String;Z)V nextTokenjava/lang/IntegerparseInt(Ljava/lang/String;)I hasMoreTokens()Zjava/lang/StringcharAt(I)CindexOf(I)Itrimappend(I)Ljava/lang/StringBuffer;,(Ljava/lang/String;)Ljava/lang/StringBuffer;!()*+,+-+./0/1 23456U *7 >?8* 93 *+ ,+ -+4:6'*:*****7& MN O RSTU"V&W84'93'*+',+'-+'./4;6*=>6: Y+  : =Q W >: W 6" W : Y:Y*****{~7nopqr svw%y-z3{<}D~JT\biq{~8R_<= >?93@/*+,+ -+./AB6d* Y* Y* Y*<=$* Yݱ72 ")3;BS]c8 =&C+d93;)D+ EF6_!**K*Y*7 8 !@/GH6/*78 93IH6/*78 93JH6/*78 93KL6/*78 93ML6QY *! "*! "*!#L*+Y +" "*"#7*468Q93*'N/OH6J *x*x`*x`*$`7 8  93PQ6J+*++M*,+*, *,*,%7 #$8 J93JRS5T3UV6H+*+M*,d>*,d>*,d>*,&76 BCF HIJM&N*O,R6S:T<W8*H93HRS <T32W+XB6&Y'7/YZPK L 3p org/osgi/framework/packageinfoversion 1.3 PK L 3org/osgi/service/PK L 3org/osgi/service/condpermadmin/PK L 35org/osgi/service/condpermadmin/BooleanCondition.class-$/org/osgi/service/condpermadmin/BooleanConditionjava/lang/Object(org/osgi/service/condpermadmin/Condition satisfiedZ(Z)VCode()V   LineNumberTableLocalVariableTablethis1Lorg/osgi/service/condpermadmin/BooleanCondition; isPostponed()Z isSatisfied isMutableD([Lorg/osgi/service/condpermadmin/Condition;Ljava/util/Dictionary;)Z  conds+[Lorg/osgi/service/condpermadmin/Condition;contextLjava/util/Dictionary;iI SourceFileCondition.java0  F **`a b   ,e  /*i  ,m  u>+2+qrsqu* !"#PK L 3i$>org/osgi/service/condpermadmin/BundleLocationCondition$1.class-!8org/osgi/service/condpermadmin/BundleLocationCondition$1java/lang/Objectjava/security/PrivilegedAction val$bundleLorg/osgi/framework/Bundle; Synthetic(Lorg/osgi/framework/Bundle;)VCode()V   LineNumberTableLocalVariableTablethis:Lorg/osgi/service/condpermadmin/BundleLocationCondition$1;run()Ljava/lang/Object;org/osgi/framework/Bundle getLocation()Ljava/lang/String;   SourceFileBundleLocationCondition.java InnerClasses0   8 **+ 3   4 *5   PK L 31k <org/osgi/service/condpermadmin/BundleLocationCondition.class-6org/osgi/service/condpermadmin/BundleLocationConditionjava/lang/ObjectCONDITION_TYPELjava/lang/String; ConstantValue6org.osgi.service.condpermadmin.BundleLocationCondition getConditionu(Lorg/osgi/framework/Bundle;Lorg/osgi/service/condpermadmin/ConditionInfo;)Lorg/osgi/service/condpermadmin/Condition;Code,org/osgi/service/condpermadmin/ConditionInfo getType()Ljava/lang/String;  java/lang/Stringequals(Ljava/lang/Object;)Z  "java/lang/IllegalArgumentExceptionVConditionInfo must be of type "org.osgi.service.condpermadmin.BundleLocationCondition"(Ljava/lang/String;)V  getArgs()[Ljava/lang/String; !" #java/lang/StringBuffer%Illegal number of args: ' &append(I)Ljava/lang/StringBuffer; *+ &,toString . &/8org/osgi/service/condpermadmin/BundleLocationCondition$11(Lorg/osgi/framework/Bundle;)V 3 24java/security/AccessController6 doPrivileged4(Ljava/security/PrivilegedAction;)Ljava/lang/Object; 89 7: (location=<escapeLocation&(Ljava/lang/String;)Ljava/lang/String; >? @,(Ljava/lang/String;)Ljava/lang/StringBuffer; *B &C)E org/osgi/framework/FrameworkUtilG createFilter/(Ljava/lang/String;)Lorg/osgi/framework/Filter; IJ HKjava/lang/RuntimeExceptionMInvalid filter: O)org/osgi/framework/InvalidSyntaxExceptionQ getFilter S RT Njava/util/HashtableW(I)V Y XZlocation\put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; ^_ X`org/osgi/framework/Filterbmatch(Ljava/util/Dictionary;)Z de cf(org/osgi/service/condpermadmin/ConditionhTRUE*Lorg/osgi/service/condpermadmin/Condition; jk ilFALSE nk ioLineNumberTableLocalVariableTablebundleLorg/osgi/framework/Bundle;info.Lorg/osgi/service/condpermadmin/ConditionInfo;args[Ljava/lang/String;bundleLocationfilterLorg/osgi/framework/Filter;e+Lorg/osgi/framework/InvalidSyntaxException; matchPropsLjava/util/Hashtable;()V  this8Lorg/osgi/service/condpermadmin/BundleLocationCondition;length()I getChars(II[CI)V ([CII)V  valueescapedZinlenIoutlenoutput[CcursoricC SourceFileBundleLocationCondition.java InnerClasses!   o + Y +$M,Y&Y(),-0 2Y*5;N:&Y=),2ADFD0L:!:NY&YP)UD0VXY[:]-aWg mpLnnRqR+ ,-,./!0.160:3E2I8L:U;c:n=p?ABCrHstuvwxIlyLiz{p|}~ 3*q FHr  >? K<*=x>:*66]46D(8)8\!``4*\U<UY*qJRST VWYZ"[)\L^`_cbjcmdohviyZlrR {c)P 2PK L 3u<org/osgi/service/condpermadmin/BundleSignerCondition$1.class-s6org/osgi/service/condpermadmin/BundleSignerCondition$1java/lang/Objectjava/security/PrivilegedAction()VCode   LineNumberTableLocalVariableTablethis8Lorg/osgi/service/condpermadmin/BundleSignerCondition$1;run()Ljava/lang/Object;org.osgi.vendor.condpermadminjava/lang/System getProperty&(Ljava/lang/String;)Ljava/lang/String;  java/lang/NoClassDefFoundError.org.osgi.vendor.condpermadmin property not set(Ljava/lang/String;)V  java/lang/StringBuffer!java/lang/String#valueOf&(Ljava/lang/Object;)Ljava/lang/String; %& $' ".BundleSignerCondition*append,(Ljava/lang/String;)Ljava/lang/StringBuffer; ,- ".toString()Ljava/lang/String; 01 "2java/lang/Class4forName%(Ljava/lang/String;)Ljava/lang/Class; 67 58java/lang/Throwable: ;2 getCondition=4org/osgi/service/condpermadmin/BundleSignerCondition?class$0Ljava/lang/Class; AB @Corg.osgi.framework.BundleE getMessage G1 ;Hclass$1 JB @K,org.osgi.service.condpermadmin.ConditionInfoM getMethod@(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method; OP 5Qjava/lang/NoSuchMethodErrorS Tjava/lang/reflect/MethodV getModifiers()I XY WZjava/lang/reflect/Modifier\isStatic(I)Z ^_ ]`"getCondition method must be staticb java/lang/ClassNotFoundExceptiondjava/lang/NoSuchMethodExceptionf packageNameLjava/lang/String; delegateClasse"Ljava/lang/ClassNotFoundException;resultLjava/lang/reflect/Method;!Ljava/lang/NoSuchMethodException; SourceFileBundleSignerCondition.java InnerClasses0 3*  =  L+ Y "Y+()+/39MNY-< ,>5YDYWF9YDZ_I SYLYWN9YLZ_I SRN:TY<U-[a TYcU-..eLQXeot{e;g V@?A BHI$H.K/L;Q>RDRgSQUVYZ[Z^ Rhi+jB;yjB/ klmnmn kopqr PK L 3Mgti :org/osgi/service/condpermadmin/BundleSignerCondition.class-p4org/osgi/service/condpermadmin/BundleSignerConditionjava/lang/ObjectpackagePropertyLjava/lang/String; ConstantValueorg.osgi.vendor.condpermadmin getConditionLjava/lang/reflect/Method;CONDITION_TYPE4org.osgi.service.condpermadmin.BundleSignerCondition class$0Ljava/lang/Class; Syntheticclass$1()VCode6org/osgi/service/condpermadmin/BundleSignerCondition$1  java/security/AccessController doPrivileged4(Ljava/security/PrivilegedAction;)Ljava/lang/Object;  java/lang/reflect/Method! #LineNumberTableLocalVariableTableu(Lorg/osgi/framework/Bundle;Lorg/osgi/service/condpermadmin/ConditionInfo;)Lorg/osgi/service/condpermadmin/Condition;,org/osgi/service/condpermadmin/ConditionInfo(getType()Ljava/lang/String; *+ ),java/lang/String.equals(Ljava/lang/Object;)Z 01 /2"java/lang/IllegalArgumentException4TConditionInfo must be of type "org.osgi.service.condpermadmin.BundleSignerCondition"6(Ljava/lang/String;)V 8 59getArgs()[Ljava/lang/String; ;< )=java/lang/StringBuffer?Illegal number of args: A @9append(I)Ljava/lang/StringBuffer; DE @FtoString H+ @Iinvoke9(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; KL "M(org/osgi/service/condpermadmin/ConditionO+java/lang/reflect/InvocationTargetExceptionQgetTargetException()Ljava/lang/Throwable; ST RUjava/lang/RuntimeExceptionWjava/lang/ThrowableY ZI X9java/lang/Error]bundleLorg/osgi/framework/Bundle;info.Lorg/osgi/service/condpermadmin/ConditionInfo;args[Ljava/lang/String;e-Ljava/lang/reflect/InvocationTargetException;Ljava/lang/Error;Ljava/lang/RuntimeException;Ljava/lang/Throwable; this6Lorg/osgi/service/condpermadmin/BundleSignerCondition; SourceFileBundleSignerCondition.java InnerClasses!   9Y "$%= <,& '<j+-3 5Y7:+>M,5Y@YBC,GJ:$Y*SY+SNPN-VN-N-NXY-[\:QQR:WW^:WZX:W]Z%Rq rsrtu!v.w6v:{D|J{Q~RWXZ[]^&Hj_`jabOcdRefXeg[eh^ ei3*j% & klmno PK L 3AǛfRR.org/osgi/service/condpermadmin/Condition.class-(org/osgi/service/condpermadmin/Conditionjava/lang/ObjectTRUE*Lorg/osgi/service/condpermadmin/Condition;FALSE()VCode/org/osgi/service/condpermadmin/BooleanCondition (Z)V      LineNumberTableLocalVariableTable isPostponed()Z isSatisfied isMutableD([Lorg/osgi/service/condpermadmin/Condition;Ljava/util/Dictionary;)Z SourceFileCondition.java  ? Y Y !PK L 3Juu2org/osgi/service/condpermadmin/ConditionInfo.class-,org/osgi/service/condpermadmin/ConditionInfojava/lang/ObjecttypeLjava/lang/String;args[Ljava/lang/String;((Ljava/lang/String;[Ljava/lang/String;)VCode()V   java/lang/String  java/lang/NullPointerException type is null(Ljava/lang/String;)V  LineNumberTableLocalVariableTablethis.Lorg/osgi/service/condpermadmin/ConditionInfo;missing encoded condition length()I "# $"java/lang/IllegalArgumentException&empty encoded condition( ' toCharArray()[C +, -java/lang/Character/ isWhitespace(C)Z 12 03expecting open bracket5expecting type7([CII)V 9 :java/util/ArrayList< = unescapeString([CII)Ljava/lang/String; ?@ Aadd(Ljava/lang/Object;)Z CD =Esize G# =HtoArray(([Ljava/lang/Object;)[Ljava/lang/Object; JK =Lexpecting close bracketOparsing terminated abruptlyQ(java/lang/ArrayIndexOutOfBoundsExceptionSencodedConditionencoded[CIposbeginargsListLjava/util/ArrayList;cCe*Ljava/lang/ArrayIndexOutOfBoundsException; getEncoded()Ljava/lang/String;java/lang/StringBufferc d append(C)Ljava/lang/StringBuffer; fg dh,(Ljava/lang/String;)Ljava/lang/StringBuffer; fj dk "m escapeString-(Ljava/lang/String;Ljava/lang/StringBuffer;)V op qtoString sb dtoutputLjava/lang/StringBuffer;i ab ygetTypegetArgs()[Ljava/lang/String;equals ~D objLjava/lang/Object;otherhashCode # hashcharAt(I)C \r\nstrlen(I)V dend SourceFileConditionInfo.java!   z(**+*,,+ Y:; <=>'@ (((  y*+ Y!+% 'Y)*+.M,>6,44,4[ 'Y6*,446,44 ,4] ,4" 'Y8**Y,d;,44=Y>:P6,4\,4",BFW,44,44,4"*IMN,46 ,44] 'YP*M'YR*#mmT9LMNPQ#T(U+V.Y1Z4Y>^G_QaTdWeZddihjklnjxknoqtutyz{|}~}  z !.4:=@CS`mnx\ yyU(EVW+B"X.?YXhZX[\:3]^n _`ab MdYeL+[iW+*lW=+nlW*2+r+"iW*+]iW+u* $.5AH MEvw'xXsb /*z {b /* |} /* ~D Y+*++M*,*,>*2,2*2 027IKW*YYD4#xX# u'*<=*2<* % 'X xX op q*%=>d*6N D :")\)+\iW+iW+lW+lW +iW:  !<$C%J&M(T)W+^,a.hp24qqvwlXixXW]^ ?@ %dYdN6l*46\UL*46:")\)n3r, 6 6 \6-iW-uJ8 9:;<!='>-?XB[D_EbGfHiJmKpPw9S>WZXX zvwrxX`]^PK L 3^^?org/osgi/service/condpermadmin/ConditionalPermissionAdmin.class-9org/osgi/service/condpermadmin/ConditionalPermissionAdminjava/lang/ObjectaddConditionalPermissionInfo([Lorg/osgi/service/condpermadmin/ConditionInfo;[Lorg/osgi/service/permissionadmin/PermissionInfo;)Lorg/osgi/service/condpermadmin/ConditionalPermissionInfo;setConditionalPermissionInfo(Ljava/lang/String;[Lorg/osgi/service/condpermadmin/ConditionInfo;[Lorg/osgi/service/permissionadmin/PermissionInfo;)Lorg/osgi/service/condpermadmin/ConditionalPermissionInfo;getConditionalPermissionInfos()Ljava/util/Enumeration;getConditionalPermissionInfoN(Ljava/lang/String;)Lorg/osgi/service/condpermadmin/ConditionalPermissionInfo;getAccessControlContext9([Ljava/lang/String;)Ljava/security/AccessControlContext; SourceFileConditionalPermissionAdmin.java   PK L 3,6>org/osgi/service/condpermadmin/ConditionalPermissionInfo.class-8org/osgi/service/condpermadmin/ConditionalPermissionInfojava/lang/ObjectgetConditionInfos1()[Lorg/osgi/service/condpermadmin/ConditionInfo;getPermissionInfos4()[Lorg/osgi/service/permissionadmin/PermissionInfo;delete()VgetName()Ljava/lang/String; SourceFileConditionalPermissionInfo.java   PK L 36 *org/osgi/service/condpermadmin/packageinfoversion 1.0 PK L 3org/osgi/service/packageadmin/PK L 3v 3org/osgi/service/packageadmin/ExportedPackage.class--org/osgi/service/packageadmin/ExportedPackagejava/lang/ObjectgetName()Ljava/lang/String;getExportingBundle()Lorg/osgi/framework/Bundle;getImportingBundles()[Lorg/osgi/framework/Bundle;getSpecificationVersion Deprecated getVersion()Lorg/osgi/framework/Version;isRemovalPending()Z SourceFileExportedPackage.java    PK L 38`0org/osgi/service/packageadmin/PackageAdmin.class-*org/osgi/service/packageadmin/PackageAdminjava/lang/ObjectBUNDLE_TYPE_FRAGMENTI ConstantValuegetExportedPackagesM(Lorg/osgi/framework/Bundle;)[Lorg/osgi/service/packageadmin/ExportedPackage;D(Ljava/lang/String;)[Lorg/osgi/service/packageadmin/ExportedPackage;getExportedPackageC(Ljava/lang/String;)Lorg/osgi/service/packageadmin/ExportedPackage;refreshPackages([Lorg/osgi/framework/Bundle;)VresolveBundles([Lorg/osgi/framework/Bundle;)ZgetRequiredBundlesC(Ljava/lang/String;)[Lorg/osgi/service/packageadmin/RequiredBundle; getBundlesB(Ljava/lang/String;Ljava/lang/String;)[Lorg/osgi/framework/Bundle; getFragments9(Lorg/osgi/framework/Bundle;)[Lorg/osgi/framework/Bundle;getHosts getBundle.(Ljava/lang/Class;)Lorg/osgi/framework/Bundle; getBundleType(Lorg/osgi/framework/Bundle;)I SourceFilePackageAdmin.java    PK L 3`22org/osgi/service/packageadmin/RequiredBundle.class-,org/osgi/service/packageadmin/RequiredBundlejava/lang/ObjectgetSymbolicName()Ljava/lang/String; getBundle()Lorg/osgi/framework/Bundle;getRequiringBundles()[Lorg/osgi/framework/Bundle; getVersion()Lorg/osgi/framework/Version;isRemovalPending()Z SourceFileRequiredBundle.java   PK L 3s )org/osgi/service/packageadmin/packageinfoversion 1.2 PK L 3!org/osgi/service/permissionadmin/PK L 35336org/osgi/service/permissionadmin/PermissionAdmin.class-0org/osgi/service/permissionadmin/PermissionAdminjava/lang/ObjectgetPermissionsF(Ljava/lang/String;)[Lorg/osgi/service/permissionadmin/PermissionInfo;setPermissionsG(Ljava/lang/String;[Lorg/osgi/service/permissionadmin/PermissionInfo;)V getLocations()[Ljava/lang/String;getDefaultPermissions4()[Lorg/osgi/service/permissionadmin/PermissionInfo;setDefaultPermissions5([Lorg/osgi/service/permissionadmin/PermissionInfo;)V SourceFilePermissionAdmin.java   PK L 3 II5org/osgi/service/permissionadmin/PermissionInfo.class-/org/osgi/service/permissionadmin/PermissionInfojava/lang/ObjecttypeLjava/lang/String;nameactions9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)VCode()V       java/lang/NullPointerException type is null(Ljava/lang/String;)V  "java/lang/IllegalArgumentException name missing LineNumberTableLocalVariableTablethis1Lorg/osgi/service/permissionadmin/PermissionInfo;missing encoded permission%java/lang/String'length()I )* (+empty encoded permission- toCharArray()[C /0 (1java/lang/Character3 isWhitespace(C)Z 56 47expecting open parenthesis9expecting type;([CII)V = (>unescapeString([CII)Ljava/lang/String; @A Bexpecting close parenthesisDparsing terminated abruptlyF(java/lang/ArrayIndexOutOfBoundsExceptionHencodedPermissionencoded[CIposbegincCe*Ljava/lang/ArrayIndexOutOfBoundsException; getEncoded()Ljava/lang/String;java/lang/StringBufferV(I)V X WYappend(C)Ljava/lang/StringBuffer; [\ W],(Ljava/lang/String;)Ljava/lang/StringBuffer; [_ W` "b escapeString-(Ljava/lang/String;Ljava/lang/StringBuffer;)V de f" "htoString jU WkoutputLjava/lang/StringBuffer; TU ogetTypegetName getActionsequals(Ljava/lang/Object;)Z tu (vobjLjava/lang/Object;otherhashCode {* (|hashcharAt(I)C  (\r\nstrleniend SourceFilePermissionInfo.java!   4**+*,*-+ Y,- Y !& <= >?@A!C)D3F"*4#$444  *+ Y&+, Y. +2M,>6,48,4( Y: ,486,48 ,4) ,4" Y< *(Y,d?,48,4"6,4\,4"*,C,48],48,4"D6,4\,4"*,C,48,46 ,48) YE MYG #I! BSTUWX#[(\+].`1a4`>eGfKgMfQiTlWmZldqhrksnruvx{|{"%.14=ILOR\behk{"R#$J(mKL+j)M.gNMh-OMb3PQ RSTU WY*,`* *,* *,`x`ZL+(^W+*aW*/+caW*+g*+iaW*+g+"^W+)^W+l!Z +23456:AJQX`gnv}"#$:OmnjU /*p!" #$qU /*!" #$rU /*! " #$sU /*!" #$tu +*++M*,w;*,*,*6*#*,w*,w*,w!>)*,-/0?1[2]4d5k6y76:>" #$xyz${* t,*}<**}<* *}<!HIJK L*O",#$$~M de q*,=>d*6N D :")\)+\^W+^W+aW+aW +^W!:WX YZ<]C^J_MaTbWd^eaghXpk"4qqmnlMiMWPQ @A %WYdZN6l*46\UL*46:")\)n3r, 6 6 \6-^W-l!Jq rstu!v'w-xX{[}_~bfimpwr">LOMM zmnrM`PQPK L 3s ,org/osgi/service/permissionadmin/packageinfoversion 1.2 PK L 3org/osgi/service/startlevel/PK L 3x,org/osgi/service/startlevel/StartLevel.class-&org/osgi/service/startlevel/StartLeveljava/lang/Object getStartLevel()I setStartLevel(I)VgetBundleStartLevel(Lorg/osgi/framework/Bundle;)IsetBundleStartLevel(Lorg/osgi/framework/Bundle;I)VgetInitialBundleStartLevelsetInitialBundleStartLevelisBundlePersistentlyStarted(Lorg/osgi/framework/Bundle;)Z SourceFileStartLevel.java   PK L 36 'org/osgi/service/startlevel/packageinfoversion 1.0 PK L 3org/osgi/service/url/PK L 3 :org/osgi/service/url/AbstractURLStreamHandlerService.class-V4org/osgi/service/url/AbstractURLStreamHandlerServicejava/net/URLStreamHandler,org/osgi/service/url/URLStreamHandlerService realHandler-Lorg/osgi/service/url/URLStreamHandlerSetter;()VCode  LineNumberTableLocalVariableTablethis6Lorg/osgi/service/url/AbstractURLStreamHandlerService;openConnection((Ljava/net/URL;)Ljava/net/URLConnection; Exceptionsjava/io/IOExceptionparseURLR(Lorg/osgi/service/url/URLStreamHandlerSetter;Ljava/net/URL;Ljava/lang/String;II)V  %(Ljava/net/URL;Ljava/lang/String;II)V  uLjava/net/URL;specLjava/lang/String;startIlimittoExternalForm"(Ljava/net/URL;)Ljava/lang/String; %& 'equals(Ljava/net/URL;Ljava/net/URL;)Z )* +u1u2getDefaultPort()I /0 1getHostAddress&(Ljava/net/URL;)Ljava/net/InetAddress; 34 5hashCode(Ljava/net/URL;)I 78 9 hostsEqual ;* <sameFile >* ?setURLZ(Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V Deprecated+org/osgi/service/url/URLStreamHandlerSetterD AB EFprotohostportfileref(Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V AM ENauthuserpathquery SourceFile$AbstractURLStreamHandlerService.java!   /*   t*+*,-456> !"#$#%& :*+(>)* E*+,,G -./0 /*2P 34 :*+6Y78 :*+:b;* E*+,=k -.>* E*+,@t -.ABC }*+,-G HH!I!J#K!L!AM *+,- O  f H!I!J#P!Q!R!S!L! TUPK L 3i%%'org/osgi/service/url/URLConstants.class-!org/osgi/service/url/URLConstantsjava/lang/ObjectURL_HANDLER_PROTOCOLLjava/lang/String; ConstantValueurl.handler.protocolURL_CONTENT_MIMETYPEurl.content.mimetype  SourceFileURLConstants.java    PK L 3}62org/osgi/service/url/URLStreamHandlerService.class-,org/osgi/service/url/URLStreamHandlerServicejava/lang/ObjectopenConnection((Ljava/net/URL;)Ljava/net/URLConnection; Exceptionsjava/io/IOExceptionparseURLR(Lorg/osgi/service/url/URLStreamHandlerSetter;Ljava/net/URL;Ljava/lang/String;II)VtoExternalForm"(Ljava/net/URL;)Ljava/lang/String;equals(Ljava/net/URL;Ljava/net/URL;)ZgetDefaultPort()IgetHostAddress&(Ljava/net/URL;)Ljava/net/InetAddress;hashCode(Ljava/net/URL;)I hostsEqualsameFile SourceFileURLStreamHandlerService.java    PK L 3aP֮1org/osgi/service/url/URLStreamHandlerSetter.class- +org/osgi/service/url/URLStreamHandlerSetterjava/lang/ObjectsetURLZ(Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V Deprecated(Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V SourceFileURLStreamHandlerSetter.java  PK L 36 org/osgi/service/url/packageinfoversion 1.0 PKʔ 3# )META-INF/MANIFEST.MFPKʔ 3~Q * META-INF/OSGI.SFPKʔ 3" %META-INF/OSGI.RSAPK L 3 1OSGI-OPT/PK L 3 XOSGI-OPT/src/PK L 3OSGI-OPT/src/org/PK L 3OSGI-OPT/src/org/osgi/PK L 3 OSGI-OPT/src/org/osgi/framework/PK L 3~i114$ OSGI-OPT/src/org/osgi/framework/AdminPermission.javaPK L 3 :͝7}QOSGI-OPT/src/org/osgi/framework/AllServiceListener.javaPK L 3zN+oZOSGI-OPT/src/org/osgi/framework/Bundle.javaPK L 3k 4OSGI-OPT/src/org/osgi/framework/BundleActivator.javaPK L 3TW 2OSGI-OPT/src/org/osgi/framework/BundleContext.javaPK L 3g0OSGI-OPT/src/org/osgi/framework/BundleEvent.javaPK L 3  4OSGI-OPT/src/org/osgi/framework/BundleException.javaPK L 3'S3OSGI-OPT/src/org/osgi/framework/BundleListener.javaPK L 3.;d&>&>5OSGI-OPT/src/org/osgi/framework/BundlePermission.javaPK L 3 11sOSGI-OPT/src/org/osgi/framework/Configurable.javaPK L 3,::.OSGI-OPT/src/org/osgi/framework/Constants.javaPK L 31Kz+ OSGI-OPT/src/org/osgi/framework/Filter.javaPK L 37,3ۘOSGI-OPT/src/org/osgi/framework/FrameworkEvent.javaPK L 3@6OSGI-OPT/src/org/osgi/framework/FrameworkListener.javaPK L 3?2OSGI-OPT/src/org/osgi/framework/FrameworkUtil.javaPK L 3i i ;6OSGI-OPT/src/org/osgi/framework/InvalidSyntaxException.javaPK L 3776OSGI-OPT/src/org/osgi/framework/PackagePermission.javaPK L 3h1OSGI-OPT/src/org/osgi/framework/ServiceEvent.javaPK L 3DS 3OSGI-OPT/src/org/osgi/framework/ServiceFactory.javaPK L 34$OSGI-OPT/src/org/osgi/framework/ServiceListener.javaPK L 3#{3{36-OSGI-OPT/src/org/osgi/framework/ServicePermission.javaPK L 3:o%ee5`OSGI-OPT/src/org/osgi/framework/ServiceReference.javaPK L 3IA;;8xOSGI-OPT/src/org/osgi/framework/ServiceRegistration.javaPK L 3#mm>7OSGI-OPT/src/org/osgi/framework/SynchronousBundleListener.javaPK L 3-v'',OSGI-OPT/src/org/osgi/framework/Version.javaPK L 3^0,OSGI-OPT/src/org/osgi/framework/package.htmlPK L 3OSGI-OPT/src/org/osgi/service/PK L 3,4OSGI-OPT/src/org/osgi/service/condpermadmin/PK L 3H~OSGI-OPT/src/org/osgi/service/condpermadmin/BundleLocationCondition.javaPK L 3j ,FgOSGI-OPT/src/org/osgi/service/condpermadmin/BundleSignerCondition.javaPK L 3xx:OSGI-OPT/src/org/osgi/service/condpermadmin/Condition.javaPK L 3&u?%%>`OSGI-OPT/src/org/osgi/service/condpermadmin/ConditionInfo.javaPK L 3m$KOSGI-OPT/src/org/osgi/service/condpermadmin/ConditionalPermissionAdmin.javaPK L 3Q{6Js&OSGI-OPT/src/org/osgi/service/condpermadmin/ConditionalPermissionInfo.javaPK L 38-OSGI-OPT/src/org/osgi/service/condpermadmin/package.htmlPK L 3+/OSGI-OPT/src/org/osgi/service/packageadmin/PK L 3mHf?+0OSGI-OPT/src/org/osgi/service/packageadmin/ExportedPackage.javaPK L 3>l^-^-<?OSGI-OPT/src/org/osgi/service/packageadmin/PackageAdmin.javaPK L 3} } >lOSGI-OPT/src/org/osgi/service/packageadmin/RequiredBundle.javaPK L 387yOSGI-OPT/src/org/osgi/service/packageadmin/package.htmlPK L 3.{OSGI-OPT/src/org/osgi/service/permissionadmin/PK L 3)%%B{OSGI-OPT/src/org/osgi/service/permissionadmin/PermissionAdmin.javaPK L 3iK-K-AOSGI-OPT/src/org/osgi/service/permissionadmin/PermissionInfo.javaPK L 3L:*OSGI-OPT/src/org/osgi/service/permissionadmin/package.htmlPK L 3)DOSGI-OPT/src/org/osgi/service/startlevel/PK L 3-x8(8(8OSGI-OPT/src/org/osgi/service/startlevel/StartLevel.javaPK L 3 dU5OSGI-OPT/src/org/osgi/service/startlevel/package.htmlPK L 3"OSGI-OPT/src/org/osgi/service/url/PK L 3s:__FYOSGI-OPT/src/org/osgi/service/url/AbstractURLStreamHandlerService.javaPK L 3xX9r3OSGI-OPT/src/org/osgi/service/url/URLConstants.javaPK L 3o o >OSGI-OPT/src/org/osgi/service/url/URLStreamHandlerService.javaPK L 3%=K OSGI-OPT/src/org/osgi/service/url/URLStreamHandlerSetter.javaPK L 36{.UOSGI-OPT/src/org/osgi/service/url/package.htmlPK L 3gZ. . Sabout.htmlPK L 3n%AA epl-v10.htmlPK L 3_org/PK L 3 _org/osgi/PK L 3 `org/osgi/framework/PK L 3woo*:`org/osgi/framework/AdminPermission$1.classPK L 3u||(gorg/osgi/framework/AdminPermission.classPK L 3˜+xorg/osgi/framework/AllServiceListener.classPK L 3#<<yorg/osgi/framework/Bundle.classPK L 3*('org/osgi/framework/BundleActivator.classPK L 3A&porg/osgi/framework/BundleContext.classPK L 3-z$org/osgi/framework/BundleEvent.classPK L 3)ae(org/osgi/framework/BundleException.classPK L 3'org/osgi/framework/BundleListener.classPK L 3e<)8org/osgi/framework/BundlePermission.classPK L 3L[dI I 3worg/osgi/framework/BundlePermissionCollection.classPK L 30C a%org/osgi/framework/Configurable.classPK L 3gD~"!org/osgi/framework/Constants.classPK L 3(yKOOvorg/osgi/framework/Filter.classPK L 3D9++'org/osgi/framework/FrameworkEvent.classPK L 3x<*rorg/osgi/framework/FrameworkListener.classPK L 3#x(org/osgi/framework/FrameworkUtil$1.classPK L 3sț&org/osgi/framework/FrameworkUtil.classPK L 3DD/org/osgi/framework/InvalidSyntaxException.classPK L 3SQ5kk*org/osgi/framework/PackagePermission.classPK L 3mcN N 4vorg/osgi/framework/PackagePermissionCollection.classPK L 3 mm%org/osgi/framework/ServiceEvent.classPK L 3Eaa'org/osgi/framework/ServiceFactory.classPK L 3;(lorg/osgi/framework/ServiceListener.classPK L 3GXX*org/osgi/framework/ServicePermission.classPK L 3\FN N 43org/osgi/framework/ServicePermissionCollection.classPK L 3Mu3)org/osgi/framework/ServiceReference.classPK L 3 ,org/osgi/framework/ServiceRegistration.classPK L 3Gݿ2.org/osgi/framework/SynchronousBundleListener.classPK L 3J;; =org/osgi/framework/Version.classPK L 3p +org/osgi/framework/packageinfoPK L 3+org/osgi/service/PK L 3.,org/osgi/service/condpermadmin/PK L 35k,org/osgi/service/condpermadmin/BooleanCondition.classPK L 3i$>0org/osgi/service/condpermadmin/BundleLocationCondition$1.classPK L 31k <3org/osgi/service/condpermadmin/BundleLocationCondition.classPK L 3u<@org/osgi/service/condpermadmin/BundleSignerCondition$1.classPK L 3Mgti :Iorg/osgi/service/condpermadmin/BundleSignerCondition.classPK L 3AǛfRR.*Torg/osgi/service/condpermadmin/Condition.classPK L 3Juu2Vorg/osgi/service/condpermadmin/ConditionInfo.classPK L 3^^?forg/osgi/service/condpermadmin/ConditionalPermissionAdmin.classPK L 3,6>Hjorg/osgi/service/condpermadmin/ConditionalPermissionInfo.classPK L 36 **lorg/osgi/service/condpermadmin/packageinfoPK L 3lorg/osgi/service/packageadmin/PK L 3v 3lorg/osgi/service/packageadmin/ExportedPackage.classPK L 38`0norg/osgi/service/packageadmin/PackageAdmin.classPK L 3`22sorg/osgi/service/packageadmin/RequiredBundle.classPK L 3s )torg/osgi/service/packageadmin/packageinfoPK L 3!Auorg/osgi/service/permissionadmin/PK L 35336uorg/osgi/service/permissionadmin/PermissionAdmin.classPK L 3 II5xorg/osgi/service/permissionadmin/PermissionInfo.classPK L 3s ,org/osgi/service/permissionadmin/packageinfoPK L 3org/osgi/service/startlevel/PK L 3x,4org/osgi/service/startlevel/StartLevel.classPK L 36 'Lorg/osgi/service/startlevel/packageinfoPK L 3org/osgi/service/url/PK L 3 :ыorg/osgi/service/url/AbstractURLStreamHandlerService.classPK L 3i%%'org/osgi/service/url/URLConstants.classPK L 3}62gorg/osgi/service/url/URLStreamHandlerService.classPK L 3aP֮1Horg/osgi/service/url/URLStreamHandlerSetter.classPK L 36 Eorg/osgi/service/url/packageinfoPK-