當前位置: 首頁>>代碼示例>>Java>>正文


Java Deactivate類代碼示例

本文整理匯總了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();
    }
}
 
開發者ID:inofix,項目名稱:ch-inofix-timetracker,代碼行數:8,代碼來源:BackgroundTaskExecutorConfigurator.java

示例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);
            }
        });
    }
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:16,代碼來源:ApiFactoryServiceImpl.java

示例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();
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:12,代碼來源:OsDeploymentSpecNotificationRunner.java

示例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();
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:18,代碼來源:RabbitMQRunner.java

示例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();
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:12,代碼來源:OsSecurityGroupNotificationRunner.java

示例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();
    }
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:14,代碼來源:BroadcasterUtil.java

示例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();
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:16,代碼來源:WebSocketRunner.java

示例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("/"));
}
     }
 }
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:15,代碼來源:UiServlet.java

示例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();
}
 
開發者ID:cschneider,項目名稱:reactive-components,代碼行數:12,代碼來源:MqttComponent.java

示例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.");
    }
}
 
開發者ID:wso2,項目名稱:carbon-identity-mgt,代碼行數:15,代碼來源:IdentityClaimMgtComponent.java

示例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.");
    }
}
 
開發者ID:wso2,項目名稱:carbon-identity-mgt,代碼行數:15,代碼來源:IdentityClaimMgtComponent.java

示例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);
    }
}
 
開發者ID:ANierbeck,項目名稱:Karaf-Vertx,代碼行數:12,代碼來源:AliveCheck.java

示例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);
    }
}
 
開發者ID:ANierbeck,項目名稱:Karaf-Vertx,代碼行數:9,代碼來源:VertxHttpServer.java

示例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);
}
 
開發者ID:wso2,項目名稱:carbon-identity-framework,代碼行數:9,代碼來源:FrameworkServiceComponent.java

示例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");
    }
}
 
開發者ID:wso2,項目名稱:carbon-identity-framework,代碼行數:10,代碼來源:EntitlementServiceComponent.java


注:本文中的org.osgi.service.component.annotations.Deactivate類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。