当前位置: 首页>>代码示例>>Java>>正文


Java BundleEvent.STOPPING属性代码示例

本文整理汇总了Java中org.osgi.framework.BundleEvent.STOPPING属性的典型用法代码示例。如果您正苦于以下问题:Java BundleEvent.STOPPING属性的具体用法?Java BundleEvent.STOPPING怎么用?Java BundleEvent.STOPPING使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.osgi.framework.BundleEvent的用法示例。


在下文中一共展示了BundleEvent.STOPPING属性的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getBundleEventTypeText

private String getBundleEventTypeText(int type) {
    switch (type) {
        case BundleEvent.INSTALLED:
            return "Installed";
        case BundleEvent.RESOLVED:
            return "Resolved";
        case BundleEvent.LAZY_ACTIVATION:
            return "Lazy Activation";
        case BundleEvent.STARTING:
            return "Starting";
        case BundleEvent.STARTED:
            return "Started";
        case BundleEvent.STOPPING:
            return "Stopping";
        case BundleEvent.STOPPED:
            return "Stopped";
        case BundleEvent.UPDATED:
            return "Updated";
        case BundleEvent.UNRESOLVED:
            return "Unresolved";
        case BundleEvent.UNINSTALLED:
            return "Uninstalled";
        default:
            return type + " ???";
        }
}
 
开发者ID:vorburger,项目名称:ch.vorburger.minecraft.osgi,代码行数:26,代码来源:LoggingBundleListener.java

示例2: bundleChanged

@Override
public void bundleChanged(final BundleEvent event) {
    switch (event.getType()) {
        // FIXME: STARTING instead of STARTED?
        case BundleEvent.STARTED:
            scanBundleForPlugins(event.getBundle());
            break;

        case BundleEvent.STOPPING:
            stopBundlePlugins(event.getBundle());
            break;

        default:
            break;
    }
}
 
开发者ID:apache,项目名称:logging-log4j2,代码行数:16,代码来源:Activator.java

示例3: bundleEventToString

private static String bundleEventToString(int type) {
    String s;
    switch (type) {
    case BundleEvent.INSTALLED:
        s = "INSTALLED";
        break;
    case BundleEvent.RESOLVED:
        s = "RESOLVED";
        break;
    case BundleEvent.STARTING:
        s = "STARTING";
        break;
    case BundleEvent.STARTED:
        s = "STARTED";
        break;
    case BundleEvent.STOPPING:
        s = "STOPPING";
        break;
    case BundleEvent.STOPPED:
        s = "STOPPED";
        break;
    case BundleEvent.UNRESOLVED:
        s = "UNRESOLVED";
        break;
    case BundleEvent.UPDATED:
        s = "UPDATED";
        break;
    case BundleEvent.UNINSTALLED:
        s = "UNINSTALLED";
        break;
    case BundleEvent.LAZY_ACTIVATION:
        s = "LAZY_ACTIVATION";
        break;
    default:
        s = "UNKNOWN";
    }
    return s;
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:38,代码来源:DeploymentInstaller.java

示例4: bundleChanged

@Override
public void bundleChanged(final BundleEvent event) {
    if (this.configRegistry == null) {
        return;
    }

    // If the system bundle (id 0) is stopping close the ConfigRegistry so it
    // destroys all modules. On
    // shutdown the system bundle is stopped first.
    if (event.getBundle().getBundleId() == SYSTEM_BUNDLE_ID && event.getType() == BundleEvent.STOPPING) {
        this.configRegistry.close();
    }
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:13,代码来源:ConfigManagerActivator.java

示例5: bundleChanged

/**
 * Implemented from SynchronousBundleListener.
 */
@Override
public void bundleChanged(final BundleEvent event) {
    // If the system bundle (id 0) is stopping, do an orderly shutdown of all blueprint containers. On
    // shutdown the system bundle is stopped first.
    if (event.getBundle().getBundleId() == SYSTEM_BUNDLE_ID && event.getType() == BundleEvent.STOPPING) {
        shutdownAllContainers();
    }
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:11,代码来源:BlueprintBundleTracker.java

示例6: bundleChanged

@Override
public void bundleChanged(BundleEvent event) {
	if(event.getBundle().getHeaders().get("NeuralNetwork")==null)
		return;
		
	if(event.getType()==BundleEvent.STARTING){
		nnBundleStarting(event.getBundle());
	} else if(event.getType()==BundleEvent.STOPPING){
		nnBundleStopping(event.getBundle());
	}
}
 
开发者ID:ibcn-cloudlet,项目名称:dianne,代码行数:11,代码来源:DianneBundleListener.java

示例7: bundleChanged

@Override
public void bundleChanged(BundleEvent event) {

	if (event.getType() == BundleEvent.STARTED || event.getType() == BundleEvent.UPDATED) {
		doBundle(event.getBundle(), SENSIVITY.UPDATE);
	} else
	if (event.getType() == BundleEvent.STOPPING ) {
		doDelete(event.getBundle());
	}
	
}
 
开发者ID:mhus,项目名称:cherry-web,代码行数:11,代码来源:CherryDeployServlet.java

示例8: bundleEventType2String

private static final String bundleEventType2String(int bundleEventType) {
	switch (bundleEventType) {
		case BundleEvent.INSTALLED:
			// The bundle has been installed.
			return "INSTALLED";
		case BundleEvent.LAZY_ACTIVATION:
			// The bundle will be lazily activated
			return "LAZY_ACTIVATION";
		case BundleEvent.RESOLVED:
			// The bundle has been resolved
			return "RESOLVED";
		case BundleEvent.STARTED:
			// The bundle has been started
			return "STARTED";
		case BundleEvent.STARTING:
			// The bundle is about to be activated
			return "STARTING";
		case BundleEvent.STOPPED:
			// The bundle has been stopped
			return "STOPPED";
		case BundleEvent.STOPPING:
			// The bundle is about to deactivated
			return "STOPPING";
		case BundleEvent.UNINSTALLED:
			// The bundle has been uninstalled
			return "UNINSTALLED";
		case BundleEvent.UNRESOLVED:
			// The bundle has been unresolved
			return "UNRESOLVED";
		case BundleEvent.UPDATED:
			// The bundle has been updated
			return "UPDATED";
		default:
			return "UNKNOWN_BUNDLE_EVENT_TYPE";
	}
}
 
开发者ID:dana-i2cat,项目名称:mqnaas,代码行数:36,代码来源:BundleGuard.java

示例9: handleEvent

protected void handleEvent(BundleEvent event) {

			Bundle bundle = event.getBundle();

			// ignore current bundle for context creation
			if (bundle.getBundleId() == bundleId) {
				return;
			}

			switch (event.getType()) {
				case BundleEvent.STARTED: {
					maybeCreateApplicationContextFor(bundle);
					break;
				}
				case BundleEvent.STOPPING: {
					if (OsgiBundleUtils.isSystemBundle(bundle)) {
						if (log.isDebugEnabled()) {
							log.debug("System bundle stopping");
						}
						// System bundle is shutting down; Special handling for
						// framework shutdown
						shutdown();
					}
					else {
						maybeCloseApplicationContextFor(bundle);
					}
					break;
				}
				default:
					break;
			}
		}
 
开发者ID:BeamFoundry,项目名称:spring-osgi,代码行数:32,代码来源:ContextLoaderListener.java

示例10: bundleChanged

public void bundleChanged(BundleEvent event) {
	Bundle bundle = event.getBundle();
	boolean trace = log.isTraceEnabled();

	switch (event.getType()) {
	case BundleEvent.STARTED: {
		if (trace)
			log.trace("Processing " + OsgiStringUtils.nullSafeToString(event) + " event for bundle "
					+ OsgiStringUtils.nullSafeNameAndSymName(bundle));

		maybeDeployWar(bundle);

		break;
	}
	case BundleEvent.STOPPING: {
		if (trace)
			log.trace("Processing " + OsgiStringUtils.nullSafeToString(event) + " event for bundle "
					+ OsgiStringUtils.nullSafeNameAndSymName(bundle));

		maybeUndeployWar(bundle);

		break;
	}
	default:
		break;
	}
}
 
开发者ID:BeamFoundry,项目名称:spring-osgi,代码行数:27,代码来源:WarLoaderListener.java

示例11: bundleChanged

@Override
public void bundleChanged(BundleEvent event) {
    switch (event.getType()) {
        case BundleEvent.STOPPING:
            long bundleId = event.getBundle().getBundleId();
            Set<Type> types = cache.remove(bundleId);
            if (types != null && !types.isEmpty()) {
                registryHook.invalidateAll(types);
            }
            break;
        default:
            //nothing to do
    }
}
 
开发者ID:javabits,项目名称:yar,代码行数:14,代码来源:BundleTypeCleaner.java

示例12: bundleChanged

@Override
public void bundleChanged(BundleEvent event) {
	String type;
	Level level;
	switch (event.getType()) {
		case BundleEvent.INSTALLED:
			level = Level.INFO;
			type = "INSTALLED";
			break;
		case BundleEvent.RESOLVED:
			level = Level.FINE;
			type = "RESOLVED";
			break;
		case BundleEvent.LAZY_ACTIVATION:
			level = Level.FINE;
			type = "LAZY_ACTIVATION";
			break;
		case BundleEvent.STARTING:
			level = Level.FINE;
			type = "STARTING";
			break;
		case BundleEvent.STARTED:
			level = Level.INFO;
			type = "STARTED";
			break;
		case BundleEvent.STOPPING:
			level = Level.FINE;
			type = "STOPPING";
			break;
		case BundleEvent.STOPPED:
			level = Level.INFO;
			type = "STOPPED";
			break;
		case BundleEvent.UPDATED:
			level = Level.INFO;
			type = "UPDATED";
			break;
		case BundleEvent.UNRESOLVED:
			level = Level.FINE;
			type = "UNRESOLVED";
			break;
		case BundleEvent.UNINSTALLED:
			level = Level.INFO;
			type = "UNINSTALLED";
			break;
		default:
			level = Level.OFF;
			type = "<Unknown type: " + event.getType() + ">";
			break;
	}
	StringBuilder sb = new StringBuilder();
	sb.append(type);
	if (event.getBundle() != null) {
		sb.append(" bundle=[")
				.append(event.getBundle())
				.append("]");
	}
	if (event.getOrigin() != null) {
		sb.append(" origin=[")
				.append(event.getOrigin())
				.append("]");
	}
	LOGGER_BUNDLE.log(level, sb.toString());
}
 
开发者ID:to2mbn,项目名称:LoliXL,代码行数:64,代码来源:OSGiListener.java

示例13: bundleChanged

public void bundleChanged(BundleEvent event) {
	if (event.getType() == BundleEvent.STOPPING
			&& event.getBundle().getBundleId() == getPlugin().getBundle().getBundleId()) {
		dispose();
	}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:6,代码来源:PluginImageHelper.java


注:本文中的org.osgi.framework.BundleEvent.STOPPING属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。