TargetPollEvent optional (#580)
* TargetPollEvent can be disabled. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Fixed test. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Central filter introduced. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Fix sonar issue. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Add property to standard runtime. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Add property to standard runtime. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.repository;
|
||||
|
||||
import org.eclipse.hawkbit.repository.event.remote.TargetPollEvent;
|
||||
import org.eclipse.hawkbit.repository.model.ActionStatus;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
@@ -24,7 +25,14 @@ public class RepositoryProperties {
|
||||
* is enforced you have to make sure that the feedback channel from the
|
||||
* devices i in order.
|
||||
*/
|
||||
private boolean rejectActionStatusForClosedAction = false;
|
||||
private boolean rejectActionStatusForClosedAction;
|
||||
|
||||
/**
|
||||
* Set to <code>true</code> if the repository should publish
|
||||
* {@link TargetPollEvent}s in case a target connects to the repository.
|
||||
* Activated by default but may be worth to disable if not needed.
|
||||
*/
|
||||
private boolean publishTargetPollEvent = true;
|
||||
|
||||
public boolean isRejectActionStatusForClosedAction() {
|
||||
return rejectActionStatusForClosedAction;
|
||||
@@ -34,4 +42,12 @@ public class RepositoryProperties {
|
||||
this.rejectActionStatusForClosedAction = rejectActionStatusForClosedAction;
|
||||
}
|
||||
|
||||
public boolean isPublishTargetPollEvent() {
|
||||
return publishTargetPollEvent;
|
||||
}
|
||||
|
||||
public void setPublishTargetPollEvent(final boolean publishTargetPollEvent) {
|
||||
this.publishTargetPollEvent = publishTargetPollEvent;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*/
|
||||
package org.eclipse.hawkbit.repository.event;
|
||||
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
|
||||
/**
|
||||
* ApplicationEventFilter for hawkBit internal {@link ApplicationEvent}
|
||||
* publishing.
|
||||
*
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface ApplicationEventFilter {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param event
|
||||
* to verify
|
||||
* @return true if event should be filtered
|
||||
*/
|
||||
boolean filter(final ApplicationEvent event);
|
||||
}
|
||||
Reference in New Issue
Block a user