mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
Normalize thread names (2) (#17849)
* Normalize thread names Signed-off-by: AndrewFG <software@whitebear.ch> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
cbb88c4e50
commit
760ba2c0e4
@ -17,6 +17,7 @@ import java.net.UnknownHostException;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.binding.broadlink.internal.BroadlinkBindingConstants;
|
||||
import org.openhab.binding.broadlink.internal.BroadlinkProtocol;
|
||||
import org.openhab.binding.broadlink.internal.NetworkUtils;
|
||||
import org.openhab.binding.broadlink.internal.socket.BroadlinkSocket;
|
||||
@ -37,6 +38,7 @@ public class DiscoveryProtocol {
|
||||
|
||||
AsyncDiscoveryThread(BroadlinkSocketListener listener, long timeoutMillis,
|
||||
DiscoveryFinishedListener finishedListener, Logger logger) {
|
||||
super(String.format("OH-binding-%s-%s", BroadlinkBindingConstants.BINDING_ID, "Discovery"));
|
||||
this.listener = listener;
|
||||
this.timeoutMillis = timeoutMillis;
|
||||
this.finishedListener = finishedListener;
|
||||
|
@ -23,6 +23,7 @@ import java.util.List;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.broadlink.internal.BroadlinkBindingConstants;
|
||||
import org.openhab.binding.broadlink.internal.ModelMapper;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@ -99,6 +100,7 @@ public class BroadlinkSocket {
|
||||
}
|
||||
|
||||
private ReceiverThread(Logger logger) {
|
||||
super(String.format("OH-binding-%s-%s", BroadlinkBindingConstants.BINDING_ID, "Receiver"));
|
||||
this.logger = logger;
|
||||
}
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ public class X10Interface extends Thread implements SerialPortEventListener {
|
||||
*
|
||||
*/
|
||||
public X10Interface(String serialPort, Cm11aBridgeHandler bridgeHandler) throws NoSuchPortException {
|
||||
super();
|
||||
super("OH-binding-" + bridgeHandler.getThing().getUID());
|
||||
logger.trace("**** Constructing X10Interface for serial port: {} *******", serialPort);
|
||||
portId = CommPortIdentifier.getPortIdentifier(serialPort);
|
||||
this.bridgeHandler = bridgeHandler;
|
||||
|
@ -22,6 +22,7 @@ import java.net.SocketTimeoutException;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.denonmarantz.internal.DenonMarantzBindingConstants;
|
||||
import org.openhab.binding.denonmarantz.internal.config.DenonMarantzConfiguration;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -54,6 +55,7 @@ public class DenonMarantzTelnetClientThread extends Thread {
|
||||
private @Nullable BufferedReader in;
|
||||
|
||||
public DenonMarantzTelnetClientThread(DenonMarantzConfiguration config, DenonMarantzTelnetListener listener) {
|
||||
super(String.format("OH-binding-%s-%s", DenonMarantzBindingConstants.BINDING_ID, "TelnetClient"));
|
||||
logger.debug("Denon listener created");
|
||||
this.config = config;
|
||||
this.listener = listener;
|
||||
|
@ -31,7 +31,7 @@ import org.openhab.core.thing.ThingTypeUID;
|
||||
@NonNullByDefault
|
||||
public class DigiplexBindingConstants {
|
||||
|
||||
private static final String BINDING_ID = "digiplex";
|
||||
public static final String BINDING_ID = "digiplex";
|
||||
|
||||
// List of all Thing Type UIDs
|
||||
public static final ThingTypeUID THING_TYPE_BRIDGE = new ThingTypeUID(BINDING_ID, "bridge");
|
||||
|
@ -31,6 +31,7 @@ import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.digiplex.internal.DigiplexBindingConstants;
|
||||
import org.openhab.binding.digiplex.internal.DigiplexBridgeConfiguration;
|
||||
import org.openhab.binding.digiplex.internal.communication.CommunicationStatus;
|
||||
import org.openhab.binding.digiplex.internal.communication.DigiplexMessageHandler;
|
||||
@ -303,7 +304,7 @@ public class DigiplexBridgeHandler extends BaseBridgeHandler implements SerialPo
|
||||
private final InputStream stream;
|
||||
|
||||
DigiplexReceiverThread(InputStream stream) {
|
||||
super("DigiplexReceiveThread");
|
||||
super(String.format("OH-binding-%s-%s", DigiplexBindingConstants.BINDING_ID, "Receiver"));
|
||||
this.stream = stream;
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,7 @@ import java.util.Arrays;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.doorbird.internal.DoorbirdBindingConstants;
|
||||
import org.openhab.binding.doorbird.internal.api.DoorbirdSession;
|
||||
import org.openhab.binding.doorbird.internal.handler.DoorbellHandler;
|
||||
import org.slf4j.Logger;
|
||||
@ -58,6 +59,7 @@ public class DoorbirdUdpListener extends Thread {
|
||||
private long lastDataTime;
|
||||
|
||||
public DoorbirdUdpListener(DoorbellHandler thingHandler) {
|
||||
super(String.format("OH-binding-%s-%s", DoorbirdBindingConstants.BINDING_ID, "UdpListener"));
|
||||
this.thingHandler = thingHandler;
|
||||
}
|
||||
|
||||
|
@ -286,6 +286,11 @@ public class FineOffsetGatewayDiscoveryService extends AbstractDiscoveryService
|
||||
* The thread, which waits for data and submits the unique results addresses to the discovery results
|
||||
*/
|
||||
private class ReceiverThread extends Thread {
|
||||
|
||||
public ReceiverThread() {
|
||||
super(String.format("OH-binding-%s-%s", FineOffsetWeatherStationBindingConstants.BINDING_ID, "Receiver"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
DatagramSocket socket = getSocket();
|
||||
|
@ -37,6 +37,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNull;
|
||||
import org.openhab.binding.globalcache.internal.GlobalCacheBindingConstants;
|
||||
import org.openhab.binding.globalcache.internal.GlobalCacheBindingConstants.CommandType;
|
||||
import org.openhab.binding.globalcache.internal.command.CommandGetstate;
|
||||
import org.openhab.binding.globalcache.internal.command.CommandGetversion;
|
||||
@ -452,7 +453,7 @@ public class GlobalCacheHandler extends BaseThingHandler {
|
||||
private ConnectionManager connectionManager;
|
||||
|
||||
public CommandProcessor() {
|
||||
super("GlobalCache Command Processor");
|
||||
super(String.format("OH-binding-%s-%s", GlobalCacheBindingConstants.BINDING_ID, "CommandProcessor"));
|
||||
sendQueue = new LinkedBlockingQueue<>(SEND_QUEUE_MAX_DEPTH);
|
||||
logger.debug("Processor for thing {} created request queue, depth={}", thingID(), SEND_QUEUE_MAX_DEPTH);
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
|
||||
import org.openhab.binding.ihc.internal.IhcBindingConstants;
|
||||
import org.openhab.binding.ihc.internal.ws.datatypes.WSControllerState;
|
||||
import org.openhab.binding.ihc.internal.ws.datatypes.WSFile;
|
||||
import org.openhab.binding.ihc.internal.ws.datatypes.WSLoginResult;
|
||||
@ -456,6 +457,10 @@ public class IhcClient {
|
||||
private class IhcResourceValueNotificationListener extends Thread {
|
||||
private volatile boolean interrupted = false;
|
||||
|
||||
public IhcResourceValueNotificationListener() {
|
||||
super(String.format("OH-binding-%s-%s", IhcBindingConstants.BINDING_ID, "NotificationListener"));
|
||||
}
|
||||
|
||||
public void setInterrupted(boolean interrupted) {
|
||||
this.interrupted = interrupted;
|
||||
this.interrupt();
|
||||
|
@ -103,6 +103,7 @@ public class Ffmpeg {
|
||||
public int countOfMotions;
|
||||
|
||||
IpCameraFfmpegThread() {
|
||||
super(String.format("OH-binding-%s-%s", IpCameraBindingConstants.BINDING_ID, "Ffmpeg"));
|
||||
setDaemon(true);
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ import org.openhab.core.thing.ThingTypeUID;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class IpCameraBindingConstants {
|
||||
private static final String BINDING_ID = "ipcamera";
|
||||
public static final String BINDING_ID = "ipcamera";
|
||||
public static final String AUTH_HANDLER = "authorizationHandler";
|
||||
public static final String AMCREST_HANDLER = "amcrestHandler";
|
||||
public static final String COMMON_HANDLER = "commonHandler";
|
||||
|
@ -22,6 +22,7 @@ import java.util.Arrays;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.openhab.binding.lirc.internal.LIRCBindingConstants;
|
||||
import org.openhab.binding.lirc.internal.LIRCResponseException;
|
||||
import org.openhab.binding.lirc.internal.messages.LIRCButtonEvent;
|
||||
import org.openhab.binding.lirc.internal.messages.LIRCResponse;
|
||||
@ -45,6 +46,7 @@ public class LIRCStreamReader extends Thread {
|
||||
private LIRCConnector connector;
|
||||
|
||||
public LIRCStreamReader(LIRCConnector connector, InputStream in) {
|
||||
super(String.format("OH-binding-%s-%s", LIRCBindingConstants.BINDING_ID, "StreamReader"));
|
||||
this.connector = connector;
|
||||
this.in = in;
|
||||
}
|
||||
|
@ -663,6 +663,7 @@ public class LxServerHandler extends BaseThingHandler implements LxServerHandler
|
||||
private Instant lastKeepAlive;
|
||||
|
||||
LxServerThread(int id) {
|
||||
super(String.format("OH-binding-%s-%s", LxBindingConstants.BINDING_ID, "Server"));
|
||||
debugId = id;
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import java.net.NetworkInterface;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.magentatv.internal.MagentaTVBindingConstants;
|
||||
import org.openhab.binding.magentatv.internal.MagentaTVHandlerFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -50,7 +51,7 @@ public class MagentaTVPoweroffListener extends Thread {
|
||||
|
||||
public MagentaTVPoweroffListener(MagentaTVHandlerFactory handlerFactory,
|
||||
@Nullable NetworkInterface networkInterface) throws IOException {
|
||||
setName("OH-Binding-magentatv-upnp-listener");
|
||||
super(String.format("OH-binding-%s-%s", MagentaTVBindingConstants.BINDING_ID, "PoweroffListener"));
|
||||
setDaemon(true);
|
||||
|
||||
this.handlerFactory = handlerFactory;
|
||||
|
@ -27,6 +27,7 @@ import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.openhab.binding.meteostick.internal.MeteostickBindingConstants;
|
||||
import org.openhab.core.config.core.Configuration;
|
||||
import org.openhab.core.io.transport.serial.PortInUseException;
|
||||
import org.openhab.core.io.transport.serial.SerialPort;
|
||||
@ -222,6 +223,10 @@ public class MeteostickBridgeHandler extends BaseBridgeHandler {
|
||||
private class ReceiveThread extends Thread implements SerialPortEventListener {
|
||||
private final Logger logger = LoggerFactory.getLogger(ReceiveThread.class);
|
||||
|
||||
public ReceiveThread() {
|
||||
super(String.format("OH-binding-%s-%s", MeteostickBindingConstants.BINDING_ID, "Receiver"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialEvent(SerialPortEvent arg0) {
|
||||
try {
|
||||
|
@ -32,6 +32,7 @@ import java.util.concurrent.TimeUnit;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.miio.internal.Message;
|
||||
import org.openhab.binding.miio.internal.MiIoBindingConstants;
|
||||
import org.openhab.binding.miio.internal.MiIoDevices;
|
||||
import org.openhab.binding.miio.internal.Utils;
|
||||
import org.openhab.binding.miio.internal.cloud.CloudConnector;
|
||||
@ -352,6 +353,11 @@ public class MiIoDiscovery extends AbstractDiscoveryService {
|
||||
*
|
||||
*/
|
||||
private class ReceiverThread extends Thread {
|
||||
|
||||
public ReceiverThread() {
|
||||
super(String.format("OH-binding-%s-%s", MiIoBindingConstants.BINDING_ID, "Receiver"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
DatagramSocket socket = getSocket();
|
||||
|
@ -260,7 +260,7 @@ public class MiIoAsyncCommunication {
|
||||
private final String deviceId;
|
||||
|
||||
public MessageSenderThread(String deviceId) {
|
||||
super("OH-binding-miio-MessageSenderThread-" + deviceId);
|
||||
super(String.format("OH-binding-%s-%s-%s", MiIoBindingConstants.BINDING_ID, "Sender", deviceId));
|
||||
setDaemon(true);
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import org.openhab.core.thing.ThingTypeUID;
|
||||
@NonNullByDefault
|
||||
public class MPDBindingConstants {
|
||||
|
||||
private static final String BINDING_ID = "mpd";
|
||||
public static final String BINDING_ID = "mpd";
|
||||
|
||||
// List of all Thing Type UIDs
|
||||
public static final ThingTypeUID THING_TYPE_MPD = new ThingTypeUID(BINDING_ID, "mpd");
|
||||
|
@ -24,6 +24,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.mpd.internal.MPDBindingConstants;
|
||||
import org.openhab.binding.mpd.internal.MPDException;
|
||||
import org.openhab.core.thing.ThingStatus;
|
||||
import org.openhab.core.thing.ThingStatusDetail;
|
||||
@ -58,6 +59,7 @@ public class MPDConnectionThread extends Thread {
|
||||
private AtomicBoolean disposed = new AtomicBoolean(false);
|
||||
|
||||
public MPDConnectionThread(MPDResponseListener listener, String address, Integer port, String password) {
|
||||
super(String.format("OH-binding-%s-%s", MPDBindingConstants.BINDING_ID, "Connection"));
|
||||
this.listener = listener;
|
||||
this.address = address;
|
||||
this.port = port;
|
||||
|
@ -22,7 +22,7 @@ import org.openhab.core.thing.ThingTypeUID;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class MyNiceBindingConstants {
|
||||
private static final String BINDING_ID = "mynice";
|
||||
public static final String BINDING_ID = "mynice";
|
||||
|
||||
// List of all Channel ids
|
||||
public static final String CHANNEL_STATUS = "status";
|
||||
|
@ -20,6 +20,7 @@ import java.io.OutputStreamWriter;
|
||||
import javax.net.ssl.SSLSocket;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.binding.mynice.internal.MyNiceBindingConstants;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -39,7 +40,7 @@ public class It4WifiConnector extends Thread {
|
||||
private final OutputStreamWriter out;
|
||||
|
||||
public It4WifiConnector(It4WifiHandler handler, SSLSocket sslSocket) throws IOException {
|
||||
super(It4WifiConnector.class.getName());
|
||||
super(String.format("OH-binding-%s-%s", MyNiceBindingConstants.BINDING_ID, "WifiConnector"));
|
||||
this.handler = handler;
|
||||
this.in = new InputStreamReader(sslSocket.getInputStream());
|
||||
this.out = new OutputStreamWriter(sslSocket.getOutputStream());
|
||||
|
@ -27,7 +27,7 @@ import org.openhab.core.thing.ThingTypeUID;
|
||||
@NonNullByDefault
|
||||
public class NetworkBindingConstants {
|
||||
|
||||
private static final String BINDING_ID = "network";
|
||||
public static final String BINDING_ID = "network";
|
||||
|
||||
// List of all Thing Type UIDs
|
||||
public static final ThingTypeUID BACKWARDS_COMPATIBLE_DEVICE = new ThingTypeUID(BINDING_ID, "device");
|
||||
|
@ -21,6 +21,7 @@ import java.net.SocketException;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.network.internal.NetworkBindingConstants;
|
||||
import org.openhab.binding.network.internal.dhcp.DHCPPacket.BadPacketException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -45,6 +46,7 @@ public class DHCPPacketListenerServer extends Thread {
|
||||
private int currentPort = PRIVILEGED_PORT;
|
||||
|
||||
DHCPPacketListenerServer(IPRequestReceivedCallback listener) throws SocketException {
|
||||
super(String.format("OH-binding-%s-%s", NetworkBindingConstants.BINDING_ID, "DHCPPacketListener"));
|
||||
this.listener = listener;
|
||||
try {
|
||||
bindSocketTo(currentPort);
|
||||
|
@ -26,7 +26,7 @@ import org.openhab.core.thing.ThingTypeUID;
|
||||
*/
|
||||
public class NibeHeatPumpBindingConstants {
|
||||
|
||||
private static final String BINDING_ID = "nibeheatpump";
|
||||
public static final String BINDING_ID = "nibeheatpump";
|
||||
|
||||
// List of all Thing Type UIDs
|
||||
public static final ThingTypeUID THING_TYPE_F1X45_UDP = new ThingTypeUID(BINDING_ID, "f1x45-udp");
|
||||
|
@ -21,6 +21,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.TooManyListenersException;
|
||||
|
||||
import org.openhab.binding.nibeheatpump.internal.NibeHeatPumpBindingConstants;
|
||||
import org.openhab.binding.nibeheatpump.internal.NibeHeatPumpException;
|
||||
import org.openhab.binding.nibeheatpump.internal.config.NibeHeatPumpConfiguration;
|
||||
import org.openhab.binding.nibeheatpump.internal.message.MessageFactory;
|
||||
@ -165,6 +166,7 @@ public class SerialConnector extends NibeHeatPumpBaseConnector {
|
||||
final InputStream in;
|
||||
|
||||
SerialReader(InputStream in) {
|
||||
super(String.format("OH-binding-%s-%s", NibeHeatPumpBindingConstants.BINDING_ID, "SerialReader"));
|
||||
this.in = in;
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import org.openhab.binding.nibeheatpump.internal.NibeHeatPumpBindingConstants;
|
||||
import org.openhab.binding.nibeheatpump.internal.NibeHeatPumpException;
|
||||
import org.openhab.binding.nibeheatpump.internal.config.NibeHeatPumpConfiguration;
|
||||
import org.openhab.binding.nibeheatpump.internal.message.MessageFactory;
|
||||
@ -125,6 +126,10 @@ public class SimulatorConnector extends NibeHeatPumpBaseConnector {
|
||||
private class Reader extends Thread {
|
||||
boolean interrupted = false;
|
||||
|
||||
public Reader() {
|
||||
super(String.format("OH-binding-%s-%s", NibeHeatPumpBindingConstants.BINDING_ID, "SimulatorReader"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void interrupt() {
|
||||
logger.debug("Data listener interupt request received");
|
||||
|
@ -20,6 +20,7 @@ import java.net.InetAddress;
|
||||
import java.net.SocketException;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.openhab.binding.nibeheatpump.internal.NibeHeatPumpBindingConstants;
|
||||
import org.openhab.binding.nibeheatpump.internal.NibeHeatPumpException;
|
||||
import org.openhab.binding.nibeheatpump.internal.config.NibeHeatPumpConfiguration;
|
||||
import org.openhab.binding.nibeheatpump.internal.message.ModbusReadRequestMessage;
|
||||
@ -124,6 +125,10 @@ public class UDPConnector extends NibeHeatPumpBaseConnector {
|
||||
private class Reader extends Thread {
|
||||
boolean interrupted = false;
|
||||
|
||||
public Reader() {
|
||||
super(String.format("OH-binding-%s-%s", NibeHeatPumpBindingConstants.BINDING_ID, "UDPReader"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void interrupt() {
|
||||
interrupted = true;
|
||||
|
@ -74,6 +74,7 @@ public class HubCommunicationThread extends Thread {
|
||||
private HubCommunicationThreadState currentState = HubCommunicationThreadState.STARTING;
|
||||
|
||||
public HubCommunicationThread(HubConnection hubConnection, NoboHubBridgeHandler hubHandler, Duration timeout) {
|
||||
super("OH-binding-" + hubHandler.getThing().getUID());
|
||||
this.hubConnection = hubConnection;
|
||||
this.hubHandler = hubHandler;
|
||||
this.timeout = timeout;
|
||||
|
@ -21,6 +21,7 @@ import java.util.Objects;
|
||||
import java.util.TooManyListenersException;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.openhab.binding.oceanic.internal.OceanicBindingConstants;
|
||||
import org.openhab.binding.oceanic.internal.SerialOceanicBindingConfiguration;
|
||||
import org.openhab.binding.oceanic.internal.Throttler;
|
||||
import org.openhab.core.io.transport.serial.PortInUseException;
|
||||
@ -208,6 +209,7 @@ public class SerialOceanicThingHandler extends OceanicThingHandler implements Se
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss,SSS");
|
||||
|
||||
public SerialPortReader(InputStream in) {
|
||||
super(String.format("OH-binding-%s-%s", OceanicBindingConstants.BINDING_ID, "SerialPortReader"));
|
||||
this.inputStream = in;
|
||||
this.setName("SerialPortReader-" + getThing().getUID());
|
||||
}
|
||||
|
@ -276,6 +276,7 @@ public class OnkyoConnection {
|
||||
private boolean interrupted = false;
|
||||
|
||||
DataListener() {
|
||||
super(String.format("OH-binding-%s-%s", OnkyoBindingConstants.BINDING_ID, "DataListener"));
|
||||
}
|
||||
|
||||
public void setInterrupted(boolean interrupted) {
|
||||
|
@ -24,6 +24,7 @@ import java.util.List;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.openhab.binding.pioneeravr.internal.PioneerAvrBindingConstants;
|
||||
import org.openhab.binding.pioneeravr.internal.protocol.ParameterizedCommand.ParameterizedCommandType;
|
||||
import org.openhab.binding.pioneeravr.internal.protocol.SimpleCommand.SimpleCommandType;
|
||||
import org.openhab.binding.pioneeravr.internal.protocol.avr.AvrCommand;
|
||||
@ -351,11 +352,10 @@ public abstract class StreamAvrConnection implements AvrConnection {
|
||||
* @throws IOException
|
||||
*/
|
||||
public IpControlInputStreamReader(InputStream inputStream) {
|
||||
super(String.format("OH-binding-%s-%s", PioneerAvrBindingConstants.BINDING_ID, getConnectionName()));
|
||||
this.bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
|
||||
this.stopLatch = new CountDownLatch(1);
|
||||
|
||||
this.setDaemon(true);
|
||||
this.setName("IpControlInputStreamReader-" + getConnectionName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -390,6 +390,7 @@ public class PS4Handler extends BaseThingHandler {
|
||||
private SocketChannel socketChannel;
|
||||
|
||||
public SocketChannelHandler() throws IOException {
|
||||
super(String.format("OH-binding-%s-%s", PlayStationBindingConstants.BINDING_ID, "SocketChannelHandler"));
|
||||
socketChannel = setupChannel();
|
||||
loggedIn = false;
|
||||
oskOpen = false;
|
||||
|
@ -29,7 +29,7 @@ import org.openhab.core.thing.ThingTypeUID;
|
||||
@NonNullByDefault
|
||||
public class PlayStationBindingConstants {
|
||||
|
||||
private static final String BINDING_ID = "playstation";
|
||||
public static final String BINDING_ID = "playstation";
|
||||
|
||||
// List of all Thing Type UIDs
|
||||
public static final ThingTypeUID THING_TYPE_PS3 = new ThingTypeUID(BINDING_ID, "PS3");
|
||||
|
@ -244,8 +244,8 @@ public abstract class SerialThingHandler extends BaseThingHandler implements Ser
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss,SSS");
|
||||
|
||||
public SerialPortReader(InputStream in) {
|
||||
super("OH-binding-" + getThing().getUID());
|
||||
this.inputStream = in;
|
||||
this.setName("SerialPortReader-" + getThing().getUID());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -18,6 +18,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.shelly.internal.ShellyBindingConstants;
|
||||
|
||||
/**
|
||||
* {@link ShellyManagerCache} implements a cache with expiring times of the entries
|
||||
@ -76,6 +77,11 @@ public class ShellyManagerCache<K, V> extends ConcurrentHashMap<K, V> {
|
||||
}
|
||||
|
||||
class CleanerThread extends Thread {
|
||||
|
||||
public CleanerThread() {
|
||||
super(String.format("OH-binding-%s-%s", ShellyBindingConstants.BINDING_ID, "Cleaner"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
while (true) {
|
||||
|
@ -11,6 +11,7 @@ import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.binding.smsmodem.internal.SMSModemBindingConstants;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.smslib.DeviceInformation.Modes;
|
||||
@ -41,6 +42,7 @@ public class MessageReader extends Thread {
|
||||
private static int HOURS_TO_RETAIN_ORPHANED_MESSAGE_PARTS = 72;
|
||||
|
||||
public MessageReader(Modem modem) {
|
||||
super(String.format("OH-binding-%s-%s", SMSModemBindingConstants.BINDING_ID, "MessageReader"));
|
||||
this.modem = modem;
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@ import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.smsmodem.internal.SMSModemBindingConstants;
|
||||
import org.openhab.core.io.transport.serial.SerialPortManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -145,8 +146,9 @@ public class Modem {
|
||||
modemPollingInterval, TimeUnit.SECONDS);
|
||||
this.modemDriver.refreshRssi();
|
||||
this.messageSender = new MessageSender(
|
||||
String.format("Gateway Dispatcher 1 [%s]", this.gatewayId), messageQueue, this,
|
||||
gatewayDispatcherYield);
|
||||
String.format("OH-binding-%s-%s-%s", SMSModemBindingConstants.BINDING_ID,
|
||||
"GatewayDispatcher", this.gatewayId),
|
||||
messageQueue, this, gatewayDispatcherYield);
|
||||
startSendingQueue();
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Gateway: {}: {}, SL:{}, SIG: {} / {}", toShortString(),
|
||||
|
@ -25,7 +25,7 @@ import org.openhab.core.thing.ThingTypeUID;
|
||||
@NonNullByDefault
|
||||
public class SMSModemBindingConstants {
|
||||
|
||||
private static final String BINDING_ID = "smsmodem";
|
||||
public static final String BINDING_ID = "smsmodem";
|
||||
|
||||
// List of all Thing Type UIDs
|
||||
public static final ThingTypeUID SMSCONVERSATION_THING_TYPE = new ThingTypeUID(BINDING_ID, "smsconversation");
|
||||
|
@ -39,6 +39,7 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.binding.squeezebox.internal.SqueezeBoxBindingConstants;
|
||||
import org.openhab.binding.squeezebox.internal.config.SqueezeBoxServerConfig;
|
||||
import org.openhab.binding.squeezebox.internal.dto.ButtonDTO;
|
||||
import org.openhab.binding.squeezebox.internal.dto.ButtonDTODeserializer;
|
||||
@ -440,7 +441,7 @@ public class SqueezeBoxServerHandler extends BaseBridgeHandler {
|
||||
private boolean terminate = false;
|
||||
|
||||
public SqueezeServerListener() {
|
||||
super("Squeeze Server Listener");
|
||||
super(String.format("OH-binding-%s-%s", SqueezeBoxBindingConstants.BINDING_ID, "ServerListener"));
|
||||
}
|
||||
|
||||
public void terminate() {
|
||||
|
@ -41,7 +41,7 @@ public class TeleinfoReceiveThread extends Thread {
|
||||
|
||||
public TeleinfoReceiveThread(SerialPort serialPort, final TeleinfoSerialControllerHandler listener,
|
||||
boolean autoRepairInvalidADPSgroupLine, TeleinfoTicMode ticMode, boolean verifyChecksum) {
|
||||
super("OH-binding-TeleinfoReceiveThread-" + listener.getThing().getUID().getId());
|
||||
super("OH-binding-" + listener.getThing().getUID());
|
||||
setDaemon(true);
|
||||
this.serialPort = serialPort;
|
||||
this.listener = listener;
|
||||
|
@ -122,6 +122,7 @@ public class TouchWandControllerDiscoveryService extends AbstractDiscoveryServic
|
||||
private DatagramSocket mySocket;
|
||||
|
||||
public ReceiverThread(DatagramSocket socket) {
|
||||
super(String.format("OH-binding-%s-%s", TouchWandBindingConstants.BINDING_ID, "Receiver"));
|
||||
mySocket = socket;
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ class HueEmulationConfigWithRuntime extends Thread implements Runnable {
|
||||
|
||||
HueEmulationConfigWithRuntime(Consumer<HueEmulationConfigWithRuntime> r, HueEmulationConfig config,
|
||||
String addrString, InetAddress MULTI_ADDR_IPV4, InetAddress MULTI_ADDR_IPV6) throws UnknownHostException {
|
||||
super("HueEmulation UPNP Server");
|
||||
super("OH-io-hueemulation-UPNPServer");
|
||||
this.r = r;
|
||||
this.config = config;
|
||||
|
||||
@ -72,7 +72,7 @@ class HueEmulationConfigWithRuntime extends Thread implements Runnable {
|
||||
|
||||
HueEmulationConfigWithRuntime(Consumer<HueEmulationConfigWithRuntime> r, @Nullable HueEmulationConfig config,
|
||||
InetAddress MULTI_ADDR_IPV4, InetAddress MULTI_ADDR_IPV6) throws UnknownHostException {
|
||||
super("HueEmulation UPNP Server");
|
||||
super("OH-io-hueemulation-UPNPServer");
|
||||
this.r = r;
|
||||
this.config = config;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user