Search in sources :

Example 1 with ApplicationNameNotificationFilter

use of de.codecentric.boot.admin.notify.filter.ApplicationNameNotificationFilter in project spring-boot-admin by codecentric.

the class NotificationFilterController method createFilter.

private NotificationFilter createFilter(String id, String name, long ttl) {
    long expiry = ttl > 0L ? System.currentTimeMillis() + ttl : ttl;
    NotificationFilter filter = hasText(id) ? new ApplicationIdNotificationFilter(id, expiry) : new ApplicationNameNotificationFilter(name, expiry);
    return filter;
}
Also used : ApplicationNameNotificationFilter(de.codecentric.boot.admin.notify.filter.ApplicationNameNotificationFilter) ApplicationIdNotificationFilter(de.codecentric.boot.admin.notify.filter.ApplicationIdNotificationFilter) NotificationFilter(de.codecentric.boot.admin.notify.filter.NotificationFilter) ApplicationIdNotificationFilter(de.codecentric.boot.admin.notify.filter.ApplicationIdNotificationFilter) ApplicationNameNotificationFilter(de.codecentric.boot.admin.notify.filter.ApplicationNameNotificationFilter)

Aggregations

ApplicationIdNotificationFilter (de.codecentric.boot.admin.notify.filter.ApplicationIdNotificationFilter)1 ApplicationNameNotificationFilter (de.codecentric.boot.admin.notify.filter.ApplicationNameNotificationFilter)1 NotificationFilter (de.codecentric.boot.admin.notify.filter.NotificationFilter)1