本文整理匯總了Java中org.osgi.service.component.annotations.Deactivate類的典型用法代碼示例。如果您正苦於以下問題:Java Deactivate類的具體用法?Java Deactivate怎麽用?Java Deactivate使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Deactivate類屬於org.osgi.service.component.annotations包,在下文中一共展示了Deactivate類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: deactivate
import org.osgi.service.component.annotations.Deactivate; //導入依賴的package包/類
@Deactivate
protected void deactivate() {
for (ServiceRegistration<BackgroundTaskExecutor> serviceRegistration : _serviceRegistrations) {
serviceRegistration.unregister();
}
}
示例2: deactivate
import org.osgi.service.component.annotations.Deactivate; //導入依賴的package包/類
@Deactivate
void deactivate() {
synchronized (this.pluginListeners) {
this.listenersActive = false;
}
synchronized (this.pluginTrackers) {
this.pluginTrackers.forEach(tracker -> {
try {
tracker.close();
} catch (Exception e) {
this.log.debug("Error closing tracker: " + e, e);
}
});
}
}
示例3: shutdown
import org.osgi.service.component.annotations.Deactivate; //導入依賴的package包/類
@Deactivate
void shutdown() {
try {
this.registration.unregister();
} catch (IllegalStateException ise) {
// No problem - this means the service was
// already unregistered (e.g. by bundle stop)
}
this.dsToListenerMap.clear();
this.dsToVCMap.clear();
}
示例4: shutdown
import org.osgi.service.component.annotations.Deactivate; //導入依賴的package包/類
/**
* This method will gracefully terminate all open RabbitMQ connections
* Used before server shutdown
*/
@Deactivate
void shutdown() {
try {
this.registration.unregister();
} catch (IllegalStateException ise) {
// No problem - this means the service was
// already unregistered (e.g. by bundle stop)
}
log.info("Unregistered RabbitMQ Runner");
closeAllConnections();
this.securityGroupRunner.shutdown();
this.deploymentSpecRunner.shutdown();
}
示例5: shutdown
import org.osgi.service.component.annotations.Deactivate; //導入依賴的package包/類
@Deactivate
void shutdown() {
try {
this.registration.unregister();
} catch (IllegalStateException ise) {
// No problem - this means the service was
// already unregistered (e.g. by bundle stop)
}
this.sgToListenerMap.clear();
this.sgToVCMap.clear();
}
示例6: stop
import org.osgi.service.component.annotations.Deactivate; //導入依賴的package包/類
@Deactivate
synchronized void stop() {
this.executorService.shutdown();
boolean forceShutdown;
try {
forceShutdown = !this.executorService.awaitTermination(500, TimeUnit.MILLISECONDS);
} catch (InterruptedException ie) {
forceShutdown = true;
}
if(forceShutdown) {
this.executorService.shutdownNow();
}
}
示例7: shutdown
import org.osgi.service.component.annotations.Deactivate; //導入依賴的package包/類
/**
* This method will gracefully terminate all open web socket connections
* Used before server shutdown
*/
@Deactivate
void shutdown() {
try {
this.registration.unregister();
} catch (IllegalStateException ise) {
// No problem - this means the service was
// already unregistered (e.g. by bundle stop)
}
closeAllConnections();
this.webSocketConnections.clear();
}
示例8: stop
import org.osgi.service.component.annotations.Deactivate; //導入依賴的package包/類
@Deactivate
void stop() {
// Terminate Vaadin UI Application
destroy();
for (VaadinSession vaadinSession : sessions) {
vaadinSession.close();
// Redirect all UIs to force the close
for (UI ui : vaadinSession.getUIs()) {
ui.access(() -> ui.getPage().setLocation("/"));
}
}
}
示例9: deactivate
import org.osgi.service.component.annotations.Deactivate; //導入依賴的package包/類
@Deactivate
public void deactivate() throws MqttException {
for (MqttDestination<?> destination : destinations) {
try {
destination.close();
} catch (Exception e) {
}
}
client.disconnect();
client.close();
}
示例10: unregisterClaimResolvingService
import org.osgi.service.component.annotations.Deactivate; //導入依賴的package包/類
@Deactivate
public void unregisterClaimResolvingService(BundleContext bundleContext) {
try {
if (claimResolvingServiceRegistration != null) {
bundleContext.ungetService(claimResolvingServiceRegistration.getReference());
}
} catch (Exception e) {
log.error("Error occurred in un getting service", e);
}
if (log.isDebugEnabled()) {
log.debug("Carbon-Claim-Resolving bundle deactivated successfully.");
}
}
示例11: unregisterProfileMgtService
import org.osgi.service.component.annotations.Deactivate; //導入依賴的package包/類
@Deactivate
public void unregisterProfileMgtService(BundleContext bundleContext) {
try {
if (claimResolvingServiceRegistration != null) {
bundleContext.ungetService(profileMgtServiceServiceRegistration.getReference());
}
} catch (Exception e) {
log.error("Error occurred in un getting service", e);
}
if (log.isDebugEnabled()) {
log.debug("Carbon-Profile-Mgt bundle deactivated successfully.");
}
}
示例12: deActivate
import org.osgi.service.component.annotations.Deactivate; //導入依賴的package包/類
@Deactivate
public void deActivate() {
try {
if (serviceRegistration != null) {
serviceRegistration.unregister();
serviceRegistration = null;
}
} catch (Exception e) {
LOGGER.log(Level.SEVERE, "Caught exception", e);
}
}
示例13: deActivate
import org.osgi.service.component.annotations.Deactivate; //導入依賴的package包/類
@Deactivate
public void deActivate() {
try {
stop();
} catch (Exception e) {
LOGGER.log(Level.SEVERE, "Caught exception", e);
}
}
示例14: deactivate
import org.osgi.service.component.annotations.Deactivate; //導入依賴的package包/類
@Deactivate
protected void deactivate(ComponentContext ctxt) {
if (log.isDebugEnabled()) {
log.debug("Application Authentication Framework bundle is deactivated");
}
FrameworkServiceDataHolder.getInstance().setBundleContext(null);
}
示例15: deactivate
import org.osgi.service.component.annotations.Deactivate; //導入依賴的package包/類
/**
* @param ctxt
*/
@Deactivate
protected void deactivate(ComponentContext ctxt) {
if (log.isDebugEnabled()) {
log.debug("Identity Entitlement bundle is deactivated");
}
}