org.eclipse.osgi.framework.adaptor
Class BundleProtectionDomain

java.lang.Object
  extended by java.security.ProtectionDomain
      extended by org.eclipse.osgi.framework.adaptor.BundleProtectionDomain
All Implemented Interfaces:
BundleReference

public class BundleProtectionDomain
extends ProtectionDomain
implements BundleReference

This is a specialized ProtectionDomain for a bundle.

This class is not intended to be extended by clients.

Since:
3.1

Constructor Summary
BundleProtectionDomain(PermissionCollection permCollection)
          Deprecated. use BundleProtectionDomain(PermissionCollection, CodeSource, Bundle)
BundleProtectionDomain(PermissionCollection permCollection, CodeSource codeSource, Bundle bundle)
          Constructs a special ProtectionDomain for a bundle.
 
Method Summary
 Bundle getBundle()
          Returns the Bundle object associated with this BundleReference.
 void setBundle(Bundle bundle)
          Sets the bundle object associated with this protection domain.
 
Methods inherited from class java.security.ProtectionDomain
getClassLoader, getCodeSource, getPermissions, getPrincipals, implies, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BundleProtectionDomain

public BundleProtectionDomain(PermissionCollection permCollection)
Deprecated. use BundleProtectionDomain(PermissionCollection, CodeSource, Bundle)

Constructs a special ProtectionDomain for a bundle.

Parameters:
permCollection - the PermissionCollection for the Bundle

BundleProtectionDomain

public BundleProtectionDomain(PermissionCollection permCollection,
                              CodeSource codeSource,
                              Bundle bundle)
Constructs a special ProtectionDomain for a bundle.

Parameters:
permCollection - the PermissionCollection for the Bundle
codeSource - the code source for this domain, may be null
bundle - the bundle associated with this domain, may be null
Method Detail

setBundle

public void setBundle(Bundle bundle)
Sets the bundle object associated with this protection domain. The bundle can only be set once with either this method or with the constructor.

Parameters:
bundle - the bundle object associated with this protection domain

getBundle

public Bundle getBundle()
Description copied from interface: BundleReference
Returns the Bundle object associated with this BundleReference.

Specified by:
getBundle in interface BundleReference
Returns:
The Bundle object associated with this BundleReference.


Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.