public class ConsoleManager extends Object implements ServiceTrackerCustomizer<ConsoleSession,FrameworkConsole>
| Modifier and Type | Field and Description |
|---|---|
static String |
CONSOLE_BUNDLE |
static String |
PROP_CONSOLE |
static String |
PROP_CONSOLE_ENABLED |
| Constructor and Description |
|---|
ConsoleManager(Framework framework,
String consolePropValue) |
| Modifier and Type | Method and Description |
|---|---|
FrameworkConsole |
addingService(ServiceReference<ConsoleSession> reference)
A service is being added to the
ServiceTracker. |
void |
checkForConsoleBundle() |
void |
modifiedService(ServiceReference<ConsoleSession> reference,
FrameworkConsole service)
A service tracked by the
ServiceTracker has been modified. |
void |
removedService(ServiceReference<ConsoleSession> reference,
FrameworkConsole service)
A service tracked by the
ServiceTracker has been removed. |
static ConsoleManager |
startConsole(Framework framework) |
void |
stopConsole()
Stops the OSGi Command console
|
public static final String PROP_CONSOLE
public static final String CONSOLE_BUNDLE
public static final String PROP_CONSOLE_ENABLED
public static ConsoleManager startConsole(Framework framework)
public void checkForConsoleBundle()
throws BundleException
BundleExceptionpublic void stopConsole()
public FrameworkConsole addingService(ServiceReference<ConsoleSession> reference)
ServiceTrackerCustomizerServiceTracker.
This method is called before a service which matched the search
parameters of the ServiceTracker is added to the
ServiceTracker. This method should return the service object to
be tracked for the specified ServiceReference. The returned
service object is stored in the ServiceTracker and is available
from the getService and getServices methods.
addingService in interface ServiceTrackerCustomizer<ConsoleSession,FrameworkConsole>reference - The reference to the service being added to the
ServiceTracker.null if the specified referenced service
should not be tracked.public void modifiedService(ServiceReference<ConsoleSession> reference, FrameworkConsole service)
ServiceTrackerCustomizerServiceTracker has been modified.
This method is called when a service being tracked by the
ServiceTracker has had it properties modified.
modifiedService in interface ServiceTrackerCustomizer<ConsoleSession,FrameworkConsole>reference - The reference to the service that has been modified.service - The service object for the specified referenced service.public void removedService(ServiceReference<ConsoleSession> reference, FrameworkConsole service)
ServiceTrackerCustomizerServiceTracker has been removed.
This method is called after a service is no longer being tracked by the
ServiceTracker.
removedService in interface ServiceTrackerCustomizer<ConsoleSession,FrameworkConsole>reference - The reference to the service that has been removed.service - The service object for the specified referenced service.Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.