當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。