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


Java ServiceEvent.MODIFIED_ENDMATCH属性代码示例

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


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

示例1: serviceChanged

@Override
public void serviceChanged(ServiceEvent event) {
    if (closed) {
        return;
    }

    ServiceReference<?> sr = event.getServiceReference();

    switch (event.getType()) {
    case ServiceEvent.REGISTERED:
        onServiceRegistration(sr);
        break;

    case ServiceEvent.MODIFIED:
        onServiceUpdate(sr);
        break;

    case ServiceEvent.MODIFIED_ENDMATCH:
    case ServiceEvent.UNREGISTERING:
        onServiceDeparture(sr);
        break;
    }
}
 
开发者ID:primeval-io,项目名称:aspecio,代码行数:23,代码来源:ServiceWeavingManager.java

示例2: serviceChanged

@Override
public void serviceChanged(final ServiceEvent serviceEvent) {
    switch(serviceEvent.getType()) {
        case ServiceEvent.REGISTERED:
            registerWithOnmsRegistry(serviceEvent.getServiceReference());
            break;
        case ServiceEvent.MODIFIED:
            registerWithOnmsRegistry(serviceEvent.getServiceReference());
            break;
        case ServiceEvent.MODIFIED_ENDMATCH:
            unregisterWithOnmsRegistry(serviceEvent.getServiceReference());
            break;
        case ServiceEvent.UNREGISTERING:
            unregisterWithOnmsRegistry(serviceEvent.getServiceReference());
            break;
    }
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:17,代码来源:OnmsOSGiBridgeActivator.java

示例3: handleServiceChanged

protected synchronized void handleServiceChanged ( final ServiceEvent event )
{
    switch ( event.getType () )
    {
        case ServiceEvent.UNREGISTERING:
        case ServiceEvent.MODIFIED_ENDMATCH:
            removeService ( event.getServiceReference () );
            break;
        case ServiceEvent.REGISTERED:
            addService ( event.getServiceReference () );
            break;
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:13,代码来源:ConnectionInformationList.java

示例4: getServiceEventTypeText

private String getServiceEventTypeText(int type) {
    switch (type) {
    case ServiceEvent.REGISTERED:
        return "Registered";
    case ServiceEvent.MODIFIED:
        return "Modified";
    case ServiceEvent.MODIFIED_ENDMATCH:
        return "Modified End Match";
    case ServiceEvent.UNREGISTERING:
        return "Unregistering";
    default:
        return type + " ???";
    }
}
 
开发者ID:vorburger,项目名称:ch.vorburger.minecraft.osgi,代码行数:14,代码来源:LoggingServiceListener.java

示例5: serviceChanged

@Override
public void serviceChanged(final ServiceEvent aEvent) {

	final ServiceReference<?> svcRef = aEvent.getServiceReference();

	switch (aEvent.getType()) {
	case ServiceEvent.REGISTERED:
		// New service to export
		exportService(svcRef);
		break;

	case ServiceEvent.MODIFIED:
		if (pServiceUids.containsKey(svcRef)) {
			// Already known service
			updateService(svcRef);

		} else {
			// New match
			exportService(svcRef);
		}
		break;

	case ServiceEvent.MODIFIED_ENDMATCH:
	case ServiceEvent.UNREGISTERING:
		// Service must not be exported
		unexportService(svcRef);
		break;

	default:
		break;
	}
}
 
开发者ID:cohorte,项目名称:cohorte-remote-services,代码行数:32,代码来源:ExportDispatcher.java

示例6: testServiceChangedOtherEvents

public void testServiceChangedOtherEvents() {
    ServiceHandlerCatalog shc = mock(ServiceHandlerCatalog.class);
    BundleContext bc = mock(BundleContext.class);
    ServiceJockeyListener sjl = new ServiceJockeyListener(bc, shc);
    ServiceReference sr = mock(ServiceReference.class);
    ServiceEvent se = new ServiceEvent(ServiceEvent.MODIFIED_ENDMATCH, sr);
    sjl.serviceChanged(se);
    verifyZeroInteractions(shc);
}
 
开发者ID:bosschaert,项目名称:service-jockey,代码行数:9,代码来源:ServiceJockeyListenerTest.java


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