Top Description Fields Constructors Methods
org.apache.logging.log4j.util

public Class Activator

extends Object
implements BundleActivator, SynchronousBundleListener
Class Inheritance
All Implemented Interfaces
org.osgi.framework.SynchronousBundleListener, org.osgi.framework.BundleListener, java.util.EventListener, org.osgi.framework.BundleActivator
Annotations
@Headers:@org.osgi.annotation.bundle.Header(name="Bundle-Activator", value="${@class}"), @org.osgi.annotation.bundle.Header(name="Bundle-ActivationPolicy", value="lazy")
@InternalApi
Imports
java.net.URL, java.security.Permission, java.util.Collection, .List, org.apache.logging.log4j.Logger, org.apache.logging.log4j.spi.LoggerContextFactory, .Provider, org.apache.logging.log4j.status.StatusLogger, org.osgi.annotation.bundle.Header, org.osgi.framework.AdaptPermission, .AdminPermission, .Bundle, .BundleActivator, .BundleContext, .BundleEvent, .Constants, .InvalidSyntaxException, .ServiceReference, .SynchronousBundleListener, org.osgi.framework.wiring.BundleWire, .BundleWiring

Consider this class private. OSGi bundle activator. Used for locating an implementation of org.apache.logging.log4j.spi.LoggerContextFactory et al. that have corresponding META-INF/log4j-provider.properties files. As with all OSGi BundleActivator classes, this class is not for public use and is only useful in an OSGi framework environment.

Field Summary

Modifier and TypeField and Description
private boolean
private static final Logger
private static final SecurityManager
SECURITY_MANAGER

References Deprecated SecurityManager is deprecated or references (maybe indirectly) at least one deprecated element.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
bundleChanged(final BundleEvent
The BundleEvent.
event
)

Implements org.osgi.framework.BundleListener.bundleChanged.

Receives notification that a bundle has had a lifecycle change.

private static void
checkPermission(final Permission permission)

private void
loadProvider(final Bundle bundle)

private void
loadProvider(final BundleContext bundleContext, final BundleWiring bundleWiring)

public void
start(final BundleContext
The execution context of the bundle being started.
bundleContext
)

Implements org.osgi.framework.BundleActivator.start.

Called when this bundle is started so the Framework can perform the bundle-specific activities necessary to start this bundle.

public void
stop(final BundleContext
The execution context of the bundle being stopped.
bundleContext
)

Implements org.osgi.framework.BundleActivator.stop.

Called when this bundle is stopped so the Framework can perform the bundle-specific activities necessary to stop the bundle.

private String
toStateString(final int state)

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

lockingProviderUtilback to summary
private boolean lockingProviderUtil
LOGGERback to summary
private static final Logger LOGGER
SECURITY_MANAGERback to summary
private static final SecurityManager SECURITY_MANAGER

References Deprecated

SecurityManager is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Constructor Detail

Activatorback to summary
public Activator()

Method Detail

bundleChangedback to summary
public void bundleChanged(final BundleEvent event)

Implements org.osgi.framework.BundleListener.bundleChanged.

Doc from org.osgi.framework.BundleListener.bundleChanged.

Receives notification that a bundle has had a lifecycle change.

Parameters
event:BundleEvent

The BundleEvent.

Annotations
@Override
checkPermissionback to summary
private static void checkPermission(final Permission permission)
loadProviderback to summary
private void loadProvider(final Bundle bundle)
loadProviderback to summary
private void loadProvider(final BundleContext bundleContext, final BundleWiring bundleWiring)
startback to summary
public void start(final BundleContext bundleContext) throws Exception

Implements org.osgi.framework.BundleActivator.start.

Doc from org.osgi.framework.BundleActivator.start.

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.

Parameters
bundleContext:BundleContext

The execution context of the bundle being started.

Annotations
@Override
Exceptions
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.
stopback to summary
public void stop(final BundleContext bundleContext) throws Exception

Implements org.osgi.framework.BundleActivator.stop.

Doc from org.osgi.framework.BundleActivator.stop.

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.

Parameters
bundleContext:BundleContext

The execution context of the bundle being stopped.

Annotations
@Override
Exceptions
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.
toStateStringback to summary
private String toStateString(final int state)
unlockIfReadyback to summary
private void unlockIfReady()