agave-notifications/notifications-core/src/main/java/org/iplantc/service/notification/util/ServiceUtils.java
/**
     * Checks for a realtime channel using any of the known channel types.
     * 
     * @param callbackUrl
     * @param tenantId
     * @return
     */
Checks for a realtime channel using any of the known channel types.

@param callbackUrl
@param tenantId
@return
Checks for a realtime channel using any of the known channel types . @param callbackUrl @param tenantId @return
public static boolean isValidRealtimeChannel(String callbackUrl, String tenantId) {
        if (StringUtils.isEmpty(callbackUrl)) {
        	return false;
        }
        else if (isValidFanoutIoChannel(callbackUrl)) {
        	return true;
        }
        else if (isValidPushpinChannel(callbackUrl)) {
        	return true;
        }
        else {
        	if (tenantId == null) {
        		tenantId = TenancyHelper.getCurrentTenantId();
			}
        	String tenantRealtimeUrl = TenancyHelper.resolveURLToCurrentTenant("https://realtime.docker.example.com", tenantId);
			return StringUtils.startsWith(callbackUrl, tenantRealtimeUrl)
					|| StringUtils.startsWith(callbackUrl, tenantRealtimeUrl.replaceFirst("https", "http"));
        }
    }
public static boolean isValidRealtimeChannel ( String callbackUrl , String tenantId ) { if ( StringUtils . isEmpty ( callbackUrl ) ) { return false ; } else if ( isValidFanoutIoChannel ( callbackUrl ) ) { return true ; } else if ( isValidPushpinChannel ( callbackUrl ) ) { return true ; } else { if ( tenantId == null ) { tenantId = TenancyHelper . getCurrentTenantId ( ) ; } String tenantRealtimeUrl = TenancyHelper . resolveURLToCurrentTenant ( "https://realtime.docker.example.com" , tenantId ) ; return StringUtils . startsWith ( callbackUrl , tenantRealtimeUrl ) || StringUtils . startsWith ( callbackUrl , tenantRealtimeUrl . replaceFirst ( "https" , "http" ) ) ; } }
Checks for a realtime channel using any of the known channel types.
Checks for a realtime channel using any of the known channel types .
// fanout.io realm // agave pushpin server