[avmfritz] Minor improvements in code an documentation (#9464)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
This commit is contained in:
committed by
GitHub
parent
e648fc6c8c
commit
46b02c5b6e
@@ -22,7 +22,7 @@ import org.osgi.service.component.annotations.Component;
|
||||
/**
|
||||
* Provides a TrustManager to allow secure connections to any FRITZ!Box
|
||||
*
|
||||
* @author Chritoph Weitkamp - Initial Contribution
|
||||
* @author Christoph Weitkamp - Initial Contribution
|
||||
*/
|
||||
@Component
|
||||
@NonNullByDefault
|
||||
|
||||
@@ -45,10 +45,10 @@ public class CallMonitor {
|
||||
private final int MONITOR_PORT = 1012;
|
||||
|
||||
private @Nullable CallMonitorThread monitorThread;
|
||||
private ScheduledFuture<?> reconnectJob;
|
||||
private final ScheduledFuture<?> reconnectJob;
|
||||
|
||||
private String ip;
|
||||
private BoxHandler handler;
|
||||
private final String ip;
|
||||
private final BoxHandler handler;
|
||||
|
||||
public CallMonitor(String ip, BoxHandler handler, ScheduledExecutorService scheduler) {
|
||||
this.ip = ip;
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
*/
|
||||
package org.openhab.binding.avmfritz.internal.handler;
|
||||
|
||||
import java.util.HashSet;
|
||||
import static org.openhab.binding.avmfritz.internal.AVMFritzBindingConstants.*;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.eclipse.jetty.client.HttpClient;
|
||||
import org.openhab.binding.avmfritz.internal.AVMFritzBindingConstants;
|
||||
import org.openhab.binding.avmfritz.internal.AVMFritzDynamicCommandDescriptionProvider;
|
||||
import org.openhab.binding.avmfritz.internal.callmonitor.CallMonitor;
|
||||
import org.openhab.binding.avmfritz.internal.config.AVMFritzBoxConfiguration;
|
||||
@@ -38,14 +38,8 @@ import org.openhab.core.types.State;
|
||||
@NonNullByDefault
|
||||
public class BoxHandler extends AVMFritzBaseBridgeHandler {
|
||||
|
||||
protected static final Set<String> CALL_CHANNELS = new HashSet<>();
|
||||
static {
|
||||
// TODO: We are still on Java 8 and cannot use Set.of
|
||||
CALL_CHANNELS.add(AVMFritzBindingConstants.CHANNEL_CALL_ACTIVE);
|
||||
CALL_CHANNELS.add(AVMFritzBindingConstants.CHANNEL_CALL_INCOMING);
|
||||
CALL_CHANNELS.add(AVMFritzBindingConstants.CHANNEL_CALL_OUTGOING);
|
||||
CALL_CHANNELS.add(AVMFritzBindingConstants.CHANNEL_CALL_STATE);
|
||||
}
|
||||
private static final Set<String> CALL_CHANNELS = Set.of(CHANNEL_CALL_ACTIVE, CHANNEL_CALL_INCOMING,
|
||||
CHANNEL_CALL_OUTGOING, CHANNEL_CALL_STATE);
|
||||
|
||||
private @Nullable CallMonitor callMonitor;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user