From 6653287a88d1464e38c0a84ae13584acab7a00af Mon Sep 17 00:00:00 2001 From: puyang1017 Date: Tue, 31 Mar 2020 15:53:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89mqtt=20log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../paho/client/mqttv3/MqttAsyncClient.java | 61 +- .../mqttv3/ScheduledExecutorPingSender.java | 6 - .../paho/client/mqttv3/TimerPingSender.java | 11 +- .../client/mqttv3/internal/ClientComms.java | 40 +- .../client/mqttv3/internal/ClientState.java | 104 +--- .../client/mqttv3/internal/CommsCallback.java | 26 +- .../client/mqttv3/internal/CommsReceiver.java | 12 - .../client/mqttv3/internal/CommsSender.java | 11 +- .../mqttv3/internal/CommsTokenStore.java | 19 +- .../internal/DisconnectedMessageBuffer.java | 5 - .../mqttv3/internal/NetworkModuleService.java | 6 - .../mqttv3/internal/SSLNetworkModule.java | 16 +- .../mqttv3/internal/TCPNetworkModule.java | 6 - .../paho/client/mqttv3/internal/Token.java | 21 +- .../mqttv3/internal/nls/logcat.properties | 171 ------ .../mqttv3/internal/nls/messages.properties | 38 -- .../internal/nls/messages_cs.properties | 35 -- .../internal/nls/messages_de.properties | 35 -- .../internal/nls/messages_es.properties | 35 -- .../internal/nls/messages_fr.properties | 35 -- .../internal/nls/messages_hu.properties | 35 -- .../internal/nls/messages_it.properties | 35 -- .../internal/nls/messages_ja.properties | 35 -- .../internal/nls/messages_ko.properties | 35 -- .../internal/nls/messages_pl.properties | 35 -- .../internal/nls/messages_pt_BR.properties | 35 -- .../internal/nls/messages_ru.properties | 35 -- .../internal/nls/messages_zh_CN.properties | 35 -- .../internal/nls/messages_zh_TW.properties | 35 -- .../security/SSLSocketFactoryFactory.java | 83 +-- .../internal/websocket/WebSocketFrame.java | 1 - .../websocket/WebSocketHandshake.java | 1 - .../internal/websocket/WebSocketReceiver.java | 8 - .../WebSocketSecureNetworkModule.java | 6 +- .../mqttv3/internal/wire/MqttInputStream.java | 4 - .../internal/wire/MqttOutputStream.java | 6 - .../client/mqttv3/logging/JSR47Logger.java | 278 --------- .../paho/client/mqttv3/logging/Logger.java | 579 ------------------ .../client/mqttv3/logging/LoggerFactory.java | 155 ----- .../mqttv3/logging/SimpleLogFormatter.java | 104 ---- .../client/mqttv3/logging/jsr47min.properties | 82 --- .../paho/client/mqttv3/logging/package.html | 18 - .../paho/client/mqttv3/util/Debug.java | 15 +- 43 files changed, 36 insertions(+), 2312 deletions(-) delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/logcat.properties delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages.properties delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_cs.properties delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_de.properties delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_es.properties delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_fr.properties delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_hu.properties delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_it.properties delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_ja.properties delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_ko.properties delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_pl.properties delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_pt_BR.properties delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_ru.properties delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_zh_CN.properties delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_zh_TW.properties delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/JSR47Logger.java delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/Logger.java delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/LoggerFactory.java delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/SimpleLogFormatter.java delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/jsr47min.properties delete mode 100644 puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/package.html diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/MqttAsyncClient.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/MqttAsyncClient.java index 3acd199..de5d5eb 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/MqttAsyncClient.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/MqttAsyncClient.java @@ -25,8 +25,8 @@ import java.util.Properties; import java.util.Timer; import java.util.TimerTask; -import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; +import java.util.logging.Logger; import javax.net.SocketFactory; import org.eclipse.paho.client.mqttv3.internal.ClientComms; @@ -39,12 +39,9 @@ import org.eclipse.paho.client.mqttv3.internal.wire.MqttPublish; import org.eclipse.paho.client.mqttv3.internal.wire.MqttSubscribe; import org.eclipse.paho.client.mqttv3.internal.wire.MqttUnsubscribe; -import org.eclipse.paho.client.mqttv3.logging.Logger; -import org.eclipse.paho.client.mqttv3.logging.LoggerFactory; import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence; import org.eclipse.paho.client.mqttv3.persist.MqttDefaultFilePersistence; import org.eclipse.paho.client.mqttv3.util.Debug; -import org.eclipse.paho.client.mqttv3.IMqttToken; /** * Lightweight client for talking to an MQTT server using non-blocking methods @@ -92,7 +89,6 @@ */ public class MqttAsyncClient implements IMqttAsyncClient { private static final String CLASS_NAME = MqttAsyncClient.class.getName(); - private Logger log = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT, CLASS_NAME); private static final String CLIENT_ID_PREFIX = "paho"; private static final long QUIESCE_TIMEOUT = 30000; // ms @@ -435,7 +431,6 @@ public MqttAsyncClient(String serverURI, String clientId, MqttClientPersistence MqttPingSender pingSender, ScheduledExecutorService executorService) throws MqttException { final String methodName = "MqttAsyncClient"; - log.setResourceName(clientId); if (clientId == null) { // Support empty client Id, 3.1.1 standard throw new IllegalArgumentException("Null clientId"); @@ -464,7 +459,6 @@ public MqttAsyncClient(String serverURI, String clientId, MqttClientPersistence this.executorService = executorService; // @TRACE 101= ClientID={0} ServerURI={1} PersistenceType={2} - log.fine(CLASS_NAME, methodName, "101", new Object[] { clientId, serverURI, persistence }); this.persistence.open(clientId, serverURI); this.comms = new ClientComms(this, this.persistence, pingSender, this.executorService); @@ -500,7 +494,6 @@ protected NetworkModule[] createNetworkModules(String address, MqttConnectOption throws MqttException, MqttSecurityException { final String methodName = "createNetworkModules"; // @TRACE 116=URI={0} - log.fine(CLASS_NAME, methodName, "116", new Object[] { address }); NetworkModule[] networkModules = null; String[] serverURIs = options.getServerURIs(); @@ -518,7 +511,6 @@ protected NetworkModule[] createNetworkModules(String address, MqttConnectOption networkModules[i] = createNetworkModule(array[i], options); } - log.fine(CLASS_NAME, methodName, "108"); return networkModules; } @@ -533,7 +525,6 @@ protected NetworkModule[] createNetworkModules(String address, MqttConnectOption private NetworkModule createNetworkModule(String address, MqttConnectOptions options) throws MqttException, MqttSecurityException { final String methodName = "createNetworkModule"; // @TRACE 115=URI={0} - log.fine(CLASS_NAME,methodName, "115", new Object[] {address}); NetworkModule netModule = NetworkModuleService.createInstance(address, options, clientId); @@ -616,11 +607,6 @@ public IMqttToken connect(MqttConnectOptions options, Object userContext, IMqttA // @TRACE 103=cleanSession={0} connectionTimeout={1} TimekeepAlive={2} // userName={3} password={4} will={5} userContext={6} callback={7} - log.fine(CLASS_NAME, methodName, "103", - new Object[] { Boolean.valueOf(options.isCleanSession()), Integer.valueOf(options.getConnectionTimeout()), - Integer.valueOf(options.getKeepAliveInterval()), options.getUserName(), - ((null == options.getPassword()) ? "[null]" : "[notnull]"), - ((null == options.getWillMessage()) ? "[null]" : "[notnull]"), userContext, callback }); comms.setNetworkModules(createNetworkModules(serverURI, options)); comms.setReconnectCallback(new MqttReconnectCallback(automaticReconnect)); @@ -683,7 +669,6 @@ public IMqttToken disconnect(long quiesceTimeout, Object userContext, IMqttActio throws MqttException { final String methodName = "disconnect"; // @TRACE 104=> quiesceTimeout={0} userContext={1} callback={2} - log.fine(CLASS_NAME, methodName, "104", new Object[] { Long.valueOf(quiesceTimeout), userContext, callback }); MqttToken token = new MqttToken(getClientId()); token.setActionCallback(callback); @@ -694,11 +679,9 @@ public IMqttToken disconnect(long quiesceTimeout, Object userContext, IMqttActio comms.disconnect(disconnect, quiesceTimeout, token); } catch (MqttException ex) { // @TRACE 105=< exception - log.fine(CLASS_NAME, methodName, "105", null, ex); throw ex; } // @TRACE 108=< - log.fine(CLASS_NAME, methodName, "108"); return token; } @@ -872,11 +855,9 @@ public IMqttToken checkPing(Object userContext, IMqttActionListener callback) th final String methodName = "ping"; MqttToken token; // @TRACE 117=> - log.fine(CLASS_NAME, methodName, "117"); token = comms.checkForActivity(callback); // @TRACE 118=< - log.fine(CLASS_NAME, methodName, "118"); return token; } @@ -942,17 +923,6 @@ private IMqttToken subscribeBase(String[] topicFilters, int[] qos, Object userCo final String methodName = "subscribe"; // Only Generate Log string if we are logging at FINE level - if (log.isLoggable(Logger.FINE)) { - StringBuffer subs = new StringBuffer(); - for (int i = 0; i < topicFilters.length; i++) { - if (i > 0) { - subs.append(", "); - } - subs.append("topic=").append(topicFilters[i]).append(" qos=").append(qos[i]); - } - // @TRACE 106=Subscribe topicFilter={0} userContext={1} callback={2} - log.fine(CLASS_NAME, methodName, "106", new Object[] { subs.toString(), userContext, callback }); - } MqttToken token = new MqttToken(getClientId()); token.setActionCallback(callback); @@ -963,7 +933,6 @@ private IMqttToken subscribeBase(String[] topicFilters, int[] qos, Object userCo comms.sendNoWait(register, token); // @TRACE 109=< - log.fine(CLASS_NAME, methodName, "109"); return token; } @@ -1084,18 +1053,6 @@ public IMqttToken unsubscribe(String[] topicFilters, Object userContext, IMqttAc final String methodName = "unsubscribe"; // Only Generate Log string if we are logging at FINE level - if (log.isLoggable(Logger.FINE)) { - String subs = ""; - for (int i = 0; i < topicFilters.length; i++) { - if (i > 0) { - subs += ", "; - } - subs += topicFilters[i]; - } - - // @TRACE 107=Unsubscribe topic={0} userContext={1} callback={2} - log.fine(CLASS_NAME, methodName, "107", new Object[] { subs, userContext, callback }); - } for (String topicFilter : topicFilters) { // Check if the topic filter is valid before unsubscribing @@ -1119,7 +1076,6 @@ public IMqttToken unsubscribe(String[] topicFilters, Object userContext, IMqttAc comms.sendNoWait(unregister, token); // @TRACE 110=< - log.fine(CLASS_NAME, methodName, "110"); return token; } @@ -1236,7 +1192,6 @@ public IMqttDeliveryToken publish(String topic, MqttMessage message, Object user IMqttActionListener callback) throws MqttException, MqttPersistenceException { final String methodName = "publish"; // @TRACE 111=< topic={0} message={1}userContext={1} callback={2} - log.fine(CLASS_NAME, methodName, "111", new Object[] { topic, userContext, callback }); // Checks if a topic is valid when publishing a message. MqttTopic.validate(topic, false/* wildcards NOT allowed */); @@ -1251,7 +1206,6 @@ public IMqttDeliveryToken publish(String topic, MqttMessage message, Object user comms.sendNoWait(pubMsg, token); // @TRACE 112=< - log.fine(CLASS_NAME, methodName, "112"); return token; } @@ -1265,7 +1219,6 @@ public IMqttDeliveryToken publish(String topic, MqttMessage message, Object user public void reconnect() throws MqttException { final String methodName = "reconnect"; // @Trace 500=Attempting to reconnect client: {0} - log.fine(CLASS_NAME, methodName, "500", new Object[] { this.clientId }); // Some checks to make sure that we're not attempting to reconnect an // already connected client if (comms.isConnected()) { @@ -1299,22 +1252,18 @@ public void reconnect() throws MqttException { private void attemptReconnect() { final String methodName = "attemptReconnect"; // @Trace 500=Attempting to reconnect client: {0} - log.fine(CLASS_NAME, methodName, "500", new Object[] { this.clientId }); try { connect(this.connOpts, this.userContext, new MqttReconnectActionListener(methodName)); } catch (MqttSecurityException ex) { // @TRACE 804=exception - log.fine(CLASS_NAME, methodName, "804", null, ex); } catch (MqttException ex) { // @TRACE 804=exception - log.fine(CLASS_NAME, methodName, "804", null, ex); } } private void startReconnectCycle() { String methodName = "startReconnectCycle"; // @Trace 503=Start reconnect timer for client: {0}, delay: {1} - log.fine(CLASS_NAME, methodName, "503", new Object[] { this.clientId, Long.valueOf(reconnectDelay) }); reconnectTimer = new Timer("MQTT Reconnect: " + clientId); reconnectTimer.schedule(new ReconnectTask(), reconnectDelay); } @@ -1322,7 +1271,6 @@ private void startReconnectCycle() { private void stopReconnectCycle() { String methodName = "stopReconnectCycle"; // @Trace 504=Stop reconnect timer for client: {0} - log.fine(CLASS_NAME, methodName, "504", new Object[] { this.clientId }); synchronized (clientLock) { if (this.connOpts.isAutomaticReconnect()) { if (reconnectTimer != null) { @@ -1339,7 +1287,6 @@ private class ReconnectTask extends TimerTask { public void run() { // @Trace 506=Triggering Automatic Reconnect attempt. - log.fine(CLASS_NAME, methodName, "506"); attemptReconnect(); } } @@ -1383,14 +1330,12 @@ class MqttReconnectActionListener implements IMqttActionListener { public void onSuccess(IMqttToken asyncActionToken) { // @Trace 501=Automatic Reconnect Successful: {0} - log.fine(CLASS_NAME, methodName, "501", new Object[] { asyncActionToken.getClient().getClientId() }); comms.setRestingState(false); stopReconnectCycle(); } public void onFailure(IMqttToken asyncActionToken, Throwable exception) { // @Trace 502=Automatic Reconnect failed, rescheduling: {0} - log.fine(CLASS_NAME, methodName, "502", new Object[] { asyncActionToken.getClient().getClientId() }); if (reconnectDelay < connOpts.getMaxReconnectDelay()) { reconnectDelay = reconnectDelay * 2; } @@ -1401,8 +1346,6 @@ private void rescheduleReconnectCycle(int delay) { String reschedulemethodName = methodName + ":rescheduleReconnectCycle"; // @Trace 505=Rescheduling reconnect timer for client: {0}, delay: // {1} - log.fine(CLASS_NAME, reschedulemethodName, "505", - new Object[] { MqttAsyncClient.this.clientId, String.valueOf(reconnectDelay) }); synchronized (clientLock) { if (MqttAsyncClient.this.connOpts.isAutomaticReconnect()) { if (reconnectTimer != null) { @@ -1487,10 +1430,8 @@ public void close() throws MqttException { public void close(boolean force) throws MqttException { final String methodName = "close"; // @TRACE 113=< - log.fine(CLASS_NAME, methodName, "113"); comms.close(force); // @TRACE 114=> - log.fine(CLASS_NAME, methodName, "114"); } diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/ScheduledExecutorPingSender.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/ScheduledExecutorPingSender.java index 9c61576..14de120 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/ScheduledExecutorPingSender.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/ScheduledExecutorPingSender.java @@ -19,8 +19,6 @@ import java.util.concurrent.TimeUnit; import org.eclipse.paho.client.mqttv3.internal.ClientComms; -import org.eclipse.paho.client.mqttv3.logging.Logger; -import org.eclipse.paho.client.mqttv3.logging.LoggerFactory; /** * Default ping sender implementation @@ -33,7 +31,6 @@ */ public class ScheduledExecutorPingSender implements MqttPingSender { private static final String CLASS_NAME = ScheduledExecutorPingSender.class.getName(); - private final Logger log = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT, CLASS_NAME); private ClientComms comms; private ScheduledExecutorService executorService; @@ -59,7 +56,6 @@ public void start() { final String methodName = "start"; //@Trace 659=start timer for client:{0} - log.fine(CLASS_NAME, methodName, "659", new Object[]{ clientid }); //Check ping after first keep alive interval. schedule(comms.getKeepAlive()); } @@ -67,7 +63,6 @@ public void start() { public void stop() { final String methodName = "stop"; //@Trace 661=stop - log.fine(CLASS_NAME, methodName, "661", null); if (scheduledFuture != null) { scheduledFuture.cancel(true); } @@ -84,7 +79,6 @@ public void run() { String originalThreadName = Thread.currentThread().getName(); Thread.currentThread().setName("MQTT Ping: " + clientid); //@Trace 660=Check schedule at {0} - log.fine(CLASS_NAME, methodName, "660", new Object[]{ Long.valueOf(System.nanoTime()) }); comms.checkForActivity(); Thread.currentThread().setName(originalThreadName); } diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/TimerPingSender.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/TimerPingSender.java index ea07bf7..af80b6f 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/TimerPingSender.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/TimerPingSender.java @@ -17,8 +17,6 @@ import java.util.TimerTask; import org.eclipse.paho.client.mqttv3.internal.ClientComms; -import org.eclipse.paho.client.mqttv3.logging.Logger; -import org.eclipse.paho.client.mqttv3.logging.LoggerFactory; /** * Default ping sender implementation @@ -31,7 +29,6 @@ */ public class TimerPingSender implements MqttPingSender { private static final String CLASS_NAME = TimerPingSender.class.getName(); - private Logger log = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT,CLASS_NAME); private ClientComms comms; private Timer timer; @@ -43,15 +40,13 @@ public void init(ClientComms comms) { } this.comms = comms; clientid = comms.getClient().getClientId(); - log.setResourceName(clientid); } public void start() { final String methodName = "start"; //@Trace 659=start timer for client:{0} - log.fine(CLASS_NAME, methodName, "659", new Object[]{clientid}); - + timer = new Timer("MQTT Ping: " + clientid); //Check ping after first keep alive interval. timer.schedule(new PingTask(), comms.getKeepAlive()); @@ -60,7 +55,6 @@ public void start() { public void stop() { final String methodName = "stop"; //@Trace 661=stop - log.fine(CLASS_NAME, methodName, "661", null); if(timer != null){ timer.cancel(); } @@ -75,8 +69,7 @@ private class PingTask extends TimerTask { public void run() { //@Trace 660=Check schedule at {0} - log.fine(CLASS_NAME, methodName, "660", new Object[]{Long.valueOf(System.nanoTime())}); - comms.checkForActivity(); + comms.checkForActivity(); } } } diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/ClientComms.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/ClientComms.java index bd1f142..d962775 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/ClientComms.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/ClientComms.java @@ -24,6 +24,7 @@ import java.util.Vector; import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; +import java.util.logging.Logger; import org.eclipse.paho.client.mqttv3.BufferedMessage; import org.eclipse.paho.client.mqttv3.IMqttActionListener; @@ -46,8 +47,6 @@ import org.eclipse.paho.client.mqttv3.internal.wire.MqttDisconnect; import org.eclipse.paho.client.mqttv3.internal.wire.MqttPublish; import org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage; -import org.eclipse.paho.client.mqttv3.logging.Logger; -import org.eclipse.paho.client.mqttv3.logging.LoggerFactory; /** * Handles client communications with the server. Sends and receives MQTT V3 @@ -57,7 +56,6 @@ public class ClientComms { public static String VERSION = "${project.version}"; public static String BUILD_LEVEL = "L${build.level}"; private final String CLASS_NAME = ClientComms.class.getName(); - private final Logger log = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT,CLASS_NAME); private static final byte CONNECTED = 0; private static final byte CONNECTING = 1; @@ -108,7 +106,6 @@ public ClientComms(IMqttAsyncClient client, MqttClientPersistence persistence, M this.clientState = new ClientState(persistence, tokenStore, this.callback, this, pingSender); callback.setClientState(clientState); - log.setResourceName(getClient().getClientId()); } CommsReceiver getReceiver() { @@ -123,7 +120,6 @@ private void shutdownExecutorService() { if (!executorService.awaitTermination(conOptions.getExecutorServiceTimeout(), TimeUnit.SECONDS)) { executorService.shutdownNow(); if (!executorService.awaitTermination(conOptions.getExecutorServiceTimeout(), TimeUnit.SECONDS)) { - log.fine(CLASS_NAME, methodName, "executorService did not terminate"); } } } @@ -142,16 +138,11 @@ private void shutdownExecutorService() { */ void internalSend(MqttWireMessage message, MqttToken token) throws MqttException { final String methodName = "internalSend"; - //@TRACE 200=internalSend key={0} message={1} token={2} - log.fine(CLASS_NAME, methodName, "200", new Object[]{message.getKey(), message, token}); if (token.getClient() == null ) { // Associate the client with the token - also marks it as in use. token.internalTok.setClient(getClient()); } else { - // Token is already in use - cannot reuse - //@TRACE 213=fail: token in use: key={0} message={1} token={2} - log.fine(CLASS_NAME, methodName, "213", new Object[]{message.getKey(), message, token}); throw new MqttException(MqttException.REASON_CODE_TOKEN_INUSE); } @@ -181,8 +172,6 @@ public void sendNoWait(MqttWireMessage message, MqttToken token) throws MqttExce (!isConnected() && message instanceof MqttConnect) || (isDisconnecting() && message instanceof MqttDisconnect)) { if(disconnectedMessageBuffer != null && disconnectedMessageBuffer.getMessageCount() != 0){ - //@TRACE 507=Client Connected, Offline Buffer available, but not empty. Adding message to buffer. message={0} - log.fine(CLASS_NAME, methodName, "507", new Object[] {message.getKey()}); if(disconnectedMessageBuffer.isPersistBuffer()){ this.clientState.persistBufferedMessage(message); } @@ -191,15 +180,12 @@ public void sendNoWait(MqttWireMessage message, MqttToken token) throws MqttExce this.internalSend(message, token); } } else if(disconnectedMessageBuffer != null) { - //@TRACE 508=Offline Buffer available. Adding message to buffer. message={0} - log.fine(CLASS_NAME, methodName, "508", new Object[] {message.getKey()}); if(disconnectedMessageBuffer.isPersistBuffer()){ this.clientState.persistBufferedMessage(message); } disconnectedMessageBuffer.putMessage(message, token); } else { //@TRACE 208=failed: not connected - log.fine(CLASS_NAME, methodName, "208"); throw ExceptionHelper.createMqttException(MqttException.REASON_CODE_CLIENT_NOT_CONNECTED); } } @@ -228,8 +214,6 @@ public void close(boolean force) throws MqttException { if (!isClosed()) { // Must be disconnected before close can take place or if we are being forced if (!isDisconnected() || force) { - //@TRACE 224=failed: not disconnected - log.fine(CLASS_NAME, methodName, "224"); if (isConnecting()) { throw new MqttException(MqttException.REASON_CODE_CONNECT_IN_PROGRESS); @@ -271,8 +255,6 @@ public void connect(MqttConnectOptions options, MqttToken token) throws MqttExce final String methodName = "connect"; synchronized (conLock) { if (isDisconnected() && !closePending) { - //@TRACE 214=state=CONNECTING - log.fine(CLASS_NAME,methodName,"214"); conState = CONNECTING; @@ -296,8 +278,6 @@ public void connect(MqttConnectOptions options, MqttToken token) throws MqttExce conbg.start(); } else { - // @TRACE 207=connect failed: not disconnected {0} - log.fine(CLASS_NAME,methodName,"207", new Object[] {Byte.valueOf(conState)}); if (isClosed() || closePending) { throw new MqttException(MqttException.REASON_CODE_CLIENT_CLOSED); } else if (isConnecting()) { @@ -318,7 +298,6 @@ public void connectComplete( MqttConnack cack, MqttException mex) throws MqttExc if (rc == 0) { // We've successfully connected // @TRACE 215=state=CONNECTED - log.fine(CLASS_NAME,methodName,"215"); conState = CONNECTED; return; @@ -326,7 +305,6 @@ public void connectComplete( MqttConnack cack, MqttException mex) throws MqttExc } // @TRACE 204=connect failed: rc={0} - log.fine(CLASS_NAME,methodName,"204", new Object[]{Integer.valueOf(rc)}); throw mex; } @@ -353,7 +331,6 @@ public void shutdownConnection(MqttToken token, MqttException reason) { stoppingComms = true; //@TRACE 216=state=DISCONNECTING - log.fine(CLASS_NAME,methodName,"216"); wasConnected = (isConnected() || isDisconnecting()); conState = DISCONNECTING; @@ -419,7 +396,6 @@ public void shutdownConnection(MqttToken token, MqttException reason) { // client to be marked as disconnected. synchronized(conLock) { //@TRACE 217=state=DISCONNECTED - log.fine(CLASS_NAME,methodName,"217"); conState = DISCONNECTED; stoppingComms = false; @@ -458,7 +434,6 @@ public void shutdownConnection(MqttToken token, MqttException reason) { private MqttToken handleOldTokens(MqttToken token, MqttException reason) { final String methodName = "handleOldTokens"; //@TRACE 222=> - log.fine(CLASS_NAME,methodName,"222"); MqttToken tokToNotifyLater = null; try { @@ -497,25 +472,20 @@ public void disconnect(MqttDisconnect disconnect, long quiesceTimeout, MqttToken synchronized (conLock){ if (isClosed()) { //@TRACE 223=failed: in closed state - log.fine(CLASS_NAME,methodName,"223"); throw ExceptionHelper.createMqttException(MqttException.REASON_CODE_CLIENT_CLOSED); } else if (isDisconnected()) { //@TRACE 211=failed: already disconnected - log.fine(CLASS_NAME,methodName,"211"); throw ExceptionHelper.createMqttException(MqttException.REASON_CODE_CLIENT_ALREADY_DISCONNECTED); } else if (isDisconnecting()) { //@TRACE 219=failed: already disconnecting - log.fine(CLASS_NAME,methodName,"219"); throw ExceptionHelper.createMqttException(MqttException.REASON_CODE_CLIENT_DISCONNECTING); } else if (Thread.currentThread() == callback.getThread()) { //@TRACE 210=failed: called on callback thread - log.fine(CLASS_NAME,methodName,"210"); // Not allowed to call disconnect() from the callback, as it will deadlock. throw ExceptionHelper.createMqttException(MqttException.REASON_CODE_CLIENT_DISCONNECT_PROHIBITED); } //@TRACE 218=state=DISCONNECTING - log.fine(CLASS_NAME,methodName,"218"); conState = DISCONNECTING; DisconnectBG discbg = new DisconnectBG(disconnect,quiesceTimeout,token, executorService); discbg.start(); @@ -701,7 +671,6 @@ public void run() { final String methodName = "connectBG:run"; MqttException mqttEx = null; //@TRACE 220=> - log.fine(CLASS_NAME, methodName, "220"); try { // Reset an exception on existing delivery tokens. @@ -728,11 +697,9 @@ public void run() { internalSend(conPacket, conToken); } catch (MqttException ex) { //@TRACE 212=connect failed: unexpected exception - log.fine(CLASS_NAME, methodName, "212", null, ex); mqttEx = ex; } catch (Exception ex) { //@TRACE 209=connect failed: unexpected exception - log.fine(CLASS_NAME, methodName, "209", null, ex); mqttEx = ExceptionHelper.createMqttException(ex); } @@ -769,7 +736,6 @@ public void run() { Thread.currentThread().setName(threadName); final String methodName = "disconnectBG:run"; //@TRACE 221=> - log.fine(CLASS_NAME, methodName, "221"); // Allow current inbound and outbound work to complete clientState.quiesce(quiesceTimeout); @@ -825,7 +791,6 @@ public MqttToken checkForActivity(IMqttActionListener pingCallback){ private void handleRunException(Exception ex) { final String methodName = "handleRunException"; //@TRACE 804=exception - log.fine(CLASS_NAME,methodName,"804",null, ex); MqttException mex; if ( !(ex instanceof MqttException)) { mex = new MqttException(MqttException.REASON_CODE_CONNECTION_LOST, ex); @@ -871,7 +836,6 @@ public void notifyConnect() { final String methodName = "notifyConnect"; if(disconnectedMessageBuffer != null){ //@TRACE 509=Client Connected, Offline Buffer Available. Sending Buffered Messages. - log.fine(CLASS_NAME, methodName, "509", null); disconnectedMessageBuffer.setPublishCallback(new ReconnectDisconnectedBufferCallback(methodName)); if (executorService == null) { @@ -899,14 +863,12 @@ public void publishBufferedMessage(BufferedMessage bufferedMessage) throws MqttE } //@TRACE 510=Publishing Buffered message message={0} - log.fine(CLASS_NAME, methodName, "510", new Object[] {bufferedMessage.getMessage().getKey()}); internalSend(bufferedMessage.getMessage(), bufferedMessage.getToken()); // Delete from persistence if in there clientState.unPersistBufferedMessage(bufferedMessage.getMessage()); } else { //@TRACE 208=failed: not connected - log.fine(CLASS_NAME, methodName, "208"); throw ExceptionHelper.createMqttException(MqttException.REASON_CODE_CLIENT_NOT_CONNECTED); } } diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/ClientState.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/ClientState.java index 515c9b3..94a97a9 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/ClientState.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/ClientState.java @@ -53,8 +53,6 @@ import org.eclipse.paho.client.mqttv3.internal.wire.MqttUnsubAck; import org.eclipse.paho.client.mqttv3.internal.wire.MqttUnsubscribe; import org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage; -import org.eclipse.paho.client.mqttv3.logging.Logger; -import org.eclipse.paho.client.mqttv3.logging.LoggerFactory; /** * The core of the client, which holds the state information for pending and @@ -102,7 +100,6 @@ */ public class ClientState { private static final String CLASS_NAME = ClientState.class.getName(); - private Logger log = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT,CLASS_NAME); private static final String PERSISTENCE_SENT_PREFIX = "s-"; private static final String PERSISTENCE_SENT_BUFFERED_PREFIX = "sb-"; private static final String PERSISTENCE_CONFIRMED_PREFIX = "sc-"; @@ -150,8 +147,6 @@ public class ClientState { protected ClientState(MqttClientPersistence persistence, CommsTokenStore tokenStore, CommsCallback callback, ClientComms clientComms, MqttPingSender pingSender) throws MqttException { - log.setResourceName(clientComms.getClient().getClientId()); - log.finer(CLASS_NAME, "", "" ); inUseMsgIds = new Hashtable(); pendingFlows = new Vector(); @@ -220,7 +215,6 @@ private String getSendBufferedPersistenceKey(MqttWireMessage message){ protected void clearState() throws MqttException { final String methodName = "clearState"; //@TRACE 603=clearState - log.fine(CLASS_NAME, methodName,">"); persistence.clear(); inUseMsgIds.clear(); @@ -242,7 +236,6 @@ private MqttWireMessage restoreMessage(String key, MqttPersistable persistable) } catch (MqttException ex) { //@TRACE 602=key={0} exception - log.fine(CLASS_NAME, methodName, "602", new Object[] {key}, ex); if (ex.getCause() instanceof EOFException) { // Premature end-of-file means that the message is corrupted if (key != null) { @@ -254,7 +247,6 @@ private MqttWireMessage restoreMessage(String key, MqttPersistable persistable) } } //@TRACE 601=key={0} message={1} - log.fine(CLASS_NAME, methodName, "601", new Object[]{key,message}); return message; } @@ -335,8 +327,7 @@ protected void restoreState() throws MqttException { int highestMsgId = nextMsgId; Vector orphanedPubRels = new Vector(); //@TRACE 600=> - log.fine(CLASS_NAME, methodName, "600"); - + while (messageKeys.hasMoreElements()) { key = (String) messageKeys.nextElement(); persistable = persistence.get(key); @@ -344,7 +335,6 @@ protected void restoreState() throws MqttException { if (message != null) { if (key.startsWith(PERSISTENCE_RECEIVED_PREFIX)) { //@TRACE 604=inbound QoS 2 publish key={0} message={1} - log.fine(CLASS_NAME,methodName,"604", new Object[]{key,message}); // The inbound messages that we have persisted will be QoS 2 inboundQoS2.put( Integer.valueOf(message.getMessageId()),message); @@ -360,12 +350,10 @@ protected void restoreState() throws MqttException { if (confirmMessage != null) { // confirmMessage.setDuplicate(true); // REMOVED //@TRACE 605=outbound QoS 2 pubrel key={0} message={1} - log.fine(CLASS_NAME,methodName, "605", new Object[]{key,message}); outboundQoS2.put( Integer.valueOf(confirmMessage.getMessageId()), confirmMessage); } else { //@TRACE 606=outbound QoS 2 completed key={0} message={1} - log.fine(CLASS_NAME,methodName, "606", new Object[]{key,message}); } } else { // QoS 1 or 2, with no CONFIRM sent... @@ -373,12 +361,10 @@ protected void restoreState() throws MqttException { sendMessage.setDuplicate(true); if (sendMessage.getMessage().getQos() == 2) { //@TRACE 607=outbound QoS 2 publish key={0} message={1} - log.fine(CLASS_NAME,methodName, "607", new Object[]{key,message}); - + outboundQoS2.put( Integer.valueOf(sendMessage.getMessageId()),sendMessage); } else { //@TRACE 608=outbound QoS 1 publish key={0} message={1} - log.fine(CLASS_NAME,methodName, "608", new Object[]{key,message}); outboundQoS1.put( Integer.valueOf(sendMessage.getMessageId()),sendMessage); } @@ -393,17 +379,14 @@ protected void restoreState() throws MqttException { highestMsgId = Math.max(sendMessage.getMessageId(), highestMsgId); if(sendMessage.getMessage().getQos() == 2){ //@TRACE 607=outbound QoS 2 publish key={0} message={1} - log.fine(CLASS_NAME,methodName, "607", new Object[]{key,message}); outboundQoS2.put( Integer.valueOf(sendMessage.getMessageId()),sendMessage); } else if(sendMessage.getMessage().getQos() == 1){ //@TRACE 608=outbound QoS 1 publish key={0} message={1} - log.fine(CLASS_NAME,methodName, "608", new Object[]{key,message}); outboundQoS1.put( Integer.valueOf(sendMessage.getMessageId()),sendMessage); } else { //@TRACE 511=outbound QoS 0 publish key={0} message={1} - log.fine(CLASS_NAME,methodName, "511", new Object[]{key,message}); outboundQoS0.put( Integer.valueOf(sendMessage.getMessageId()), sendMessage); // Because there is no Puback, we have to trust that this is enough to send the message persistence.remove(key); @@ -428,7 +411,6 @@ protected void restoreState() throws MqttException { while(messageKeys.hasMoreElements()) { key = (String) messageKeys.nextElement(); //@TRACE 609=removing orphaned pubrel key={0} - log.fine(CLASS_NAME,methodName, "609", new Object[]{key}); persistence.remove(key); } @@ -447,13 +429,11 @@ private void restoreInflightMessages() { MqttWireMessage msg = (MqttWireMessage) outboundQoS2.get(key); if (msg instanceof MqttPublish) { //@TRACE 610=QoS 2 publish key={0} - log.fine(CLASS_NAME,methodName, "610", new Object[]{key}); // set DUP flag only for PUBLISH, but NOT for PUBREL (spec 3.1.1) msg.setDuplicate(true); insertInOrder(pendingMessages, (MqttPublish)msg); } else if (msg instanceof MqttPubRel) { //@TRACE 611=QoS 2 pubrel key={0} - log.fine(CLASS_NAME,methodName, "611", new Object[]{key}); insertInOrder(pendingFlows, (MqttPubRel)msg); } @@ -464,7 +444,6 @@ private void restoreInflightMessages() { MqttPublish msg = (MqttPublish)outboundQoS1.get(key); msg.setDuplicate(true); //@TRACE 612=QoS 1 publish key={0} - log.fine(CLASS_NAME,methodName, "612", new Object[]{key}); insertInOrder(pendingMessages, msg); } @@ -473,7 +452,6 @@ private void restoreInflightMessages() { Object key = keys.nextElement(); MqttPublish msg = (MqttPublish)outboundQoS0.get(key); //@TRACE 512=QoS 0 publish key={0} - log.fine(CLASS_NAME,methodName, "512", new Object[]{key}); insertInOrder(pendingMessages, msg); } @@ -519,14 +497,12 @@ public void send(MqttWireMessage message, MqttToken token) throws MqttException synchronized (queueLock) { if (actualInFlight >= this.maxInflight) { //@TRACE 613= sending {0} msgs at max inflight window - log.fine(CLASS_NAME, methodName, "613", new Object[]{ Integer.valueOf(actualInFlight)}); throw new MqttException(MqttException.REASON_CODE_MAX_INFLIGHT); } MqttMessage innerMessage = ((MqttPublish) message).getMessage(); //@TRACE 628=pending publish key={0} qos={1} message={2} - log.fine(CLASS_NAME,methodName,"628", new Object[]{ Integer.valueOf(message.getMessageId()), Integer.valueOf(innerMessage.getQos()), message}); switch(innerMessage.getQos()) { case 2: @@ -545,8 +521,7 @@ public void send(MqttWireMessage message, MqttToken token) throws MqttException } } else { //@TRACE 615=pending send key={0} message {1} - log.fine(CLASS_NAME,methodName,"615", new Object[]{ Integer.valueOf(message.getMessageId()), message}); - + if (message instanceof MqttConnect) { synchronized (queueLock) { // Add the connect action at the head of the pending queue ensuring it jumps @@ -595,16 +570,13 @@ public void persistBufferedMessage(MqttWireMessage message) { persistence.put(key, (MqttPublish) message); } catch (MqttPersistenceException mpe){ //@TRACE 515=Could not Persist, attempting to Re-Open Persistence Store - log.fine(CLASS_NAME,methodName, "515"); persistence.open(this.clientComms.getClient().getClientId(), this.clientComms.getClient().getServerURI()); persistence.put(key, (MqttPublish) message); } //@TRACE 513=Persisted Buffered Message key={0} - log.fine(CLASS_NAME,methodName, "513", new Object[]{key}); } catch (MqttException ex){ //@TRACE 514=Failed to persist buffered message key={0} - log.warning(CLASS_NAME,methodName, "513", new Object[]{key}); - } + } } /** @@ -614,11 +586,9 @@ public void unPersistBufferedMessage(MqttWireMessage message){ final String methodName = "unPersistBufferedMessage"; try{ //@TRACE 517=Un-Persisting Buffered message key={0} - log.fine(CLASS_NAME,methodName, "517", new Object[]{message.getKey()}); persistence.remove(getSendBufferedPersistenceKey(message)); } catch (MqttPersistenceException mpe){ //@TRACE 518=Failed to Un-Persist Buffered message key={0} - log.fine(CLASS_NAME,methodName, "518", new Object[]{message.getKey()}); } } @@ -632,8 +602,7 @@ protected void undo(MqttPublish message) throws MqttPersistenceException { final String methodName = "undo"; synchronized (queueLock) { //@TRACE 618=key={0} QoS={1} - log.fine(CLASS_NAME,methodName,"618", new Object[]{ Integer.valueOf(message.getMessageId()), Integer.valueOf(message.getMessage().getQos())}); - + if (message.getMessage().getQos() == 1) { outboundQoS1.remove( Integer.valueOf(message.getMessageId())); } else { @@ -704,8 +673,7 @@ protected boolean removeMessage(IMqttDeliveryToken token) throws MqttException { public MqttToken checkForActivity(IMqttActionListener pingCallback) throws MqttException { final String methodName = "checkForActivity"; //@TRACE 616=checkForActivity entered - log.fine(CLASS_NAME,methodName,"616", new Object[]{}); - + synchronized (quiesceLock) { // ref bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=440698 // No ping while quiescing @@ -734,7 +702,6 @@ public MqttToken checkForActivity(IMqttActionListener pingCallback) throws MqttE // TODO - Remove Delta, maybe? // A ping is outstanding but no packet has been received in KA so connection is deemed broken //@TRACE 619=Timed out as no activity, keepAlive={0} lastOutboundActivity={1} lastInboundActivity={2} time={3} lastPing={4} - log.severe(CLASS_NAME,methodName,"619", new Object[]{ Long.valueOf(this.keepAlive), Long.valueOf(lastOutboundActivity), Long.valueOf(lastInboundActivity), Long.valueOf(time), Long.valueOf(lastPing)}); // A ping has already been sent. At this point, assume that the // broker has hung and the TCP layer hasn't noticed. @@ -745,7 +712,6 @@ public MqttToken checkForActivity(IMqttActionListener pingCallback) throws MqttE if (pingOutstanding == 0 && (time - lastOutboundActivity >= 2*keepAlive)) { // I am probably blocked on a write operations as I should have been able to write at least a ping message - log.severe(CLASS_NAME,methodName,"642", new Object[]{ Long.valueOf(this.keepAlive), Long.valueOf(lastOutboundActivity), Long.valueOf(lastInboundActivity), Long.valueOf(time), Long.valueOf(lastPing)}); // A ping has not been sent but I am not progressing on the current write operation. // At this point, assume that the broker has hung and the TCP layer hasn't noticed. @@ -765,7 +731,6 @@ public MqttToken checkForActivity(IMqttActionListener pingCallback) throws MqttE (time - lastOutboundActivity >= keepAlive - delta)) { //@TRACE 620=ping needed. keepAlive={0} lastOutboundActivity={1} lastInboundActivity={2} - log.fine(CLASS_NAME,methodName,"620", new Object[]{ Long.valueOf(this.keepAlive), Long.valueOf(lastOutboundActivity), Long.valueOf(lastInboundActivity)}); // pingOutstanding++; // it will be set after the ping has been written on the wire // lastPing = time; // it will be set after the ping has been written on the wire @@ -783,12 +748,10 @@ public MqttToken checkForActivity(IMqttActionListener pingCallback) throws MqttE } else { //@TRACE 634=ping not needed yet. Schedule next ping. - log.fine(CLASS_NAME, methodName, "634", null); nextPingTime = Math.max(1, getKeepAlive() - (time - lastOutboundActivity)); } } //@TRACE 624=Schedule next ping at {0} - log.fine(CLASS_NAME, methodName,"624", new Object[]{Long.valueOf(nextPingTime)}); pingSender.schedule(nextPingTime); } @@ -820,12 +783,10 @@ protected MqttWireMessage get() throws MqttException { (pendingFlows.isEmpty() && actualInFlight >= this.maxInflight)) { try { //@TRACE 644=wait for new work or for space in the inflight window - log.fine(CLASS_NAME,methodName, "644"); - + queueLock.wait(); //@TRACE 647=new work or ping arrived - log.fine(CLASS_NAME,methodName, "647"); } catch (InterruptedException e) { } } @@ -836,8 +797,7 @@ protected MqttWireMessage get() throws MqttException { if (pendingFlows == null || (!connected && (pendingFlows.isEmpty() || !((MqttWireMessage)pendingFlows.elementAt(0) instanceof MqttConnect)))) { //@TRACE 621=no outstanding flows and not connected - log.fine(CLASS_NAME,methodName,"621"); - + return null; } @@ -855,7 +815,6 @@ protected MqttWireMessage get() throws MqttException { inFlightPubRels++; //@TRACE 617=+1 inflightpubrels={0} - log.fine(CLASS_NAME,methodName,"617", new Object[]{ Integer.valueOf(inFlightPubRels)}); } checkQuiesceLock(); @@ -871,10 +830,8 @@ protected MqttWireMessage get() throws MqttException { actualInFlight++; //@TRACE 623=+1 actualInFlight={0} - log.fine(CLASS_NAME,methodName,"623",new Object[]{ Integer.valueOf(actualInFlight)}); } else { //@TRACE 622=inflight window full - log.fine(CLASS_NAME,methodName,"622"); } } } @@ -892,8 +849,6 @@ public void notifySentBytes(int sentBytesCount) { this.lastOutboundActivity = System.nanoTime(); } // @TRACE 643=sent bytes count={0} - log.fine(CLASS_NAME, methodName, "643", new Object[] { - Integer.valueOf(sentBytesCount) }); } @@ -906,8 +861,7 @@ protected void notifySent(MqttWireMessage message) { this.lastOutboundActivity = System.nanoTime(); //@TRACE 625=key={0} - log.fine(CLASS_NAME,methodName,"625",new Object[]{message.getKey()}); - + MqttToken token = message.getToken(); if (token == null) { token = tokenStore.getToken(message); @@ -922,7 +876,6 @@ protected void notifySent(MqttWireMessage message) { pingOutstanding++; } //@TRACE 635=ping sent. pingOutstanding: {0} - log.fine(CLASS_NAME,methodName,"635",new Object[]{ Integer.valueOf(pingOutstanding)}); } } else if (message instanceof MqttPublish) { @@ -944,8 +897,7 @@ private void decrementInFlight() { synchronized (queueLock) { actualInFlight--; //@TRACE 646=-1 actualInFlight={0} - log.fine(CLASS_NAME,methodName,"646",new Object[]{ Integer.valueOf(actualInFlight)}); - + if (!checkQuiesceLock()) { queueLock.notifyAll(); } @@ -958,7 +910,6 @@ protected boolean checkQuiesceLock() { int tokC = tokenStore.count(); if (quiescing && tokC == 0 && pendingFlows.size() == 0 && callback.isQuiesced()) { //@TRACE 626=quiescing={0} actualInFlight={1} pendingFlows={2} inFlightPubRels={3} callbackQuiesce={4} tokens={5} - log.fine(CLASS_NAME,methodName,"626",new Object[]{ Boolean.valueOf(quiescing), Integer.valueOf(actualInFlight), Integer.valueOf(pendingFlows.size()), Integer.valueOf(inFlightPubRels), Boolean.valueOf(callback.isQuiesced()), Integer.valueOf(tokC)}); synchronized (quiesceLock) { quiesceLock.notifyAll(); } @@ -973,8 +924,6 @@ public void notifyReceivedBytes(int receivedBytesCount) { this.lastInboundActivity = System.nanoTime(); } // @TRACE 630=received bytes count={0} - log.fine(CLASS_NAME, methodName, "630", new Object[] { - Integer.valueOf(receivedBytesCount) }); } /** @@ -988,16 +937,12 @@ protected void notifyReceivedAck(MqttAck ack) throws MqttException { this.lastInboundActivity = System.nanoTime(); // @TRACE 627=received key={0} message={1} - log.fine(CLASS_NAME, methodName, "627", new Object[] { - Integer.valueOf(ack.getMessageId()), ack }); MqttToken token = tokenStore.getToken(ack); MqttException mex = null; if (token == null) { // @TRACE 662=no message found for ack id={0} - log.fine(CLASS_NAME, methodName, "662", new Object[] { - Integer.valueOf(ack.getMessageId())}); } else if (ack instanceof MqttPubRec) { // Complete the QoS 2 flow. Unlike all other // flows, QoS is a 2 phase flow. The second phase sends a @@ -1020,7 +965,6 @@ protected void notifyReceivedAck(MqttAck ack) throws MqttException { } } //@TRACE 636=ping response received. pingOutstanding: {0} - log.fine(CLASS_NAME,methodName,"636",new Object[]{ Integer.valueOf(pingOutstanding)}); } else if (ack instanceof MqttConnack) { int rc = ((MqttConnack) ack).getReturnCode(); if (rc == 0) { @@ -1070,9 +1014,7 @@ protected void notifyReceivedMsg(MqttWireMessage message) throws MqttException { this.lastInboundActivity = System.nanoTime(); // @TRACE 651=received key={0} message={1} - log.fine(CLASS_NAME, methodName, "651", new Object[] { - Integer.valueOf(message.getMessageId()), message }); - + if (!quiescing) { if (message instanceof MqttPublish) { MqttPublish send = (MqttPublish) message; @@ -1129,8 +1071,6 @@ protected void notifyComplete(MqttToken token) throws MqttException { if (message != null && message instanceof MqttAck) { // @TRACE 629=received key={0} token={1} message={2} - log.fine(CLASS_NAME, methodName, "629", new Object[] { - Integer.valueOf(message.getMessageId()), token, message }); MqttAck ack = (MqttAck) message; @@ -1144,8 +1084,6 @@ protected void notifyComplete(MqttToken token) throws MqttException { releaseMessageId(message.getMessageId()); tokenStore.removeToken(message); // @TRACE 650=removed Qos 1 publish. key={0} - log.fine(CLASS_NAME, methodName, "650", - new Object[] { Integer.valueOf(ack.getMessageId()) }); } else if (ack instanceof MqttPubComp) { // QoS 2 - user notified now remove from persistence... persistence.remove(getSendPersistenceKey(message)); @@ -1159,9 +1097,6 @@ protected void notifyComplete(MqttToken token) throws MqttException { tokenStore.removeToken(message); // @TRACE 645=removed QoS 2 publish/pubrel. key={0}, -1 inFlightPubRels={1} - log.fine(CLASS_NAME, methodName, "645", new Object[] { - Integer.valueOf(ack.getMessageId()), - Integer.valueOf(inFlightPubRels) }); } checkQuiesceLock(); @@ -1177,14 +1112,12 @@ protected void notifyResult(MqttWireMessage ack, MqttToken token, MqttException // Let the user know an async operation has completed and then remove the token if (ack != null && ack instanceof MqttAck && !(ack instanceof MqttPubRec)) { //@TRACE 648=key{0}, msg={1}, excep={2} - log.fine(CLASS_NAME,methodName, "648", new Object [] {token.internalTok.getKey(), ack, ex}); callback.asyncOperationComplete(token); } // There are cases where there is no ack as the operation failed before // an ack was received if (ack == null ) { //@TRACE 649=key={0},excep={1} - log.fine(CLASS_NAME,methodName, "649", new Object [] { token.internalTok.getKey(), ex}); callback.asyncOperationComplete(token); } } @@ -1195,7 +1128,6 @@ protected void notifyResult(MqttWireMessage ack, MqttToken token, MqttException public void connected() { final String methodName = "connected"; //@TRACE 631=connected - log.fine(CLASS_NAME, methodName, "631"); this.connected = true; pingSender.start(); //Start ping thread when client connected to server. @@ -1213,8 +1145,7 @@ public void connected() { public Vector resolveOldTokens(MqttException reason) { final String methodName = "resolveOldTokens"; //@TRACE 632=reason {0} - log.fine(CLASS_NAME,methodName,"632", new Object[] {reason}); - + // If any outstanding let the user know the reason why it is still // outstanding by putting the reason shutdown is occurring into the // token. @@ -1252,7 +1183,6 @@ public Vector resolveOldTokens(MqttException reason) { public void disconnected(MqttException reason) { final String methodName = "disconnected"; //@TRACE 633=disconnected - log.fine(CLASS_NAME,methodName,"633", new Object[] {reason}); this.connected = false; @@ -1322,7 +1252,6 @@ public void quiesce(long timeout) { // If the timeout is greater than zero t if (timeout > 0 ) { //@TRACE 637=timeout={0} - log.fine(CLASS_NAME,methodName, "637",new Object[]{ Long.valueOf(timeout)}); synchronized (queueLock) { this.quiescing = true; } @@ -1338,7 +1267,6 @@ public void quiesce(long timeout) { int tokc = tokenStore.count(); if (tokc > 0 || pendingFlows.size() >0 || !callback.isQuiesced()) { //@TRACE 639=wait for outstanding: actualInFlight={0} pendingFlows={1} inFlightPubRels={2} tokens={3} - log.fine(CLASS_NAME, methodName,"639", new Object[]{ Integer.valueOf(actualInFlight), Integer.valueOf(pendingFlows.size()), Integer.valueOf(inFlightPubRels), Integer.valueOf(tokc)}); // wait for outstanding in flight messages to complete and // any pending flows to complete @@ -1359,7 +1287,6 @@ public void quiesce(long timeout) { actualInFlight = 0; } //@TRACE 640=finished - log.fine(CLASS_NAME, methodName, "640"); } } @@ -1367,7 +1294,6 @@ public void notifyQueueLock() { final String methodName = "notifyQueueLock"; synchronized (queueLock) { //@TRACE 638=notifying queueLock holders - log.fine(CLASS_NAME,methodName,"638"); queueLock.notifyAll(); } } @@ -1376,8 +1302,7 @@ protected void deliveryComplete(MqttPublish message) throws MqttPersistenceExcep final String methodName = "deliveryComplete"; //@TRACE 641=remove publish from persistence. key={0} - log.fine(CLASS_NAME,methodName,"641", new Object[]{ Integer.valueOf(message.getMessageId())}); - + persistence.remove(getReceivedPersistenceKey(message)); inboundQoS2.remove( Integer.valueOf(message.getMessageId())); } @@ -1386,8 +1311,7 @@ protected void deliveryComplete(int messageId) throws MqttPersistenceException { final String methodName = "deliveryComplete"; //@TRACE 641=remove publish from persistence. key={0} - log.fine(CLASS_NAME,methodName,"641", new Object[]{ Integer.valueOf(messageId)}); - + persistence.remove(getReceivedPersistenceKey(messageId)); inboundQoS2.remove( Integer.valueOf(messageId)); } diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsCallback.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsCallback.java index fd9a3bb..c41339a 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsCallback.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsCallback.java @@ -37,8 +37,6 @@ import org.eclipse.paho.client.mqttv3.internal.wire.MqttPubComp; import org.eclipse.paho.client.mqttv3.internal.wire.MqttPublish; import org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage; -import org.eclipse.paho.client.mqttv3.logging.Logger; -import org.eclipse.paho.client.mqttv3.logging.LoggerFactory; /** * Bridge between Receiver and the external API. This class gets called by @@ -47,7 +45,6 @@ */ public class CommsCallback implements Runnable { private static final String CLASS_NAME = CommsCallback.class.getName(); - private final Logger log = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT, CLASS_NAME); private static final int INBOUND_QUEUE_SIZE = 10; private MqttCallback mqttCallback; @@ -76,7 +73,6 @@ private enum State {STOPPED, RUNNING, QUIESCING} this.messageQueue = new Vector(INBOUND_QUEUE_SIZE); this.completeQueue = new Vector(INBOUND_QUEUE_SIZE); this.callbacks = new Hashtable(); - log.setResourceName(clientComms.getClient().getClientId()); } public void setClientState(ClientState clientState) { @@ -126,7 +122,6 @@ public void stop() { } if (isRunning()) { // @TRACE 700=stopping - log.fine(CLASS_NAME, methodName, "700"); synchronized (lifecycle) { target_state = State.STOPPED; } @@ -134,7 +129,6 @@ public void stop() { synchronized (workAvailable) { // @TRACE 701=notify workAvailable and wait for run // to finish - log.fine(CLASS_NAME, methodName, "701"); workAvailable.notifyAll(); } // Wait for the thread to finish. @@ -144,7 +138,6 @@ public void stop() { } } // @TRACE 703=stopped - log.fine(CLASS_NAME, methodName, "703"); } } @@ -177,7 +170,6 @@ public void run() { if (isRunning() && messageQueue.isEmpty() && completeQueue.isEmpty()) { // @TRACE 704=wait for workAvailable - log.fine(CLASS_NAME, methodName, "704"); workAvailable.wait(); } } @@ -223,7 +215,6 @@ public void run() { // Users code could throw an Error or Exception e.g. in the case // of class NoClassDefFoundError // @TRACE 714=callback threw exception - log.fine(CLASS_NAME, methodName, "714", null, ex); clientComms.shutdownConnection(null, new MqttException(ex)); } finally { @@ -233,7 +224,6 @@ public void run() { // some space on the queue... // @TRACE 706=notify spaceAvailable - log.fine(CLASS_NAME, methodName, "706"); spaceAvailable.notifyAll(); } } @@ -249,7 +239,6 @@ private void handleActionComplete(MqttToken token) final String methodName = "handleActionComplete"; synchronized (token) { // @TRACE 705=callback and notify for key={0} - log.fine(CLASS_NAME, methodName, "705", new Object[] { token.internalTok.getKey() }); if (token.isComplete()) { // Finish by doing any post processing such as delete // from persistent store but only do so if the action @@ -300,7 +289,6 @@ public void connectionLost(MqttException cause) { try { if (mqttCallback != null && cause != null) { // @TRACE 708=call connectionLost - log.fine(CLASS_NAME, methodName, "708", new Object[] { cause }); mqttCallback.connectionLost(cause); } if(reconnectInternalCallback != null && cause != null){ @@ -310,7 +298,6 @@ public void connectionLost(MqttException cause) { // Just log the fact that a throwable has caught connection lost // is called during shutdown processing so no need to do anything else // @TRACE 720=exception from connectionLost {0} - log.fine(CLASS_NAME, methodName, "720", new Object[] { t }); } } @@ -328,13 +315,9 @@ public void fireActionEvent(MqttToken token) { if (asyncCB != null) { if (token.getException() == null) { // @TRACE 716=call onSuccess key={0} - log.fine(CLASS_NAME, methodName, "716", - new Object[] { token.internalTok.getKey() }); asyncCB.onSuccess(token); } else { // @TRACE 717=call onFailure key {0} - log.fine(CLASS_NAME, methodName, "716", - new Object[] { token.internalTok.getKey() }); asyncCB.onFailure(token, token.getException()); } } @@ -360,7 +343,6 @@ public void messageArrived(MqttPublish sendMessage) { while (isRunning() && !isQuiescing() && messageQueue.size() >= INBOUND_QUEUE_SIZE) { try { // @TRACE 709=wait for spaceAvailable - log.fine(CLASS_NAME, methodName, "709"); spaceAvailable.wait(200); } catch (InterruptedException ex) { } @@ -371,7 +353,6 @@ public void messageArrived(MqttPublish sendMessage) { // Notify the CommsCallback thread that there's work to do... synchronized (workAvailable) { // @TRACE 710=new msg avail, notify workAvailable - log.fine(CLASS_NAME, methodName, "710"); workAvailable.notifyAll(); } } @@ -391,7 +372,6 @@ public void quiesce() { } synchronized (spaceAvailable) { // @TRACE 711=quiesce notify spaceAvailable - log.fine(CLASS_NAME, methodName, "711"); // Unblock anything waiting for space... spaceAvailable.notifyAll(); } @@ -412,8 +392,6 @@ private void handleMessage(MqttPublish publishMessage) String destName = publishMessage.getTopicName(); // @TRACE 713=call messageArrived key={0} topic={1} - log.fine(CLASS_NAME, methodName, "713", new Object[] { - Integer.valueOf(publishMessage.getMessageId()), destName }); deliverMessage(destName, publishMessage.getMessageId(), publishMessage.getMessage()); @@ -451,7 +429,6 @@ public void asyncOperationComplete(MqttToken token) { completeQueue.addElement(token); synchronized (workAvailable) { // @TRACE 715=new workAvailable. key={0} - log.fine(CLASS_NAME, methodName, "715", new Object[] { token.internalTok.getKey() }); workAvailable.notifyAll(); } } else { @@ -462,8 +439,7 @@ public void asyncOperationComplete(MqttToken token) { // Users code could throw an Error or Exception e.g. in the case // of class NoClassDefFoundError // @TRACE 719=callback threw ex: - log.fine(CLASS_NAME, methodName, "719", null, ex); - + // Shutdown likely already in progress but no harm to confirm clientComms.shutdownConnection(null, new MqttException(ex)); } diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsReceiver.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsReceiver.java index 2b3c0ed..74ec913 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsReceiver.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsReceiver.java @@ -28,15 +28,12 @@ import org.eclipse.paho.client.mqttv3.internal.wire.MqttPubComp; import org.eclipse.paho.client.mqttv3.internal.wire.MqttPubRec; import org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage; -import org.eclipse.paho.client.mqttv3.logging.Logger; -import org.eclipse.paho.client.mqttv3.logging.LoggerFactory; /** * Receives MQTT packets from the server. */ public class CommsReceiver implements Runnable { private static final String CLASS_NAME = CommsReceiver.class.getName(); - private Logger log = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT, CLASS_NAME); private enum State {STOPPED, RUNNING, STARTING, RECEIVING} @@ -57,7 +54,6 @@ public CommsReceiver(ClientComms clientComms, ClientState clientState,CommsToken this.clientComms = clientComms; this.clientState = clientState; this.tokenStore = tokenStore; - log.setResourceName(clientComms.getClient().getClientId()); } /** @@ -69,7 +65,6 @@ public void start(String threadName, ExecutorService executorService) { this.threadName = threadName; final String methodName = "start"; //@TRACE 855=starting - log.fine(CLASS_NAME,methodName, "855"); synchronized (lifecycle) { if (current_state == State.STOPPED && target_state == State.STOPPED) { target_state = State.RUNNING; @@ -95,7 +90,6 @@ public void stop() { receiverFuture.cancel(true); } //@TRACE 850=stopping - log.fine(CLASS_NAME,methodName, "850"); if (isRunning()) { target_state = State.STOPPED; } @@ -104,7 +98,6 @@ public void stop() { try { Thread.sleep(100); } catch (Exception e) { } } //@TRACE 851=stopped - log.fine(CLASS_NAME,methodName,"851"); } /** @@ -128,7 +121,6 @@ public void run() { while (my_target == State.RUNNING && (in != null)) { try { //@TRACE 852=network read message - log.fine(CLASS_NAME,methodName,"852"); if (in.available() > 0) { synchronized (lifecycle) { current_state = State.RECEIVING; @@ -155,7 +147,6 @@ public void run() { //This probably means we already received this message and it's being send again //because of timeouts, crashes, disconnects, restarts etc. //It should be safe to ignore these unexpected messages. - log.fine(CLASS_NAME, methodName, "857"); } else { // It its an ack and there is no token then something is not right. // An ack should always have a token assoicated with it. @@ -170,7 +161,6 @@ public void run() { } catch (MqttException ex) { //@TRACE 856=Stopping, MQttException - log.fine(CLASS_NAME,methodName,"856",null,ex); synchronized (lifecycle) { target_state = State.STOPPED; } @@ -179,7 +169,6 @@ public void run() { } catch (IOException ioe) { //@TRACE 853=Stopping due to IOException - log.fine(CLASS_NAME,methodName,"853"); synchronized (lifecycle) { target_state = State.STOPPED; } @@ -207,7 +196,6 @@ public void run() { recThread = null; //@TRACE 854=< - log.fine(CLASS_NAME,methodName,"854"); } public boolean isRunning() { diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsSender.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsSender.java index 57d860b..18f3506 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsSender.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsSender.java @@ -19,6 +19,7 @@ import java.io.OutputStream; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; +import java.util.logging.Logger; import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.MqttToken; @@ -26,13 +27,10 @@ import org.eclipse.paho.client.mqttv3.internal.wire.MqttDisconnect; import org.eclipse.paho.client.mqttv3.internal.wire.MqttOutputStream; import org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage; -import org.eclipse.paho.client.mqttv3.logging.Logger; -import org.eclipse.paho.client.mqttv3.logging.LoggerFactory; public class CommsSender implements Runnable { private static final String CLASS_NAME = CommsSender.class.getName(); - private Logger log = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT, CLASS_NAME); //Sends MQTT packets to the server on its own thread private enum State {STOPPED, RUNNING, STARTING} @@ -55,7 +53,6 @@ public CommsSender(ClientComms clientComms, ClientState clientState, CommsTokenS this.clientComms = clientComms; this.clientState = clientState; this.tokenStore = tokenStore; - log.setResourceName(clientComms.getClient().getClientId()); } /** @@ -95,7 +92,6 @@ public void stop() { senderFuture.cancel(true); } //@TRACE 800=stopping sender - log.fine(CLASS_NAME,methodName,"800"); if (isRunning()) { target_state = State.STOPPED; clientState.notifyQueueLock(); @@ -106,7 +102,6 @@ public void stop() { clientState.notifyQueueLock(); } //@TRACE 801=stopped - log.fine(CLASS_NAME,methodName,"801"); } public void run() { @@ -129,7 +124,6 @@ public void run() { message = clientState.get(); if (message != null) { //@TRACE 802=network send key={0} msg={1} - log.fine(CLASS_NAME,methodName,"802", new Object[] {message.getKey(),message}); if (message instanceof MqttAck) { out.write(message); @@ -160,7 +154,6 @@ public void run() { } } else { // null message //@TRACE 803=get message returned null, stopping} - log.fine(CLASS_NAME,methodName,"803"); synchronized (lifecycle) { target_state = State.STOPPED; } @@ -182,13 +175,11 @@ public void run() { } //@TRACE 805=< - log.fine(CLASS_NAME, methodName,"805"); } private void handleRunException(MqttWireMessage message, Exception ex) { final String methodName = "handleRunException"; //@TRACE 804=exception - log.fine(CLASS_NAME,methodName,"804",null, ex); MqttException mex; if ( !(ex instanceof MqttException)) { mex = new MqttException(MqttException.REASON_CODE_CONNECTION_LOST, ex); diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsTokenStore.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsTokenStore.java index 3f60c7a..52b4287 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsTokenStore.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsTokenStore.java @@ -24,8 +24,6 @@ import org.eclipse.paho.client.mqttv3.MqttToken; import org.eclipse.paho.client.mqttv3.internal.wire.MqttPublish; import org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage; -import org.eclipse.paho.client.mqttv3.logging.Logger; -import org.eclipse.paho.client.mqttv3.logging.LoggerFactory; /** @@ -45,7 +43,6 @@ */ public class CommsTokenStore { private static final String CLASS_NAME = CommsTokenStore.class.getName(); - private Logger log = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT, CLASS_NAME); // Maps message-specific data (usually message IDs) to tokens private final Hashtable tokens; @@ -55,11 +52,9 @@ public class CommsTokenStore { public CommsTokenStore(String logContext) { final String methodName = ""; - log.setResourceName(logContext); this.tokens = new Hashtable(); this.logContext = logContext; //@TRACE 308=<> - log.fine(CLASS_NAME,methodName,"308");//,new Object[]{message}); } @@ -89,8 +84,7 @@ public MqttToken removeToken(MqttWireMessage message) { public MqttToken removeToken(String key) { final String methodName = "removeToken"; //@TRACE 306=key={0} - log.fine(CLASS_NAME,methodName,"306",new Object[]{key}); - + if ( null != key ){ return (MqttToken) tokens.remove(key); } @@ -113,13 +107,11 @@ protected MqttDeliveryToken restoreToken(MqttPublish message) { if (this.tokens.containsKey(key)) { token = (MqttDeliveryToken)this.tokens.get(key); //@TRACE 302=existing key={0} message={1} token={2} - log.fine(CLASS_NAME,methodName, "302",new Object[]{key, message,token}); } else { token = new MqttDeliveryToken(logContext); token.internalTok.setKey(key); this.tokens.put(key, token); //@TRACE 303=creating new token key={0} message={1} token={2} - log.fine(CLASS_NAME,methodName,"303",new Object[]{key, message, token}); } } return token; @@ -134,8 +126,7 @@ protected void saveToken(MqttToken token, MqttWireMessage message) throws MqttEx if (closedResponse == null) { String key = message.getKey(); //@TRACE 300=key={0} message={1} - log.fine(CLASS_NAME,methodName,"300",new Object[]{key, message}); - + saveToken(token,key); } else { throw closedResponse; @@ -148,7 +139,6 @@ protected void saveToken(MqttToken token, String key) { synchronized(tokens) { //@TRACE 307=key={0} token={1} - log.fine(CLASS_NAME,methodName,"307",new Object[]{key,token.toString()}); token.internalTok.setKey(key); this.tokens.put(key, token); } @@ -159,7 +149,6 @@ protected void quiesce(MqttException quiesceResponse) { synchronized(tokens) { //@TRACE 309=resp={0} - log.fine(CLASS_NAME,methodName,"309",new Object[]{quiesceResponse}); closedResponse = quiesceResponse; } @@ -170,7 +159,6 @@ public void open() { synchronized(tokens) { //@TRACE 310=> - log.fine(CLASS_NAME,methodName,"310"); closedResponse = null; } @@ -181,7 +169,6 @@ public MqttDeliveryToken[] getOutstandingDelTokens() { synchronized(tokens) { //@TRACE 311=> - log.fine(CLASS_NAME,methodName,"311"); Vector list = new Vector(); Enumeration enumeration = tokens.elements(); @@ -206,7 +193,6 @@ public Vector getOutstandingTokens() { synchronized(tokens) { //@TRACE 312=> - log.fine(CLASS_NAME,methodName,"312"); Vector list = new Vector(); Enumeration enumeration = tokens.elements(); @@ -227,7 +213,6 @@ public Vector getOutstandingTokens() { public void clear() { final String methodName = "clear"; //@TRACE 305=> {0} tokens - log.fine(CLASS_NAME, methodName, "305", new Object[] {Integer.valueOf(tokens.size())}); synchronized(tokens) { tokens.clear(); } diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/DisconnectedMessageBuffer.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/DisconnectedMessageBuffer.java index 2d1419d..d958447 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/DisconnectedMessageBuffer.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/DisconnectedMessageBuffer.java @@ -22,13 +22,10 @@ import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.MqttToken; import org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage; -import org.eclipse.paho.client.mqttv3.logging.Logger; -import org.eclipse.paho.client.mqttv3.logging.LoggerFactory; public class DisconnectedMessageBuffer implements Runnable { private final String CLASS_NAME = "DisconnectedMessageBuffer"; - private Logger log = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT, CLASS_NAME); private DisconnectedBufferOptions bufferOpts; private ArrayList buffer; private final Object bufLock = new Object(); // Used to synchronise the buffer @@ -109,7 +106,6 @@ public int getMessageCount() { public void run() { final String methodName = "run"; // @TRACE 516=Restoring all buffered messages. - log.fine(CLASS_NAME, methodName, "516"); while (getMessageCount() > 0) { try { BufferedMessage bufferedMessage = getMessage(0); @@ -125,7 +121,6 @@ public void run() { // Error occurred attempting to publish buffered message likely because the // client is not connected // @TRACE 519=Error occurred attempting to publish buffered message due to disconnect. Exception: {0}:{1}. - log.severe(CLASS_NAME, methodName, "519", new Object[] { ex.getReasonCode(), ex.getMessage() }); break; } } diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/NetworkModuleService.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/NetworkModuleService.java index fc39e61..984fe29 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/NetworkModuleService.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/NetworkModuleService.java @@ -21,8 +21,6 @@ import org.eclipse.paho.client.mqttv3.MqttConnectOptions; import org.eclipse.paho.client.mqttv3.MqttException; -import org.eclipse.paho.client.mqttv3.logging.Logger; -import org.eclipse.paho.client.mqttv3.logging.LoggerFactory; import org.eclipse.paho.client.mqttv3.spi.NetworkModuleFactory; /** @@ -33,8 +31,6 @@ * @author Maik Scheibler */ public class NetworkModuleService { - private static Logger LOG = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT, - NetworkModuleService.class.getSimpleName()); private static final ServiceLoader FACTORY_SERVICE_LOADER = ServiceLoader.load( NetworkModuleFactory.class, NetworkModuleService.class.getClassLoader()); @@ -149,8 +145,6 @@ private static void setURIField(URI toManipulate, String fieldName, Object newVa field.setAccessible(true); field.set(toManipulate, newValue); } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { - LOG.warning(NetworkModuleService.class.getName(), "setURIField", "115", new Object[] { - toManipulate.toString() }, e); } } } diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/SSLNetworkModule.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/SSLNetworkModule.java index 9b19e70..7bc7603 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/SSLNetworkModule.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/SSLNetworkModule.java @@ -18,6 +18,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.logging.Logger; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.SSLPeerUnverifiedException; @@ -25,15 +26,12 @@ import javax.net.ssl.SSLSocketFactory; import org.eclipse.paho.client.mqttv3.MqttException; -import org.eclipse.paho.client.mqttv3.logging.Logger; -import org.eclipse.paho.client.mqttv3.logging.LoggerFactory; /** * A network module for connecting over SSL. */ public class SSLNetworkModule extends TCPNetworkModule { private static final String CLASS_NAME = SSLNetworkModule.class.getName(); - private Logger log = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT, CLASS_NAME); private String[] enabledCiphers; private int handshakeTimeoutSecs; @@ -57,7 +55,6 @@ public SSLNetworkModule(SSLSocketFactory factory, String host, int port, String super(factory, host, port, resourceContext); this.host = host; this.port = port; - log.setResourceName(resourceContext); } /** @@ -80,17 +77,6 @@ public void setEnabledCiphers(String[] enabledCiphers) { this.enabledCiphers = enabledCiphers.clone(); } if ((socket != null) && (this.enabledCiphers != null)) { - if (log.isLoggable(Logger.FINE)) { - String ciphers = ""; - for (int i = 0; i < this.enabledCiphers.length; i++) { - if (i > 0) { - ciphers += ","; - } - ciphers += this.enabledCiphers[i]; - } - // @TRACE 260=setEnabledCiphers ciphers={0} - log.fine(CLASS_NAME, methodName, "260", new Object[]{ciphers}); - } ((SSLSocket) socket).setEnabledCipherSuites(this.enabledCiphers); } } diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/TCPNetworkModule.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/TCPNetworkModule.java index ddcff90..bc7c298 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/TCPNetworkModule.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/TCPNetworkModule.java @@ -26,15 +26,12 @@ import javax.net.SocketFactory; import org.eclipse.paho.client.mqttv3.MqttException; -import org.eclipse.paho.client.mqttv3.logging.Logger; -import org.eclipse.paho.client.mqttv3.logging.LoggerFactory; /** * A network module for connecting over TCP. */ public class TCPNetworkModule implements NetworkModule { private static final String CLASS_NAME = TCPNetworkModule.class.getName(); - private Logger log = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT,CLASS_NAME); protected Socket socket; private SocketFactory factory; @@ -52,7 +49,6 @@ public class TCPNetworkModule implements NetworkModule { * @param resourceContext The Resource Context */ public TCPNetworkModule(SocketFactory factory, String host, int port, String resourceContext) { - log.setResourceName(resourceContext); this.factory = factory; this.host = host; this.port = port; @@ -68,7 +64,6 @@ public void start() throws IOException, MqttException { final String methodName = "start"; try { // @TRACE 252=connect to host {0} port {1} timeout {2} - log.fine(CLASS_NAME,methodName, "252", new Object[] {host, Integer.valueOf(port), Long.valueOf(conTimeout*1000)}); SocketAddress sockaddr = new InetSocketAddress(host, port); socket = factory.createSocket(); socket.connect(sockaddr, conTimeout*1000); @@ -76,7 +71,6 @@ public void start() throws IOException, MqttException { } catch (ConnectException ex) { //@TRACE 250=Failed to create TCP socket - log.fine(CLASS_NAME,methodName,"250",null,ex); throw new MqttException(MqttException.REASON_CODE_SERVER_CONNECT_ERROR, ex); } } diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/Token.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/Token.java index 57ff54c..85ed1f7 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/Token.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/Token.java @@ -24,12 +24,9 @@ import org.eclipse.paho.client.mqttv3.internal.wire.MqttConnack; import org.eclipse.paho.client.mqttv3.internal.wire.MqttSuback; import org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage; -import org.eclipse.paho.client.mqttv3.logging.Logger; -import org.eclipse.paho.client.mqttv3.logging.LoggerFactory; public class Token { private static final String CLASS_NAME = Token.class.getName(); - private Logger log = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT,CLASS_NAME); private volatile boolean completed = false; private boolean pendingComplete = false; @@ -54,7 +51,7 @@ public class Token { private boolean notified = false; public Token(String logContext) { - log.setResourceName(logContext); + } public int getMessageID() { @@ -103,12 +100,10 @@ public void waitForCompletion() throws MqttException { public void waitForCompletion(long timeout) throws MqttException { final String methodName = "waitForCompletion"; //@TRACE 407=key={0} wait max={1} token={2} - log.fine(CLASS_NAME,methodName, "407",new Object[]{getKey(), Long.valueOf(timeout), this}); MqttWireMessage resp = waitForResponse(timeout); if (resp == null && !completed) { //@TRACE 406=key={0} timed out token={1} - log.fine(CLASS_NAME,methodName, "406",new Object[]{getKey(), this}); exception = new MqttException(MqttException.REASON_CODE_CLIENT_TIMEOUT); throw exception; } @@ -131,14 +126,11 @@ protected MqttWireMessage waitForResponse(long timeout) throws MqttException { final String methodName = "waitForResponse"; synchronized (responseLock) { //@TRACE 400=>key={0} timeout={1} sent={2} completed={3} hasException={4} response={5} token={6} - log.fine(CLASS_NAME, methodName, "400",new Object[]{getKey(), Long.valueOf(timeout),Boolean.valueOf(sent),Boolean.valueOf(completed),(exception==null)?"false":"true",response,this},exception); while (!this.completed) { if (this.exception == null) { try { //@TRACE 408=key={0} wait max={1} - log.fine(CLASS_NAME,methodName,"408",new Object[] {getKey(), Long.valueOf(timeout)}); - if (timeout <= 0) { responseLock.wait(); } else { @@ -151,7 +143,6 @@ protected MqttWireMessage waitForResponse(long timeout) throws MqttException { if (!this.completed) { if (this.exception != null) { //@TRACE 401=failed with exception - log.fine(CLASS_NAME,methodName,"401",null,exception); throw exception; } @@ -163,7 +154,6 @@ protected MqttWireMessage waitForResponse(long timeout) throws MqttException { } } //@TRACE 402=key={0} response={1} - log.fine(CLASS_NAME,methodName, "402",new Object[]{getKey(), this.response}); return this.response; } @@ -175,8 +165,7 @@ protected MqttWireMessage waitForResponse(long timeout) throws MqttException { protected void markComplete(MqttWireMessage msg, MqttException ex) { final String methodName = "markComplete"; //@TRACE 404=>key={0} response={1} excep={2} - log.fine(CLASS_NAME,methodName,"404",new Object[]{getKey(),msg,ex}); - + synchronized(responseLock) { // ACK means that everything was OK, so mark the message for garbage collection. if (msg instanceof MqttAck) { @@ -194,7 +183,6 @@ protected void markComplete(MqttWireMessage msg, MqttException ex) { protected void notifyComplete() { final String methodName = "notifyComplete"; //@TRACE 411=>key={0} response={1} excep={2} - log.fine(CLASS_NAME,methodName,"404",new Object[]{getKey(),this.response, this.exception}); synchronized (responseLock) { // If pending complete is set then normally the token can be marked @@ -243,7 +231,6 @@ public void waitUntilSent() throws MqttException { while (!sent) { try { //@TRACE 409=wait key={0} - log.fine(CLASS_NAME,methodName, "409",new Object[]{getKey()}); sentLock.wait(); } catch (InterruptedException e) { @@ -266,7 +253,6 @@ public void waitUntilSent() throws MqttException { protected void notifySent() { final String methodName = "notifySent"; //@TRACE 403=> key={0} - log.fine(CLASS_NAME, methodName, "403",new Object[]{getKey()}); synchronized (responseLock) { this.response = null; this.completed = false; @@ -292,8 +278,7 @@ public void reset() throws MqttException { throw new MqttException(MqttException.REASON_CODE_TOKEN_INUSE); } //@TRACE 410=> key={0} - log.fine(CLASS_NAME, methodName, "410",new Object[]{getKey()}); - + client = null; completed = false; response = null; diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/logcat.properties b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/logcat.properties deleted file mode 100644 index 37b794c..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/logcat.properties +++ /dev/null @@ -1,171 +0,0 @@ -0=MQTT Catalog -101= ClientID={0} ServerURI={1} PersistenceType={2} -103=cleanSession={0} connectionTimeout={1} TimekeepAlive={2} userName={3} password={4} will={5} userContext={6} callback={7} -104=> quiesceTimeout={0} userContext={1} callback={2} -105=< exception -106=Subscribe topicFilter={0} userContext={1} callback={2} -107=Unsubscribe topic={0} userContext={1} callback={2} -108=< -109=< -110=< -111=< topic={0} message={1}userContext={1} callback={2} -112=< -113=< -114=> -115=URI={0} -116=URI={0} -117=> -118=<200=internalSend key={0} message={1} token={2} -119=Invalid URI Provided that could not be used to create a NetworkModule: {0} -204=connect failed: rc={0} -207=connect failed: not disconnected {0} -208=failed: not connected -209=connect failed: unexpected exception -210=failed: called on callback thread -211=failed: already disconnected -212=connect failed: unexpected exception -213=fail: token in use: key={0} message={1} token={2} -214=state=CONNECTING -215=state=CONNECTED -216=state=DISCONNECTING -217=state=DISCONNECTED -218=state=DISCONNECTING -219=failed: already disconnecting -220=> -221=> -222=> -223=failed: in closed state -224=failed: not disconnected -250=Failed to create TCP socket -252=connect to host {0} port {1} timeout {2} -260=setEnabledCiphers ciphers={0} -300=key={0} message={1} -301=received {0} -302=existing key={0} message={1} token={2} -303=creating new token key={0} message={1} token={2} -305=> {0} tokens -306=key={0} -307=key={0} token={1} -308=<> -309=resp={0} -310=> -311=> -312=> -400=>key={0} timeout={1} sent={2} completed={3} hasException={4} response={5} token={6} -401=failed with exception -402=key={0} response={1} -403=> key={0} -404=>key={0} response={1} excep={2} -406=key={0} timed out token={1} -407=key={0} wait max={1} token={2} -408=key={0} wait max={1} -409=wait key={0} -410=> key={0} -411=>key={0} response={1} excep={2} -500=Attempting to reconnect client: {0} -501=Automatic Reconnect Successful: {0} -502=Automatic Reconnect failed, rescheduling: {0} -503=Start reconnect timer for client: {0}, delay: {1} -504=Stop reconnect timer for client: {0} -505=Rescheduling reconnect timer for client: {0}, delay: {1} -506=Triggering Automatic Reconnect attempt. -507=Client Connected, Offline Buffer available, but not empty. Adding message to buffer. message={0} -508=Client Resting, Offline Buffer available. Adding message to buffer. message={0} -509=Client Reconnected, Offline Buffer Available. Sending Buffered Messages. -510=Publishing Buffered message message={0} -511=outbound QoS 0 publish key={0} message={1} -512=QoS 0 publish key={0} -513=Persisted Buffered Message key={0} -514=Failed to persist buffered message key={0} -515=Could not Persist, attempting to Re-Open Persistence Store -516=Restoring all buffered messages. -517=Un-Persisting Buffered message key={0} -518=Failed to Un-Persist Buffered message key={0} -519=Error occurred attempting to publish buffered message due to disconnect. Exception: {0}:{1}. -529=Sent {0} -600=> -601=key={0} message={1} -602=key={0} exception -603=clearState -604=inbound QoS 2 publish key={0} message={1} -605=outbound QoS 2 pubrel key={0} message={1} -606=outbound QoS 2 completed key={0} message={1} -607=outbound QoS 2 publish key={0} message={1} -608=outbound QoS 1 publish key={0} message={1} -609=removing orphaned pubrel key={0} -610=QoS 2 publish key={0} -611=QoS 2 pubrel key={0} -612=QoS 1 publish key={0} -613= sending {0} msgs at max inflight window -615=pending send key={0} message {1} -616=checkForActivity entered -617=+1 inflightpubrels={0} -618=key={0} QoS={1} -619=Timed out as no activity, keepAlive={0} lastOutboundActivity={1} lastInboundActivity={2} time={3} lastPing={4} -620=ping needed. keepAlive={0} lastOutboundActivity={1} lastInboundActivity={2} -621=no outstanding flows and not connected -622=inflight window full -623=+1 actualInFlight={0} -624=Schedule next ping at {0} -625=key={0} -626=quiescing={0} actualInFlight={1} pendingFlows={2} inFlightPubRels={3} callbackQuiesce={4} tokens={5} -627=received key={0} message={1} -628=pending publish key={0} qos={1} message={2} -629=received key={0} token={1} message={2} -630=received bytes count={0} -631=connected -632=reason {0} -633=disconnected -634=ping not needed yet. Schedule next ping. -635=ping sent. pingOutstanding: {0} -636=ping response received. pingOutstanding: {0} -637=timeout={0} -638=notifying queueLock holders -639=wait for outstanding: actualInFlight={0} pendingFlows={1} inFlightPubRels={2} tokens={3} -640=finished -641=remove publish from persistence. key={0} -642=Timed out as no write activity, keepAlive={0} lastOutboundActivity={1} lastInboundActivity={2} time={3} lastPing={4} -643=sent bytes count={0} -644=wait for new work or for space in the inflight window -645=removed QoS 2 publish/pubrel. key={0}, -1 inFlightPubRels={1} -646=-1 actualInFlight={0} -647=new work or ping arrived -648=key{0}, msg={1}, excep={2} -649=key={0},excep={1} -650=removed Qos 1 publish. key={0} -651=received key={0} message={1} -659=start timer for client:{0} -660=Check schedule at {0} -661=stop -662=no message found for ack id={0} -700=stopping -701=notify workAvailable and wait for run -703=stopped -704=wait for workAvailable -705=callback and notify for key={0} -706=notify spaceAvailable -708=call connectionLost -709=wait for spaceAvailable -710=new msg avail, notify workAvailable -711=quiesce notify spaceAvailable -713=call messageArrived key={0} topic={1} -714=callback threw exception -715=new workAvailable. key={0} -716=call onSuccess key={0} -717=call onFailure key {0} -719=callback threw ex: -720=exception from connectionLost {0} -800=stopping sender -801=stopped -802=network send key={0} msg={1} -803=get message returned null, stopping} -804=exception -805=< -850=stopping -851=stopped -852=network read message -853=Stopping due to IOException -854=< -855=starting -856=Stopping, MQttException -857=Unknown PubAck, PubComp or PubRec received. Ignoring. diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages.properties b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages.properties deleted file mode 100644 index 3eda718..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages.properties +++ /dev/null @@ -1,38 +0,0 @@ -#/* -# * Copyright (c) 2009, 2012 IBM Corp. -# * -# * 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 -# * -# * Contributors: -# * Dave Locke - initial API and implementation and/or initial documentation -# */ -# NLS_MESSAGEFORMAT_VAR -# NLS_ENCODING=UNICODE -1=Invalid protocol version -2=Invalid client ID -3=Broker unavailable -4=Bad user name or password -5=Not authorized to connect -6=Unexpected error -119=Invalid URI Provided that could not be used to create a NetworkModule: {0} -32000=Timed out waiting for a response from the server -32001=Internal error, caused by no new message IDs being available -32002=Timed out while waiting to write messages to the server -32100=Client is connected -32101=Client is disconnected -32102=Client is currently disconnecting -32103=Unable to connect to server -32104=Client is not connected -32105=The specified SocketFactory type does not match the broker URI -32106=SSL configuration error -32107=Disconnecting is not allowed from a callback method -32108=Unrecognized packet -32109=Connection lost -32110=Connect already in progress -32111=Client is closed -32200=Persistence already in use -32201=Token already in use -32202=Too many publishes in progress diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_cs.properties b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_cs.properties deleted file mode 100644 index c746dd1..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_cs.properties +++ /dev/null @@ -1,35 +0,0 @@ -#/* -# * Copyright (c) 2009, 2012 IBM Corp. -# * -# * 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 -# * -# * Contributors: -# * Dave Locke - initial API and implementation and/or initial documentation -# */ -# NLS_MESSAGEFORMAT_VAR -# NLS_ENCODING=UNICODE -1=Neplatn\u00e1 verze protokolu -2=Neplatn\u00e9 ID klienta -3=Nedostupn\u00fd zprost\u0159edkovatel -4=Chybn\u00e9 jm\u00e9no u\u017eivatele nebo heslo -5=Chyb\u00ed autorizace pro p\u0159ipojen\u00ed -6=Neo\u010dek\u00e1van\u00e1 chyba -32000=Vypr\u0161en\u00ed \u010dasov\u00e9ho limitu pro odpov\u011b\u010f ze serveru -32100=Klient je p\u0159ipojen -32101=Klient je odpojen -32102=Klient se aktu\u00e1ln\u011b odpojuje -32103=Nelze se p\u0159ipojit k serveru -32104=Klient nen\u00ed p\u0159ipojen -32105=Ur\u010den\u00fd typ polo\u017eky SocketFactory neodpov\u00edd\u00e1 identifik\u00e1toru URI zprost\u0159edkovatele. -32106=Chyba konfigurace zabezpe\u010den\u00ed SSL -32107=Z metody zp\u011btn\u00e9ho vol\u00e1n\u00ed nen\u00ed povoleno odpojen\u00ed -32108=Nerozpoznan\u00fd paket -32109=P\u0159ipojen\u00ed bylo ztraceno. -32110=P\u0159ipojen\u00ed ji\u017e prob\u00edh\u00e1 -32111=Klient je zav\u0159en -32200=Perzistence je ji\u017e pou\u017e\u00edv\u00e1na. -32201=Token se ji\u017e pou\u017e\u00edv\u00e1 -32202=Prob\u00edh\u00e1 p\u0159\u00edli\u0161 mnoho publikov\u00e1n\u00ed diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_de.properties b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_de.properties deleted file mode 100644 index bdd4d48..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_de.properties +++ /dev/null @@ -1,35 +0,0 @@ -#/* -# * Copyright (c) 2009, 2012 IBM Corp. -# * -# * 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 -# * -# * Contributors: -# * Dave Locke - initial API and implementation and/or initial documentation -# */ -# NLS_MESSAGEFORMAT_VAR -# NLS_ENCODING=UNICODE -1=Protokollversion ung\u00fcltig -2=Client-ID ung\u00fcltig -3=Broker nicht verf\u00fcgbar -4=Benutzername oder Kennwort falsch -5=Keine Berechtigung f\u00fcr Verbindung -6=Unerwarteter Fehler -32000=Zeitlimit\u00fcberschreitung beim Warten auf eine Antwort vom Server -32100=Verbindung zu Client ist hergestellt -32101=Verbindung zu Client ist getrennt -32102=Verbindung zu Client wird derzeit getrennt -32103=Verbindung zu Server kann nicht hergestellt werden -32104=Keine Verbindung zu Client -32105=Der angegebene Socket-Factorytyp entspricht nicht der Broker-URI -32106=SSL-Konfigurationsfehler -32107=Trennung einer Verbindung \u00fcber eine Callback-Methode ist nicht zul\u00e4ssig -32108=Paket nicht erkannt -32109=Verbindung wurde getrennt -32110=Verbindungsherstellung wird ausgef\u00fchrt -32111=Client ist geschlossen -32200=Persistenz wird bereits verwendet -32201=Token wird bereits verwendet -32202=Zu viele Ver\u00f6ffentlichungen werden ausgef\u00fchrt diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_es.properties b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_es.properties deleted file mode 100644 index 7517e09..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_es.properties +++ /dev/null @@ -1,35 +0,0 @@ -#/* -# * Copyright (c) 2009, 2012 IBM Corp. -# * -# * 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 -# * -# * Contributors: -# * Dave Locke - initial API and implementation and/or initial documentation -# */ -# NLS_MESSAGEFORMAT_VAR -# NLS_ENCODING=UNICODE -1=Versi\u00f3n de protocolo incorrecta -2=Identificador de cliente incorrecto -3=Intermediario no disponible -4=Nombre de usuario o contrase\u00f1a incorrecto -5=No autorizado a conectarse -6=Error inesperado -32000=Tiempo de espera excedido al esperar una respuesta del servidor -32100=El cliente est\u00e1 conectado -32101=El cliente est\u00e1 desconectado -32102=El cliente se est\u00e1 desconectando -32103=No es posible conectarse al servidor -32104=El cliente no est\u00e1 conectado -32105=El tipo SocketFactory especificado no coincide con el URI del intermediario -32106=Error de configuraci\u00f3n SSL -32107=No se permite la desconexi\u00f3n desde un m\u00e9todo de devoluci\u00f3n de llamada -32108=Paquete no reconocido -32109=Se ha perdido la conexi\u00f3n -32110=Conexi\u00f3n ya en curso -32111=El cliente est\u00e1 cerrado -32200=La persistencia ya se est\u00e1 utilizando -32201=La se\u00f1al ya se est\u00e1 utilizando -32202=Demasiadas publicaciones en curso diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_fr.properties b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_fr.properties deleted file mode 100644 index d7b42e4..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_fr.properties +++ /dev/null @@ -1,35 +0,0 @@ -#/* -# * Copyright (c) 2009, 2012 IBM Corp. -# * -# * 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 -# * -# * Contributors: -# * Dave Locke - initial API and implementation and/or initial documentation -# */ -# NLS_MESSAGEFORMAT_VAR -# NLS_ENCODING=UNICODE -1=Version de protocole incorrecte -2=ID client incorrect -3=Courtier indisponible -4=Nom d'utilisateur ou mot de passe incorrect -5=L'utilisateur n'est pas autoris\u00e9 \u00e0 se connecter -6=Erreur inattendue. -32000=Expiration du d\u00e9lai d'attente d'une r\u00e9ponse du serveur -32100=Client connect\u00e9 -32101=Client d\u00e9connect\u00e9 -32102=Client en cours de d\u00e9connexion -32103=Impossible de se connecter au serveur -32104=Client non connect\u00e9 -32105=Le type SocketFactory sp\u00e9cifi\u00e9 ne correspond pas \u00e0 l'URI de courtier -32106=Erreur de configuration SSL -32107=D\u00e9connexion non autoris\u00e9e pour une m\u00e9thode de rappel -32108=Paquet non reconnu -32109=Connexion perdue -32110=Connexion d\u00e9j\u00e0 en cours -32111=Client ferm\u00e9 -32200=La persistance est d\u00e9j\u00e0 en cours d'utilisation -32201=Jeton d\u00e9j\u00e0 en cours d'utilisation -32202=Trop de publications en cours diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_hu.properties b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_hu.properties deleted file mode 100644 index dc4cfe6..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_hu.properties +++ /dev/null @@ -1,35 +0,0 @@ -#/* -# * Copyright (c) 2009, 2012 IBM Corp. -# * -# * 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 -# * -# * Contributors: -# * Dave Locke - initial API and implementation and/or initial documentation -# */ -# NLS_MESSAGEFORMAT_VAR -# NLS_ENCODING=UNICODE -1=\u00c9rv\u00e9nytelen protokoll v\u00e1ltozat -2=\u00c9rv\u00e9nytelen \u00fcgyf\u00e9lazonos\u00edt\u00f3 -3=K\u00f6zvet\u00edt\u0151 nem el\u00e9rhet\u0151 -4=Rossz felhaszn\u00e1l\u00f3i n\u00e9v vagy jelsz\u00f3 -5=Nem jogosult csatlakozni -6=V\u00e1ratlan hiba -32000=T\u00fall\u00e9pte a megengedett id\u0151t a kiszolg\u00e1l\u00f3 v\u00e1lasz\u00e1ra v\u00e1rva -32100=Az \u00fcgyf\u00e9l csatlakoztatva van -32101=Az \u00fcgyf\u00e9l sz\u00e9tkapcsolt -32102=Az \u00fcgyf\u00e9l \u00e9pp megszak\u00edtja a kapcsolatot -32103=Nem lehet kapcsol\u00f3dni a kiszolg\u00e1l\u00f3hoz -32104=Az \u00fcgyf\u00e9l nincs csatlakoztatva -32105=A megadott SocketFactory t\u00edpus nem illeszkedik a k\u00f6zvet\u00edt\u0151 URI azonos\u00edt\u00f3hoz -32106=SSL konfigur\u00e1ci\u00f3s hiba -32107=A megszak\u00edt\u00e1s visszah\u00edv\u00e1s met\u00f3dusb\u00f3l nem enged\u00e9lyezett -32108=Ismeretlen csomag -32109=Kapcsolat elveszett -32110=A csatlakoz\u00e1s m\u00e1r folyamatban van -32111=Az \u00fcgyf\u00e9l bez\u00e1r\u00e1sra ker\u00fclt -32200=A megmarad\u00f3 \u00e1llapot m\u00e1r haszn\u00e1latban van -32201=A token m\u00e1r haszn\u00e1latban van. -32202=T\u00fal sok k\u00f6zz\u00e9t\u00e9tel van folyamatban diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_it.properties b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_it.properties deleted file mode 100644 index e0dcfcc..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_it.properties +++ /dev/null @@ -1,35 +0,0 @@ -#/* -# * Copyright (c) 2009, 2012 IBM Corp. -# * -# * 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 -# * -# * Contributors: -# * Dave Locke - initial API and implementation and/or initial documentation -# */ -# NLS_MESSAGEFORMAT_VAR -# NLS_ENCODING=UNICODE -1=Versione di protocollo non valida -2=ID client non valido -3=Broker non disponibile -4=Nome utente o password non validi -5=Non autorizzato per la connessione -6=Errore imprevisto -32000=Scaduto in attesa di una risposta dal server -32100=Client connesso -32101=Client disconnesso -32102=Client in fase di disconnessione -32103=Impossibile effettuare la connessione al server -32104=Client non connesso -32105=Il tipo SocketFactory specificato non corrisponde all'URI del broker -32106=Errore di configurazione SSL -32107=Disconnessione non consentita da un metodo callback -32108=Pacchetto non riconosciuto -32109=Connessione persa -32110=Connessione gi\u00e0 in corso -32111=Client chiuso -32200=Persistenza gi\u00e0 in uso -32201=Token gi\u00e0 in uso -32202=Numero eccessivo di pubblicazioni in corso diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_ja.properties b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_ja.properties deleted file mode 100644 index 9f78d2a..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_ja.properties +++ /dev/null @@ -1,35 +0,0 @@ -#/* -# * Copyright (c) 2009, 2012 IBM Corp. -# * -# * 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 -# * -# * Contributors: -# * Dave Locke - initial API and implementation and/or initial documentation -# */ -# NLS_MESSAGEFORMAT_VAR -# NLS_ENCODING=UNICODE -1=\u7121\u52b9\u306a\u30d7\u30ed\u30c8\u30b3\u30eb\u30fb\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3059 -2=\u7121\u52b9\u306a\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 ID \u3067\u3059 -3=\u30d6\u30ed\u30fc\u30ab\u30fc\u304c\u4f7f\u7528\u4e0d\u53ef\u3067\u3059 -4=\u9593\u9055\u3063\u305f\u30e6\u30fc\u30b6\u30fc\u540d\u307e\u305f\u306f\u30d1\u30b9\u30ef\u30fc\u30c9\u3067\u3059 -5=\u63a5\u7d9a\u3059\u308b\u6a29\u9650\u304c\u3042\u308a\u307e\u305b\u3093 -6=\u4e88\u671f\u3057\u306a\u3044\u30a8\u30e9\u30fc -32000=\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u306e\u5fdc\u7b54\u5f85\u6a5f\u304c\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u306b\u306a\u308a\u307e\u3057\u305f -32100=\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u63a5\u7d9a\u3057\u307e\u3057\u305f -32101=\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3092\u5207\u65ad\u3057\u307e\u3057\u305f -32102=\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f\u73fe\u5728\u5207\u65ad\u4e2d\u3067\u3059 -32103=\u30b5\u30fc\u30d0\u30fc\u306b\u63a5\u7d9a\u3067\u304d\u307e\u305b\u3093 -32104=\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f\u63a5\u7d9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093 -32105=\u6307\u5b9a\u3055\u308c\u305f SocketFactory \u30bf\u30a4\u30d7\u306f\u30d6\u30ed\u30fc\u30ab\u30fc URI \u3068\u4e00\u81f4\u3057\u307e\u305b\u3093 -32106=SSL \u69cb\u6210\u30a8\u30e9\u30fc\u3067\u3059 -32107=\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u30fb\u30e1\u30bd\u30c3\u30c9\u304b\u3089\u306e\u5207\u65ad\u306f\u8a31\u53ef\u3055\u308c\u307e\u305b\u3093 -32108=\u8b58\u5225\u3055\u308c\u3066\u3044\u306a\u3044\u30d1\u30b1\u30c3\u30c8\u3067\u3059 -32109=\u63a5\u7d9a\u55aa\u5931 -32110=\u63a5\u7d9a\u51e6\u7406\u306f\u65e2\u306b\u9032\u884c\u4e2d\u3067\u3059 -32111=\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304c\u30af\u30ed\u30fc\u30ba\u3055\u308c\u307e\u3057\u305f -32200=\u30d1\u30fc\u30b7\u30b9\u30bf\u30f3\u30b9\u306f\u3059\u3067\u306b\u4f7f\u7528\u4e2d\u3067\u3059\u3002 -32201=\u30c8\u30fc\u30af\u30f3\u306f\u65e2\u306b\u4f7f\u7528\u4e2d\u3067\u3059 -32202=\u51e6\u7406\u4e2d\u306e\u30d1\u30d6\u30ea\u30c3\u30b7\u30e5\u304c\u591a\u3059\u304e\u307e\u3059 diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_ko.properties b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_ko.properties deleted file mode 100644 index 2209928..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_ko.properties +++ /dev/null @@ -1,35 +0,0 @@ -#/* -# * Copyright (c) 2009, 2012 IBM Corp. -# * -# * 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 -# * -# * Contributors: -# * Dave Locke - initial API and implementation and/or initial documentation -# */ -# NLS_MESSAGEFORMAT_VAR -# NLS_ENCODING=UNICODE -1=\uc62c\ubc14\ub974\uc9c0 \uc54a\uc740 \ud504\ub85c\ud1a0\ucf5c \ubc84\uc804 -2=\uc62c\ubc14\ub974\uc9c0 \uc54a\uc740 \ud074\ub77c\uc774\uc5b8\ud2b8 ID -3=\ube0c\ub85c\ucee4 \uc0ac\uc6a9 \ubd88\uac00\ub2a5 -4=\uc798\ubabb\ub41c \uc0ac\uc6a9\uc790 \uc774\ub984 \ub610\ub294 \ube44\ubc00\ubc88\ud638 -5=\uc5f0\uacb0\ud560 \uc218 \uc788\ub294 \uad8c\ud55c\uc774 \ubd80\uc5ec\ub418\uc9c0 \uc54a\uc74c -6=\uc608\uc0c1\uce58 \ubabb\ud55c \uc624\ub958 -32000=\uc11c\ubc84\uc5d0\uc11c \uc751\ub2f5\uc744 \uae30\ub2e4\ub9ac\ub294 \uc911 \uc81c\ud55c\uc2dc\uac04 \ucd08\uacfc -32100=\ud074\ub77c\uc774\uc5b8\ud2b8\uac00 \uc5f0\uacb0\ub428 -32101=\ud074\ub77c\uc774\uc5b8\ud2b8\uac00 \uc5f0\uacb0\uc774 \ub04a\uae40 -32102=\ud604\uc7ac \ud074\ub77c\uc774\uc5b8\ud2b8\uac00 \uc5f0\uacb0\uc744 \ub04a\ub294 \uc911 -32103=\uc11c\ubc84\uc5d0 \uc5f0\uacb0\ud560 \uc218 \uc5c6\uc74c -32104=\ud074\ub77c\uc774\uc5b8\ud2b8\uac00 \uc5f0\uacb0\ub418\uc9c0 \uc54a\uc74c -32105=\uc9c0\uc815\ub41c SocketFactory \uc720\ud615\uc774 \ube0c\ub85c\ucee4 URI\uc640 \uc77c\uce58\ud558\uc9c0 \uc54a\uc74c -32106=SSL \uad6c\uc131 \uc624\ub958 -32107=\ucf5c\ubc31 \uba54\uc18c\ub4dc\ub85c\ubd80\ud130 \uc5f0\uacb0\uc744 \ub04a\ub294 \uac83\uc774 \ud5c8\uc6a9\ub418\uc9c0 \uc54a\uc74c -32108=\uc778\uc2dd\ub418\uc9c0 \uc54a\uc740 \ud328\ud0b7 -32109=\uc5f0\uacb0 \uc720\uc2e4 -32110=\uc5f0\uacb0\uc774 \uc774\ubbf8 \uc9c4\ud589 \uc911\uc784 -32111=\ud074\ub77c\uc774\uc5b8\ud2b8\uac00 \ub2eb\ud798 -32200=\uc9c0\uc18d \ud30c\uc77c\uc744 \uc774\ubbf8 \uc0ac\uc6a9 \uc911 -32201=\ud1a0\ud070\uc774 \uc774\ubbf8 \uc0ac\uc6a9 \uc911\uc784 -32202=\ub108\ubb34 \ub9ce\uc740 \ubc1c\ud589\uc774 \uc9c4\ud589 \uc911\uc784 diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_pl.properties b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_pl.properties deleted file mode 100644 index 255175c..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_pl.properties +++ /dev/null @@ -1,35 +0,0 @@ -#/* -# * Copyright (c) 2009, 2012 IBM Corp. -# * -# * 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 -# * -# * Contributors: -# * Dave Locke - initial API and implementation and/or initial documentation -# */ -# NLS_MESSAGEFORMAT_VAR -# NLS_ENCODING=UNICODE -1=Niepoprawna wersja protoko\u0142u -2=Niepoprawny identyfikator klienta -3=Broker niedost\u0119pny -4=Niepoprawna nazwa u\u017cytkownika lub has\u0142o -5=Brak autoryzacji do nawi\u0105zania po\u0142\u0105czenia -6=Nieoczekiwany b\u0142\u0105d -32000=Przekroczono limit czasu oczekiwania na odpowied\u017a z serwera -32100=Po\u0142\u0105czenie z klientem zosta\u0142o nawi\u0105zane -32101=Po\u0142\u0105czenie z klientem zosta\u0142o roz\u0142\u0105czone -32102=Klient roz\u0142\u0105cza si\u0119 -32103=Nie mo\u017cna nawi\u0105za\u0107 po\u0142\u0105czenia z serwerem -32104=Po\u0142\u0105czenie z klientem nie jest nawi\u0105zane -32105=Podany typ fabryki SocketFactory nie jest zgodny z identyfikatorem URI brokera -32106=B\u0142\u0105d konfiguracji protoko\u0142u SSL -32107=Roz\u0142\u0105czenie nie jest dozwolone w metodzie procedury zwrotnej -32108=Nierozpoznany pakiet -32109=Utracono po\u0142\u0105czenie -32110=Operacja nawi\u0105zywania po\u0142\u0105czenia jest ju\u017c w toku -32111=Klient zosta\u0142 zamkni\u0119ty -32200=Trwa\u0142o\u015b\u0107 jest ju\u017c w u\u017cyciu -32201=Znacznik jest ju\u017c w u\u017cyciu -32202=Zbyt wiele operacji publikowania jest w toku diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_pt_BR.properties b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_pt_BR.properties deleted file mode 100644 index f9345ad..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_pt_BR.properties +++ /dev/null @@ -1,35 +0,0 @@ -#/* -# * Copyright (c) 2009, 2012 IBM Corp. -# * -# * 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 -# * -# * Contributors: -# * Dave Locke - initial API and implementation and/or initial documentation -# */ -# NLS_MESSAGEFORMAT_VAR -# NLS_ENCODING=UNICODE -1=Vers\u00e3o de protocolo inv\u00e1lida -2=ID de cliente inv\u00e1lido -3=Broker indispon\u00edvel -4=Nome de usu\u00e1rio ou senha inv\u00e1lidos -5=N\u00e3o autorizado a conectar -6=Erro inesperado -32000=Tempo limite atingido ao aguardar por uma resposta do servidor -32100=O cliente est\u00e1 conectado -32101=O cliente est\u00e1 desconectado -32102=Cliente desconectando atualmente -32103=N\u00e3o \u00e9 poss\u00edvel se conectar ao servidor -32104=O cliente n\u00e3o est\u00e1 conectado -32105=O tipo SocketFactory especificado n\u00e3o corresponde ao URI do broker -32106=Erro de configura\u00e7\u00e3o de SSL -32107=A desconex\u00e3o n\u00e3o \u00e9 permitida a partir de um m\u00e9todo de retorno de chamada -32108=Pacote n\u00e3o reconhecido -32109=Conex\u00e3o perdida -32110=A conex\u00e3o j\u00e1 est\u00e1 em andamento -32111=O cliente foi encerrado -32200=Persist\u00eancia j\u00e1 em uso -32201=O token j\u00e1 est\u00e1 em uso -32202=Muitas publica\u00e7\u00f5es em andamento diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_ru.properties b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_ru.properties deleted file mode 100644 index 39fe6b6..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_ru.properties +++ /dev/null @@ -1,35 +0,0 @@ -#/* -# * Copyright (c) 2009, 2012 IBM Corp. -# * -# * 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 -# * -# * Contributors: -# * Dave Locke - initial API and implementation and/or initial documentation -# */ -# NLS_MESSAGEFORMAT_VAR -# NLS_ENCODING=UNICODE -1=\u041d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 -2=\u041d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u0418\u0414 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 -3=\u041f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d -4=\u041e\u0448\u0438\u0431\u043e\u0447\u043d\u043e\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u044c -5=\u041d\u0435\u0442 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043d\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 -6=\u041d\u0435\u043f\u0440\u0435\u0434\u0432\u0438\u0434\u0435\u043d\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 -32000=\u0422\u0430\u043c-\u0430\u0443\u0442 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 -32100=\u041a\u043b\u0438\u0435\u043d\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d -32101=\u041a\u043b\u0438\u0435\u043d\u0442 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d -32102=\u041a\u043b\u0438\u0435\u043d\u0442 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f -32103=\u041d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 -32104=\u041a\u043b\u0438\u0435\u043d\u0442 \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d -32105=\u0422\u0438\u043f SocketFactory \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 URI \u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a\u0430 -32106=\u041e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 SSL -32107=\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 -32108=\u041d\u0435\u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 -32109=\u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u043e -32110=\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 -32111=\u041a\u043b\u0438\u0435\u043d\u0442 \u0437\u0430\u043a\u0440\u044b\u0442 -32200=\u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f -32201=\u041c\u0430\u0440\u043a\u0435\u0440 \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f -32202=\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439 diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_zh_CN.properties b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_zh_CN.properties deleted file mode 100644 index 8483ef8..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_zh_CN.properties +++ /dev/null @@ -1,35 +0,0 @@ -#/* -# * Copyright (c) 2009, 2012 IBM Corp. -# * -# * 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 -# * -# * Contributors: -# * Dave Locke - initial API and implementation and/or initial documentation -# */ -# NLS_MESSAGEFORMAT_VAR -# NLS_ENCODING=UNICODE -1=\u65e0\u6548\u534f\u8bae\u7248\u672c -2=\u65e0\u6548\u5ba2\u6237\u673a\u6807\u8bc6 -3=\u4ee3\u7406\u7a0b\u5e8f\u4e0d\u53ef\u7528 -4=\u9519\u8bef\u7684\u7528\u6237\u540d\u6216\u5bc6\u7801 -5=\u65e0\u6743\u8fde\u63a5 -6=\u610f\u5916\u9519\u8bef -32000=\u7b49\u5f85\u6765\u81ea\u670d\u52a1\u5668\u7684\u54cd\u5e94\u65f6\u8d85\u65f6 -32100=\u5df2\u8fde\u63a5\u5ba2\u6237\u673a -32101=\u5df2\u65ad\u5f00\u5ba2\u6237\u673a\u8fde\u63a5 -32102=\u5ba2\u6237\u673a\u6b63\u5728\u65ad\u5f00\u8fde\u63a5 -32103=\u65e0\u6cd5\u8fde\u63a5\u81f3\u670d\u52a1\u5668 -32104=\u5ba2\u6237\u673a\u672a\u8fde\u63a5 -32105=\u6307\u5b9a\u7684 SocketFactory \u7c7b\u578b\u4e0e\u4ee3\u7406\u7a0b\u5e8f URI \u4e0d\u5339\u914d -32106=SSL \u914d\u7f6e\u9519\u8bef -32107=\u4e0d\u5141\u8bb8\u901a\u8fc7\u56de\u8c03\u65b9\u6cd5\u65ad\u5f00\u8fde\u63a5 -32108=\u4e0d\u53ef\u8bc6\u522b\u7684\u5305 -32109=\u5df2\u65ad\u5f00\u8fde\u63a5 -32110=\u5df2\u5728\u8fdb\u884c\u8fde\u63a5 -32111=\u5ba2\u6237\u673a\u5df2\u5173\u95ed -32200=\u6301\u4e45\u6027\u5df2\u5728\u4f7f\u7528\u4e2d -32201=\u4ee4\u724c\u5df2\u5728\u4f7f\u7528\u4e2d -32202=\u6b63\u5728\u8fdb\u884c\u8fc7\u591a\u7684\u53d1\u5e03 diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_zh_TW.properties b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_zh_TW.properties deleted file mode 100644 index 846f1b6..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/nls/messages_zh_TW.properties +++ /dev/null @@ -1,35 +0,0 @@ -#/* -# * Copyright (c) 2009, 2012 IBM Corp. -# * -# * 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 -# * -# * Contributors: -# * Dave Locke - initial API and implementation and/or initial documentation -# */ -# NLS_MESSAGEFORMAT_VAR -# NLS_ENCODING=UNICODE -1=\u901a\u8a0a\u5354\u5b9a\u7248\u672c\u7121\u6548 -2=\u7528\u6236\u7aef ID \u7121\u6548 -3=\u5206\u914d\u7ba1\u7406\u7cfb\u7d71\u7121\u6cd5\u4f7f\u7528 -4=\u4f7f\u7528\u8005\u540d\u7a31\u6216\u5bc6\u78bc\u4e0d\u7576 -5=\u672a\u7372\u6388\u6b0a\u9023\u63a5 -6=\u975e\u9810\u671f\u7684\u932f\u8aa4 -32000=\u7b49\u5f85\u4f3a\u670d\u5668\u7684\u56de\u61c9\u6642\u903e\u6642 -32100=\u5df2\u9023\u63a5\u7528\u6236\u7aef -32101=\u5df2\u4e2d\u65b7\u7528\u6236\u7aef\u7684\u9023\u63a5 -32102=\u7528\u6236\u7aef\u76ee\u524d\u6b63\u5728\u4e2d\u65b7\u9023\u7dda -32103=\u7121\u6cd5\u9023\u63a5\u5230\u4f3a\u670d\u5668 -32104=\u7528\u6236\u7aef\u672a\u9023\u63a5 -32105=\u6307\u5b9a\u7684 SocketFactory \u985e\u578b\u8207\u5206\u914d\u7ba1\u7406\u7cfb\u7d71 URI \u4e0d\u7b26 -32106=SSL \u914d\u7f6e\u932f\u8aa4 -32107=\u4e0d\u5bb9\u8a31\u8207\u56de\u547c\u65b9\u6cd5\u4e2d\u65b7\u9023\u7dda -32108=\u5c01\u5305\u7121\u6cd5\u8fa8\u8b58 -32109=\u9023\u7dda\u907a\u5931 -32110=\u9023\u63a5\u5df2\u5728\u9032\u884c\u4e2d -32111=\u5df2\u95dc\u9589\u7528\u6236\u7aef -32200=\u6301\u7e8c\u6027\u5df2\u5728\u4f7f\u7528\u4e2d -32201=\u8a18\u865f\u5df2\u5728\u4f7f\u7528\u4e2d -32202=\u592a\u591a\u767c\u4f48\u9032\u884c\u4e2d diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/security/SSLSocketFactoryFactory.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/security/SSLSocketFactoryFactory.java index 9f30009..ee89f19 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/security/SSLSocketFactoryFactory.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/security/SSLSocketFactoryFactory.java @@ -30,6 +30,7 @@ import java.util.Properties; import java.util.Set; import java.util.Vector; +import java.util.logging.Logger; import javax.net.ssl.KeyManager; import javax.net.ssl.KeyManagerFactory; @@ -39,7 +40,6 @@ import javax.net.ssl.TrustManagerFactory; import org.eclipse.paho.client.mqttv3.MqttSecurityException; -import org.eclipse.paho.client.mqttv3.logging.Logger; /** @@ -148,8 +148,6 @@ public class SSLSocketFactoryFactory { private static final String xorTag = "{xor}"; - private Logger logger = null; - /** * Not all of the JVM/Platforms support all of its @@ -189,7 +187,6 @@ public SSLSocketFactoryFactory() { */ public SSLSocketFactoryFactory(Logger logger) { this(); - this.logger = logger; } /** @@ -1105,7 +1102,6 @@ public boolean getClientAuthentication(String configID) { * @param configID * The configuration ID * @return An SSL context factory. - * @throws MqttDirectException */ private SSLContext getSSLContext(String configID) throws MqttSecurityException{ @@ -1116,12 +1112,7 @@ private SSLContext getSSLContext(String configID) if (protocol == null) { protocol = DEFAULT_PROTOCOL; } - if (logger != null) { - // 12000 "SSL initialization: configID = {0}, protocol = {1}" - logger.fine(CLASS_NAME, METHOD_NAME, "12000", new Object[] {configID!=null ? configID : "null (broker defaults)", - protocol}); - } - + String provider = getJSSEProvider(configID); try { if (provider == null) { @@ -1129,12 +1120,7 @@ private SSLContext getSSLContext(String configID) } else { ctx = SSLContext.getInstance(protocol, provider); } - if (logger != null) { - // 12001 "SSL initialization: configID = {0}, provider = {1}" - logger.fine(CLASS_NAME, METHOD_NAME, "12001", new Object[] {configID!=null ? configID : "null (broker defaults)", - ctx.getProvider().getName()}); - } - + String keyStoreName = getProperty(configID, KEYSTORE, null); KeyStore keyStore=null; KeyManagerFactory keyMgrFact=null; @@ -1161,29 +1147,14 @@ private SSLContext getSSLContext(String configID) */ keyStoreName = getProperty(configID, KEYSTORE, SYSKEYSTORE); } - if (logger != null) { - // 12004 "SSL initialization: configID = {0}, keystore = {1}" - logger.fine(CLASS_NAME, METHOD_NAME, "12004", new Object[]{configID!=null ? configID : "null (broker defaults)", - keyStoreName!=null ? keyStoreName : "null"}); - } - + char[] keyStorePwd=getKeyStorePassword(configID); - if (logger != null) { - // 12005 "SSL initialization: configID = {0}, keystore password = {1}" - logger.fine(CLASS_NAME, METHOD_NAME, "12005", new Object[]{configID!=null ? configID : "null (broker defaults)", - keyStorePwd!=null ? obfuscate(keyStorePwd) : "null"}); - } - + String keyStoreType=getKeyStoreType(configID); if(keyStoreType==null) { keyStoreType = KeyStore.getDefaultType(); } - if (logger != null) { - // 12006 "SSL initialization: configID = {0}, keystore type = {1}" - logger.fine(CLASS_NAME, METHOD_NAME, "12006", new Object[]{configID!=null ? configID : "null (broker defaults)", - keyStoreType!=null ? keyStoreType : "null"}); - } - + String keyMgrAlgo = KeyManagerFactory.getDefaultAlgorithm(); String keyMgrProvider = getKeyStoreProvider(configID); String keyManager = getKeyManager(configID); @@ -1200,14 +1171,6 @@ private SSLContext getSSLContext(String configID) } else { keyMgrFact = KeyManagerFactory.getInstance(keyMgrAlgo); } - if (logger != null) { - // 12010 "SSL initialization: configID = {0}, keystore manager algorithm = {1}" - logger.fine(CLASS_NAME, METHOD_NAME, "12010", new Object[]{configID!=null ? configID : "null (broker defaults)", - keyMgrAlgo!=null ? keyMgrAlgo : "null"}); - // 12009 "SSL initialization: configID = {0}, keystore manager provider = {1}" - logger.fine(CLASS_NAME, METHOD_NAME, "12009", new Object[]{configID!=null ? configID : "null (broker defaults)", - keyMgrFact.getProvider().getName()}); - } keyMgrFact.init(keyStore, keyStorePwd); keyMgr=keyMgrFact.getKeyManagers(); } catch (KeyStoreException e) { @@ -1226,30 +1189,15 @@ private SSLContext getSSLContext(String configID) // keystore loaded, keymanagers instantiated if possible // now the same for the truststore. String trustStoreName = getTrustStore(configID); - if (logger != null) { - // 12011 "SSL initialization: configID = {0}, truststore = {1}" - logger.fine(CLASS_NAME, METHOD_NAME, "12011", new Object[]{configID!=null ? configID : "null (broker defaults)", - trustStoreName!=null ? trustStoreName : "null"}); - } KeyStore trustStore=null; TrustManagerFactory trustMgrFact=null; TrustManager[] trustMgr=null; char[] trustStorePwd=getTrustStorePassword(configID); - if (logger != null) { - // 12012 "SSL initialization: configID = {0}, truststore password = {1}" - logger.fine(CLASS_NAME, METHOD_NAME, "12012", new Object[]{configID!=null ? configID : "null (broker defaults)", - trustStorePwd!=null ? obfuscate(trustStorePwd) : "null"}); - } String trustStoreType=getTrustStoreType(configID); if(trustStoreType==null) { trustStoreType = KeyStore.getDefaultType(); } - if (logger != null) { - // 12013 "SSL initialization: configID = {0}, truststore type = {1}" - logger.fine(CLASS_NAME, METHOD_NAME, "12013", new Object[]{configID!=null ? configID : "null (broker defaults)", - trustStoreType!=null ? trustStoreType : "null"}); - } - + String trustMgrAlgo = TrustManagerFactory.getDefaultAlgorithm(); String trustMgrProvider = getTrustStoreProvider(configID); String trustManager = getTrustManager(configID); @@ -1266,16 +1214,6 @@ private SSLContext getSSLContext(String configID) } else { trustMgrFact = TrustManagerFactory.getInstance(trustMgrAlgo); } - if (logger != null) { - - // 12017 "SSL initialization: configID = {0}, truststore manager algorithm = {1}" - logger.fine(CLASS_NAME, METHOD_NAME, "12017", new Object[]{configID!=null ? configID : "null (broker defaults)", - trustMgrAlgo!=null ? trustMgrAlgo : "null"}); - - // 12016 "SSL initialization: configID = {0}, truststore manager provider = {1}" - logger.fine(CLASS_NAME, METHOD_NAME, "12016", new Object[]{configID!=null ? configID : "null (broker defaults)", - trustMgrFact.getProvider().getName()}); - } trustMgrFact.init(trustStore); trustMgr=trustMgrFact.getTrustManagers(); } catch (KeyStoreException e) { @@ -1346,12 +1284,7 @@ public SSLSocketFactory createSocketFactory(String configID) throws MqttSecurityException { final String METHOD_NAME = "createSocketFactory"; SSLContext ctx = getSSLContext(configID); - if (logger != null) { - // 12020 "SSL initialization: configID = {0}, application-enabled cipher suites = {1}" - logger.fine(CLASS_NAME, METHOD_NAME, "12020", new Object[]{configID!=null ? configID : "null (broker defaults)", - getEnabledCipherSuites(configID)!=null ? getProperty(configID, CIPHERSUITES, null) : "null (using platform-enabled cipher suites)"}); - } - + return ctx.getSocketFactory(); } diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/websocket/WebSocketFrame.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/websocket/WebSocketFrame.java index 22166ff..b4fb820 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/websocket/WebSocketFrame.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/websocket/WebSocketFrame.java @@ -246,7 +246,6 @@ public static void appendLengthAndMask(ByteBuffer buffer, int length, byte[] mas * * @param buffer * @param length - * @param b */ private static void appendLength(ByteBuffer buffer, int length, boolean masked) { diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/websocket/WebSocketHandshake.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/websocket/WebSocketHandshake.java index 3e95ca5..4c1cc7a 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/websocket/WebSocketHandshake.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/websocket/WebSocketHandshake.java @@ -183,7 +183,6 @@ private void receiveHandshakeResponse(String key) throws IOException { /** * Returns a Hashmap of HTTP headers - * @param ArrayList of headers * @return A Hashmap of the headers */ private Map getHeaders(ArrayList headers){ diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/websocket/WebSocketReceiver.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/websocket/WebSocketReceiver.java index 2392f4d..aa68a4f 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/websocket/WebSocketReceiver.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/websocket/WebSocketReceiver.java @@ -21,13 +21,9 @@ import java.io.PipedOutputStream; import java.net.SocketTimeoutException; -import org.eclipse.paho.client.mqttv3.logging.Logger; -import org.eclipse.paho.client.mqttv3.logging.LoggerFactory; - public class WebSocketReceiver implements Runnable{ private static final String CLASS_NAME = WebSocketReceiver.class.getName(); - private Logger log = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT, CLASS_NAME); private boolean running = false; private boolean stopping = false; @@ -50,7 +46,6 @@ public WebSocketReceiver(InputStream input, PipedInputStream pipedInputStream) t public void start(String threadName){ final String methodName = "start"; //@TRACE 855=starting - log.fine(CLASS_NAME, methodName, "855"); synchronized (lifecycle) { if(!running) { running = true; @@ -70,7 +65,6 @@ public void stop() { boolean closed = false; synchronized (lifecycle) { //@TRACE 850=stopping - log.fine(CLASS_NAME,methodName, "850"); if(running) { running = false; receiving = false; @@ -90,7 +84,6 @@ public void stop() { } receiverThread = null; //@TRACE 851=stopped - log.fine(CLASS_NAME, methodName, "851"); } public void run() { @@ -99,7 +92,6 @@ public void run() { while (running && (input != null)) { try { //@TRACE 852=network read message - log.fine(CLASS_NAME, methodName, "852"); receiving = input.available() > 0; WebSocketFrame incomingFrame = new WebSocketFrame(input); if(!incomingFrame.isCloseFlag()){ diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/websocket/WebSocketSecureNetworkModule.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/websocket/WebSocketSecureNetworkModule.java index 6dccff2..64afee7 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/websocket/WebSocketSecureNetworkModule.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/websocket/WebSocketSecureNetworkModule.java @@ -26,14 +26,11 @@ import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.internal.SSLNetworkModule; -import org.eclipse.paho.client.mqttv3.logging.Logger; -import org.eclipse.paho.client.mqttv3.logging.LoggerFactory; public class WebSocketSecureNetworkModule extends SSLNetworkModule{ private static final String CLASS_NAME = WebSocketSecureNetworkModule.class.getName(); - private Logger log = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT, CLASS_NAME); - + private PipedInputStream pipedInputStream; private WebSocketReceiver webSocketReceiver; private String uri; @@ -56,7 +53,6 @@ public WebSocketSecureNetworkModule(SSLSocketFactory factory, String uri, String this.port = port; this.customWebSocketHeaders = customWebSocketHeaders; this.pipedInputStream = new PipedInputStream(); - log.setResourceName(clientId); } public void start() throws IOException, MqttException { diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/wire/MqttInputStream.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/wire/MqttInputStream.java index 670fab4..0522c20 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/wire/MqttInputStream.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/wire/MqttInputStream.java @@ -25,8 +25,6 @@ import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.internal.ClientState; import org.eclipse.paho.client.mqttv3.internal.ExceptionHelper; -import org.eclipse.paho.client.mqttv3.logging.Logger; -import org.eclipse.paho.client.mqttv3.logging.LoggerFactory; /** @@ -35,7 +33,6 @@ */ public class MqttInputStream extends InputStream { private final String CLASS_NAME = MqttInputStream.class.getName(); - private final Logger log = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT, CLASS_NAME); private ClientState clientState = null; private DataInputStream in; @@ -118,7 +115,6 @@ public MqttWireMessage readMqttWireMessage() throws IOException, MqttException { System.arraycopy(header,0,packet,0, header.length); message = MqttWireMessage.createWireMessage(packet); // @TRACE 301= received {0} - log.fine(CLASS_NAME, methodName, "301",new Object[] {message}); } } catch (SocketTimeoutException e) { // ignore socket read timeout diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/wire/MqttOutputStream.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/wire/MqttOutputStream.java index 1d02fc6..d11a4a8 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/wire/MqttOutputStream.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/internal/wire/MqttOutputStream.java @@ -21,8 +21,6 @@ import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.internal.ClientState; -import org.eclipse.paho.client.mqttv3.logging.Logger; -import org.eclipse.paho.client.mqttv3.logging.LoggerFactory; /** @@ -31,7 +29,6 @@ */ public class MqttOutputStream extends OutputStream { private static final String CLASS_NAME = MqttOutputStream.class.getName(); - private Logger log = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT, CLASS_NAME); private ClientState clientState = null; private BufferedOutputStream out; @@ -86,9 +83,6 @@ public void write(MqttWireMessage message) throws IOException, MqttException { offset += chunckSize; clientState.notifySentBytes(length); } - - // @TRACE 529= sent {0} - log.fine(CLASS_NAME, methodName, "529", new Object[]{message}); } } diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/JSR47Logger.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/JSR47Logger.java deleted file mode 100644 index b2f5937..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/JSR47Logger.java +++ /dev/null @@ -1,278 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2014 IBM Corp. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v2.0 - * and Eclipse Distribution License v1.0 which accompany this distribution. - * - * The Eclipse Public License is available at - * https://www.eclipse.org/legal/epl-2.0 - * and the Eclipse Distribution License is available at - * https://www.eclipse.org/org/documents/edl-v10.php - * - * Contributors: - * Dave Locke - initial API and implementation and/or initial documentation - */ -package org.eclipse.paho.client.mqttv3.logging; -import java.text.MessageFormat; -import java.util.MissingResourceException; -import java.util.ResourceBundle; -import java.util.logging.Handler; -import java.util.logging.LogRecord; -import java.util.logging.MemoryHandler; - -/** - * Implementation of the the logger interface that uses java.uti.logging - * - * A Logger that utilises Java's built in logging facility - java.util.logging. - *

A sample java.util.logging properties file - jsr47min.properties is provided that demonstrates - * how to run with a memory based trace facility that runs with minimal performance - * overhead. The memory buffer can be dumped when a log/trace record is written matching - * the MemoryHandlers trigger level or when the push method is invoked on the MemoryHandler. - * {@link org.eclipse.paho.client.mqttv3.util.Debug Debug} provides method to make it easy - * to dump the memory buffer as well as other useful debug info. - */ -public class JSR47Logger implements Logger { - private java.util.logging.Logger julLogger = null; - private ResourceBundle logMessageCatalog = null; - private ResourceBundle traceMessageCatalog = null; - private String catalogID = null; - private String resourceName = null; - private String loggerName = null; - - /** - * - * @param logMsgCatalog The resource bundle associated with this logger - * @param loggerID The suffix for the loggerName (will be appeneded to org.eclipse.paho.client.mqttv3 - * @param resourceContext A context for the logger e.g. clientID or appName... - */ - public void initialise(ResourceBundle logMsgCatalog, String loggerID, String resourceContext ) { - this.traceMessageCatalog = logMessageCatalog; - this.resourceName = resourceContext; -// loggerName = "org.eclipse.paho.client.mqttv3." + ((null == loggerID || 0 == loggerID.length()) ? "internal" : loggerID); - loggerName = loggerID; - this.julLogger = java.util.logging.Logger.getLogger(loggerName); - this.logMessageCatalog = logMsgCatalog; - this.traceMessageCatalog = logMsgCatalog; - this.catalogID = logMessageCatalog.getString("0"); - - } - - public void setResourceName(String logContext) { - this.resourceName = logContext; - } - - public boolean isLoggable(int level) { - return julLogger.isLoggable(mapJULLevel(level)); // || InternalTracer.isLoggable(level); - } - - public void severe(String sourceClass, String sourceMethod, String msg) { - log(SEVERE, sourceClass, sourceMethod, msg, null, null); - } - - public void severe(String sourceClass, String sourceMethod, String msg, Object[] inserts) { - log(SEVERE, sourceClass, sourceMethod, msg, inserts, null); - } - - public void severe(String sourceClass, String sourceMethod, String msg, Object[] inserts, Throwable thrown) { - log(SEVERE, sourceClass, sourceMethod, msg, inserts, thrown); - } - - public void warning(String sourceClass, String sourceMethod, String msg) { - log(WARNING, sourceClass, sourceMethod, msg, null, null); - } - - public void warning(String sourceClass, String sourceMethod, String msg, Object[] inserts) { - log(WARNING, sourceClass, sourceMethod, msg, inserts, null); - } - - public void warning(String sourceClass, String sourceMethod, String msg, Object[] inserts, Throwable thrown) { - log(WARNING, sourceClass, sourceMethod, msg, inserts, thrown); - } - - public void info(String sourceClass, String sourceMethod, String msg) { - log(INFO, sourceClass, sourceMethod, msg, null, null); - } - - public void info(String sourceClass, String sourceMethod, String msg, Object[] inserts) { - log(INFO, sourceClass, sourceMethod, msg, inserts, null); - } - - public void info(String sourceClass, String sourceMethod, String msg, Object[] inserts, Throwable thrown) { - log(INFO, sourceClass, sourceMethod, msg, inserts, thrown); - } - - public void config(String sourceClass, String sourceMethod, String msg) { - log(CONFIG, sourceClass, sourceMethod, msg, null, null); - } - - public void config(String sourceClass, String sourceMethod, String msg, Object[] inserts) { - log(CONFIG, sourceClass, sourceMethod, msg, inserts, null); - } - - public void config(String sourceClass, String sourceMethod, String msg, Object[] inserts, Throwable thrown) { - log(CONFIG, sourceClass, sourceMethod, msg, inserts, thrown); - } - - public void log(int level, String sourceClass, String sourceMethod, String msg, Object[] inserts, Throwable thrown) { -// InternalTracer.log(this.catalogID, level, sourceClass, sourceMethod, msg, inserts, thrown); - java.util.logging.Level julLevel = mapJULLevel(level); - if (julLogger.isLoggable(julLevel)) { - logToJsr47(julLevel, sourceClass, sourceMethod, this.catalogID, this.logMessageCatalog, msg, inserts, thrown); - } - } - -// public void setTrace(Trace trace) { -// InternalTracer.setTrace(trace); -// } - - public void fine(String sourceClass, String sourceMethod, String msg) { - trace(FINE, sourceClass, sourceMethod, msg, null, null); - } - - public void fine(String sourceClass, String sourceMethod, String msg, Object[] inserts) { - trace(FINE, sourceClass, sourceMethod, msg, inserts, null); - } - - public void fine(String sourceClass, String sourceMethod, String msg, Object[] inserts, Throwable ex) { - trace(FINE, sourceClass, sourceMethod, msg, inserts, ex); - } - - public void finer(String sourceClass, String sourceMethod, String msg) { - trace(FINER, sourceClass, sourceMethod, msg, null, null); - } - - public void finer(String sourceClass, String sourceMethod, String msg, Object[] inserts) { - trace(FINER, sourceClass, sourceMethod, msg, inserts, null); - } - - public void finer(String sourceClass, String sourceMethod, String msg, Object[] inserts, Throwable ex) { - trace(FINER, sourceClass, sourceMethod, msg, inserts, ex); - } - - public void finest(String sourceClass, String sourceMethod, String msg) { - trace(FINEST, sourceClass, sourceMethod, msg, null, null); - } - - public void finest(String sourceClass, String sourceMethod, String msg, Object[] inserts) { - trace(FINEST, sourceClass, sourceMethod, msg, inserts, null); - } - - public void finest(String sourceClass, String sourceMethod, String msg, Object[] inserts, Throwable ex) { - trace(FINEST, sourceClass, sourceMethod, msg, inserts, ex); - } - - - public void trace(int level, String sourceClass, String sourceMethod, String msg, Object[] inserts, Throwable ex) { - java.util.logging.Level julLevel = mapJULLevel(level); - boolean isJULLoggable = julLogger.isLoggable(julLevel); -// if (FINE == level || isJULLoggable || InternalTracer.isLoggable(level)) { -// InternalTracer.traceForced(level, sourceClass, sourceMethod, msg, inserts); -// } - if (isJULLoggable) { - logToJsr47(julLevel, sourceClass, sourceMethod, this.catalogID, this.traceMessageCatalog, msg, inserts, ex); - } - } - - - private String getResourceMessage(ResourceBundle messageCatalog, String msg) { - String message; - try { - message = messageCatalog.getString(msg); - } catch (MissingResourceException e) { - // This is acceptable, simply return the given msg string. - message = msg; - } - return message; - } - - private void logToJsr47(java.util.logging.Level julLevel, String sourceClass, String sourceMethod, String catalogName, - ResourceBundle messageCatalog, String msg, Object[] inserts, Throwable thrown) { -// LogRecord logRecord = new LogRecord(julLevel, msg); - String formattedWithArgs = msg; - if (!msg.contains("=====")) { - formattedWithArgs = MessageFormat.format(getResourceMessage(messageCatalog, msg), inserts); - } - LogRecord logRecord = new LogRecord(julLevel, resourceName + ": " +formattedWithArgs); - - logRecord.setSourceClassName(sourceClass); - logRecord.setSourceMethodName(sourceMethod); - logRecord.setLoggerName(loggerName); -// logRecord.setResourceBundleName(catalogName); -// logRecord.setResourceBundle(messageCatalog); -// if (null != inserts) { -// logRecord.setParameters(inserts); -// } - if (null != thrown) { - logRecord.setThrown(thrown); - } - - julLogger.log(logRecord); - } - - private java.util.logging.Level mapJULLevel(int level) { - java.util.logging.Level julLevel = null; - - switch (level) { - case SEVERE: - julLevel = java.util.logging.Level.SEVERE; - break; - case WARNING: - julLevel = java.util.logging.Level.WARNING; - break; - case INFO: - julLevel = java.util.logging.Level.INFO; - break; - case CONFIG: - julLevel = java.util.logging.Level.CONFIG; - break; - case FINE: - julLevel = java.util.logging.Level.FINE; - break; - case FINER: - julLevel = java.util.logging.Level.FINER; - break; - case FINEST: - julLevel = java.util.logging.Level.FINEST; - break; - - default: - } - - return julLevel; - } - - public String formatMessage(String msg, Object[] inserts) { - String formatString; - try { - formatString = logMessageCatalog.getString(msg); - } catch (MissingResourceException e) { - formatString = msg; - } - return formatString; - } - - public void dumpTrace() { - dumpMemoryTrace47(julLogger); - } - - protected static void dumpMemoryTrace47(java.util.logging.Logger logger) { - MemoryHandler mHand = null; - - if (logger!= null) { - Handler[] handlers = logger.getHandlers(); - - for (Handler handler : handlers) { - if (handler instanceof MemoryHandler) { - synchronized (handler) { - mHand = ((MemoryHandler) handler); - mHand.push(); - return; - } // synchronized (handler). - } - } // for handlers... - dumpMemoryTrace47(logger.getParent()); - } - } - -} diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/Logger.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/Logger.java deleted file mode 100644 index f69960e..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/Logger.java +++ /dev/null @@ -1,579 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2014 IBM Corp. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v2.0 - * and Eclipse Distribution License v1.0 which accompany this distribution. - * - * The Eclipse Public License is available at - * https://www.eclipse.org/legal/epl-2.0 - * and the Eclipse Distribution License is available at - * https://www.eclipse.org/org/documents/edl-v10.php - * - * Contributors: - * Dave Locke - initial API and implementation and/or initial documentation - */ -package org.eclipse.paho.client.mqttv3.logging; - -import java.util.ResourceBundle; - -/** - * A Logger object is used to send log and trace messages to a platform - * specific logging implementation. Loggers are named, using a hierarchical - * dot-separated name-space. - * Logger names can be arbitrary strings, but they should normally be based on - * the component or the package name of the logged component - * - * Logger objects may be obtained by calls on one of the getLogger factory - * methods. These will either create a new Logger or return a suitable existing - * Logger. - * - *

- * The int levels define a set of standard logging levels that can be used to - * control logging output. The logging levels are ordered and are specified by - * ordered integers. Enabling logging at a given level also enables logging at - * all higher levels. - *

- * Clients should use the the convenience methods such as severe() and fine() or - * one of the predefined level constants such as Logger.SEVERE and Logger.FINE - * with the appropriate log(int level...) or trace(int level...) methods. - *

- * The levels in descending order are:

- *
    - *
  • SEVERE (log - highest value)
  • - *
  • WARNING (log)
  • - *
  • INFO (log)
  • - *
  • CONFIG (log)
  • - *
  • FINE (trace)
  • - *
  • FINER (trace)
  • - *
  • FINEST (trace - lowest value)
  • - *
- * - */ -public interface Logger { - /** - * SEVERE is a message level indicating a serious failure. - *

- * In general SEVERE messages should describe events that are of - * considerable importance and which will prevent normal program execution. - * They should be reasonably intelligible to end users and to system - * administrators. - */ - int SEVERE = 1; - /** - * WARNING is a message level indicating a potential problem. - *

- * In general WARNING messages should describe events that will be of - * interest to end users or system managers, or which indicate potential - * problems. - */ - int WARNING = 2; - /** - * INFO is a message level for informational messages. - *

- * Typically INFO messages will be written to the console or its equivalent. - * So the INFO level should only be used for reasonably significant messages - * that will make sense to end users and system admins. - */ - int INFO = 3; - /** - * CONFIG is a message level for static configuration messages. - *

- * CONFIG messages are intended to provide a variety of static configuration - * information, to assist in debugging problems that may be associated with - * particular configurations. For example, CONFIG message might include the - * CPU type, the graphics depth, the GUI look-and-feel, etc. - */ - int CONFIG = 4; - /** - * FINE is a message level providing tracing information. - *

- * All of FINE, FINER, and FINEST are intended for relatively detailed - * tracing. The exact meaning of the three levels will vary between - * subsystems, but in general, FINEST should be used for the most voluminous - * detailed output, FINER for somewhat less detailed output, and FINE for - * the lowest volume (and most important) messages. - *

- * In general the FINE level should be used for information that will be - * broadly interesting to developers who do not have a specialized interest - * in the specific subsystem. - *

- * FINE messages might include things like minor (recoverable) failures. - * Issues indicating potential performance problems are also worth logging - * as FINE. - */ - int FINE = 5; - /** - * FINER indicates a fairly detailed tracing message. By default logging - * calls for entering, returning, or throwing an exception are traced at - * this level. - */ - int FINER = 6; - /** - * FINEST indicates a highly detailed tracing message. - */ - int FINEST = 7; - - void initialise(ResourceBundle messageCatalog, String loggerID, String resourceName); - - /** - * Set a name that can be used to provide context with each log record. - * This overrides the value passed in on initialise - * @param logContext The Log context name - */ - void setResourceName(String logContext); - - /** - * Check if a message of the given level would actually be logged by this - * logger. This check is based on the Loggers effective level, which may be - * inherited from its parent. - * - * @param level - * a message logging level. - * @return true if the given message level is currently being logged. - */ - boolean isLoggable(int level); - - /** - * Log a message, specifying source class and method, if the logger is - * currently enabled for the given message level. - * - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message localization catalog for the message or - * the actual message itself. During formatting, if the logger - * has a mapping for the msg string, then the msg string is - * replaced by the localized value. Otherwise the original msg - * string is used. - */ - void severe(String sourceClass, String sourceMethod, String msg); - - /** - * Log a message, specifying source class and method, with an array of - * object arguments, if the logger is currently enabled for the given - * message level. - * - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message localization catalog for the message or - * the actual message itself. During formatting, if the logger - * has a mapping for the msg string, then the msg string is - * replaced by the localized value. Otherwise the original msg - * string is used. The formatter uses java.text.MessageFormat - * style formatting to format parameters, so for example a format - * string "{0} {1}" would format two inserts into the message. - * @param inserts - * Array of parameters to the message. - */ - void severe(String sourceClass, String sourceMethod, String msg, Object[] inserts); - - /** - * Log a message, specifying source class and method, with an array of - * object arguments and a throwable, if the logger is currently enabled for - * the given message level. - * - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message localization catalog for the message or - * the actual message itself. During formatting, if the logger - * has a mapping for the msg string, then the msg string is - * replaced by the localized value. Otherwise the original msg - * string is used. The formatter uses java.text.MessageFormat - * style formatting to format parameters, so for example a format - * string "{0} {1}" would format two inserts into the message. - * @param inserts - * Array of parameters to the message. - * @param thrown - * Throwable associated with log message. - */ - void severe(String sourceClass, String sourceMethod, String msg, Object[] inserts, Throwable thrown); - - /** - * Log a message, specifying source class and method, if the logger is - * currently enabled for the given message level. - * - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message localization catalog for the message or - * the actual message itself. During formatting, if the logger - * has a mapping for the msg string, then the msg string is - * replaced by the localized value. Otherwise the original msg - * string is used. - */ - void warning(String sourceClass, String sourceMethod, String msg); - - /** - * Log a message, specifying source class and method, with an array of - * object arguments, if the logger is currently enabled for the given - * message level. - * - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message localization catalog for the message or - * the actual message itself. During formatting, if the logger - * has a mapping for the msg string, then the msg string is - * replaced by the localized value. Otherwise the original msg - * string is used. The formatter uses java.text.MessageFormat - * style formatting to format parameters, so for example a format - * string "{0} {1}" would format two inserts into the message. - * @param inserts - * Array of parameters to the message. - */ - void warning(String sourceClass, String sourceMethod, String msg, Object[] inserts); - - /** - * Log a message, specifying source class and method, with an array of - * object arguments and a throwable, if the logger is currently enabled for - * the given message level. - * - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message localization catalog for the message or - * the actual message itself. During formatting, if the logger - * has a mapping for the msg string, then the msg string is - * replaced by the localized value. Otherwise the original msg - * string is used. The formatter uses java.text.MessageFormat - * style formatting to format parameters, so for example a format - * string "{0} {1}" would format two inserts into the message. - * @param inserts - * Array of parameters to the message. - * @param thrown - * Throwable associated with log message. - */ - void warning(String sourceClass, String sourceMethod, String msg, Object[] inserts, Throwable thrown); - - /** - * Log a message, specifying source class and method, if the logger is - * currently enabled for the given message level. - * - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message localization catalog for the message or - * the actual message itself. During formatting, if the logger - * has a mapping for the msg string, then the msg string is - * replaced by the localized value. Otherwise the original msg - * string is used. - */ - void info(String sourceClass, String sourceMethod, String msg); - - /** - * Log a message, specifying source class and method, with an array of - * object arguments, if the logger is currently enabled for the given - * message level. - * - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message localization catalog for the message or - * the actual message itself. During formatting, if the logger - * has a mapping for the msg string, then the msg string is - * replaced by the localized value. Otherwise the original msg - * string is used. The formatter uses java.text.MessageFormat - * style formatting to format parameters, so for example a format - * string "{0} {1}" would format two inserts into the message. - * @param inserts - * Array of parameters to the message. - */ - void info(String sourceClass, String sourceMethod, String msg, Object[] inserts); - - /** - * Log a message, specifying source class and method, with an array of - * object arguments and a throwable, if the logger is currently enabled for - * the given message level. - * - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message localization catalog for the message or - * the actual message itself. During formatting, if the logger - * has a mapping for the msg string, then the msg string is - * replaced by the localized value. Otherwise the original msg - * string is used. The formatter uses java.text.MessageFormat - * style formatting to format parameters, so for example a format - * string "{0} {1}" would format two inserts into the message. - * @param inserts - * Array of parameters to the message. - * @param thrown - * Throwable associated with log message. - */ - void info(String sourceClass, String sourceMethod, String msg, Object[] inserts, Throwable thrown); - - /** - * Log a message, specifying source class and method, if the logger is - * currently enabled for the given message level. - * - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message localization catalog for the message or - * the actual message itself. During formatting, if the logger - * has a mapping for the msg string, then the msg string is - * replaced by the localized value. Otherwise the original msg - * string is used. - */ - void config(String sourceClass, String sourceMethod, String msg); - - /** - * Log a message, specifying source class and method, with an array of - * object arguments, if the logger is currently enabled for the given - * message level. - * - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message localization catalog for the message or - * the actual message itself. During formatting, if the logger - * has a mapping for the msg string, then the msg string is - * replaced by the localized value. Otherwise the original msg - * string is used. The formatter uses java.text.MessageFormat - * style formatting to format parameters, so for example a format - * string "{0} {1}" would format two inserts into the message. - * @param inserts - * Array of parameters to the message. - */ - void config(String sourceClass, String sourceMethod, String msg, Object[] inserts); - - /** - * Log a message, specifying source class and method, with an array of - * object arguments and a throwable, if the logger is currently enabled for - * the given message level. - * - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message localization catalog for the message or - * the actual message itself. During formatting, if the logger - * has a mapping for the msg string, then the msg string is - * replaced by the localized value. Otherwise the original msg - * string is used. The formatter uses java.text.MessageFormat - * style formatting to format parameters, so for example a format - * string "{0} {1}" would format two inserts into the message. - * @param inserts - * Array of parameters to the message. - * @param thrown - * Throwable associated with log message. - */ - void config(String sourceClass, String sourceMethod, String msg, Object[] inserts, Throwable thrown); - - /** - * Trace a message, specifying source class and method, if the logger is - * currently enabled for the given message level. - * - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message catalog for the message or the actual - * message itself. During formatting, if the logger has a mapping - * for the msg string, then the msg string is replaced by the - * value. Otherwise the original msg string is used. - */ - void fine(String sourceClass, String sourceMethod, String msg); - - /** - * Trace a message, specifying source class and method, with an array of - * object arguments, if the logger is currently enabled for the given - * message level. - * - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message catalog for the message or the actual - * message itself. During formatting, if the logger has a mapping - * for the msg string, then the msg string is replaced by the - * value. Otherwise the original msg string is used. The - * formatter uses java.text.MessageFormat style formatting to - * format parameters, so for example a format string "{0} {1}" - * would format two inserts into the message. - * @param inserts - * Array of parameters to the message. - */ - void fine(String sourceClass, String sourceMethod, String msg, Object[] inserts); - - void fine(String sourceClass, String sourceMethod, String msg, Object[] inserts, Throwable ex); - - /** - * Trace a message, specifying source class and method, if the logger is - * currently enabled for the given message level. - * - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message catalog for the message or the actual - * message itself. During formatting, if the logger has a mapping - * for the msg string, then the msg string is replaced by the - * value. Otherwise the original msg string is used. - */ - void finer(String sourceClass, String sourceMethod, String msg); - - /** - * Trace a message, specifying source class and method, with an array of - * object arguments, if the logger is currently enabled for the given - * message level. - * - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message catalog for the message or the actual - * message itself. During formatting, if the logger has a mapping - * for the msg string, then the msg string is replaced by the - * value. Otherwise the original msg string is used. The - * formatter uses java.text.MessageFormat style formatting to - * format parameters, so for example a format string "{0} {1}" - * would format two inserts into the message. - * @param inserts - * Array of parameters to the message. - */ - void finer(String sourceClass, String sourceMethod, String msg, Object[] inserts); - - void finer(String sourceClass, String sourceMethod, String msg, Object[] inserts, Throwable ex); - - /** - * Trace a message, specifying source class and method, if the logger is - * currently enabled for the given message level. - * - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message catalog for the message or the actual - * message itself. During formatting, if the logger has a mapping - * for the msg string, then the msg string is replaced by the - * value. Otherwise the original msg string is used. - */ - void finest(String sourceClass, String sourceMethod, String msg); - - /** - * Trace a message, specifying source class and method, with an array of - * object arguments, if the logger is currently enabled for the given - * message level. - * - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message catalog for the message or the actual - * message itself. During formatting, if the logger has a mapping - * for the msg string, then the msg string is replaced by the - * value. Otherwise the original msg string is used. The - * formatter uses java.text.MessageFormat style formatting to - * format parameters, so for example a format string "{0} {1}" - * would format two inserts into the message. - * @param inserts - * Array of parameters to the message. - */ - void finest(String sourceClass, String sourceMethod, String msg, Object[] inserts); - - void finest(String sourceClass, String sourceMethod, String msg, Object[] inserts, Throwable ex); - - /** - * Log a message, specifying source class and method, with an array of - * object arguments and a throwable, if the logger is currently enabled for - * the given message level. - * - * @param level - * One of the message level identifiers, e.g. SEVERE. - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message localization catalog for the message or - * the actual message itself. During formatting, if the logger - * has a mapping for the msg string, then the msg string is - * replaced by the localized value. Otherwise the original msg - * string is used. The formatter uses java.text.MessageFormat - * style formatting to format parameters, so for example a format - * string "{0} {1}" would format two inserts into the message. - * @param inserts - * Array of parameters to the message, may be null. - * @param thrown - * Throwable associated with log message. - */ - void log(int level, String sourceClass, String sourceMethod, String msg, Object[] inserts, Throwable thrown); - - /** - * Log a trace message, specifying source class and method, with an array of - * object arguments and a throwable, if the logger is currently enabled for - * the given message level. - * - * @param level - * One of the message level identifiers, e.g. SEVERE. - * @param sourceClass - * Name of class that issued the logging request. - * @param sourceMethod - * Name of method that issued the logging request. - * @param msg - * The key in the message catalog for the message or the actual - * message itself. During formatting, if the logger has a mapping - * for the msg string, then the msg string is replaced by the - * value. Otherwise the original msg string is used. The - * formatter uses java.text.MessageFormat style formatting to - * format parameters, so for example a format string "{0} {1}" - * would format two inserts into the message. - * @param inserts - * Array of parameters to the message, may be null. - * @param ex - * Throwable associated with log message. - */ - void trace(int level, String sourceClass, String sourceMethod, String msg, Object[] inserts, Throwable ex); - - /** - * Format a log message without causing it to be written to the log. - * - * @param msg - * The key in the message localization catalog for the message or - * the actual message itself. During formatting, if the logger - * has a mapping for the msg string, then the msg string is - * replaced by the localized value. Otherwise the original msg - * string is used. The formatter uses java.text.MessageFormat - * style formatting to format parameters, so for example a format - * string "{0} {1}" would format two inserts into the message. - * @param inserts - * Array of parameters to the message. - * @return The formatted message for the current locale. - */ - String formatMessage(String msg, Object[] inserts); - - void dumpTrace(); -} \ No newline at end of file diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/LoggerFactory.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/LoggerFactory.java deleted file mode 100644 index 7b4ef44..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/LoggerFactory.java +++ /dev/null @@ -1,155 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2014 IBM Corp. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v2.0 - * and Eclipse Distribution License v1.0 which accompany this distribution. - * - * The Eclipse Public License is available at - * https://www.eclipse.org/legal/epl-2.0 - * and the Eclipse Distribution License is available at - * https://www.eclipse.org/org/documents/edl-v10.php - * - * Contributors: - * Dave Locke - initial API and implementation and/or initial documentation - */ -package org.eclipse.paho.client.mqttv3.logging; - -import java.lang.reflect.Method; - -/** - * LoggerFactory will create a logger instance ready for use by the caller. - * - * The default is to create a logger that utilises the Java's built in - * logging facility java.util.logging (JSR47). It is possible to override - * this for systems where JSR47 is not available or an alternative logging - * facility is needed by using setLogger and passing the the class name of - * a logger that implements {@link Logger} - */ -import java.util.MissingResourceException; -import java.util.ResourceBundle; -/** - * A factory that returns a logger for use by the MQTT client. - * - * The default log and trace facility uses Java's build in log facility:- - * java.util.logging. For systems where this is not available or where - * an alternative logging framework is required the logging facility can be - * replaced using {@link LoggerFactory#setLogger(String)} - * which takes an implementation of the {@link Logger} - * interface. - */ -public class LoggerFactory { - /** - * Default message catalog. - */ - public final static String MQTT_CLIENT_MSG_CAT = "org.eclipse.paho.client.mqttv3.internal.nls.logcat"; - private static final String CLASS_NAME = LoggerFactory.class.getName(); - - private static String overrideloggerClassName = null; - /** - * Default logger that uses java.util.logging. - */ - private static String jsr47LoggerClassName = JSR47Logger.class.getName(); - - /** - * Find or create a logger for a named package/class. - * If a logger has already been created with the given name - * it is returned. Otherwise a new logger is created. By default a logger - * that uses java.util.logging will be returned. - * - * @param messageCatalogName the resource bundle containing the logging messages. - * @param loggerID unique name to identify this logger. - * @return a suitable Logger. - */ - public static Logger getLogger(String messageCatalogName, String loggerID) { - String loggerClassName = overrideloggerClassName; - Logger logger = null; - - if (loggerClassName == null) { - loggerClassName = jsr47LoggerClassName; - } -// logger = getJSR47Logger(ResourceBundle.getBundle(messageCatalogName), loggerID, null) ; - logger = getLogger(loggerClassName, ResourceBundle.getBundle(messageCatalogName), loggerID, null) ; -// } - - if (null == logger) { - throw new MissingResourceException("Error locating the logging class", CLASS_NAME, loggerID); - } - - return logger; - } - - - /** - * Return an instance of a logger - * - * @param the class name of the load to load - * @param messageCatalog the resource bundle containing messages - * @param loggerID an identifier for the logger - * @param resourceName a name or context to associate with this logger instance. - * @return a ready for use logger - */ - private static Logger getLogger(String loggerClassName, ResourceBundle messageCatalog, String loggerID, String resourceName) { //, FFDC ffdc) { - Logger logger = null; - Class logClass = null; - - try { - logClass = Class.forName(loggerClassName); - } catch (NoClassDefFoundError ncdfe) { - return null; - } catch (ClassNotFoundException cnfe) { - return null; - } - if (null != logClass) { - // Now instantiate the log - try { - logger = (Logger)logClass.newInstance(); - } catch (IllegalAccessException e) { - return null; - } catch (InstantiationException e) { - return null; - } catch (ExceptionInInitializerError e) { - return null; - } catch (SecurityException e) { - return null; - } - logger.initialise(messageCatalog, loggerID, resourceName); - } - - return logger; - } - - /** - * When run in JSR47, this allows access to the properties in the logging.properties - * file. - * If not run in JSR47, or the property isn't set, returns null. - * @param name the property to return - * @return the property value, or null if it isn't set or JSR47 isn't being used - */ - public static String getLoggingProperty(String name) { - String result = null; - try { - // Hide behind reflection as java.util.logging is guaranteed to be - // available. - Class logManagerClass = Class.forName("java.util.logging.LogManager"); - Method m1 = logManagerClass.getMethod("getLogManager", new Class[]{}); - Object logManagerInstance = m1.invoke(null, null); - Method m2 = logManagerClass.getMethod("getProperty", new Class[]{String.class}); - result = (String)m2.invoke(logManagerInstance,new Object[]{name}); - } catch(Exception e) { - // Any error, assume JSR47 isn't available and return null - result = null; - } - return result; - } - - /** - * Set the class name of the logger that the LoggerFactory will load - * If not set getLogger will attempt to create a logger - * appropriate for the platform. - * @param loggerClassName - Logger implementation class name to use. - */ - public static void setLogger(String loggerClassName) { - LoggerFactory.overrideloggerClassName = loggerClassName; - } -} \ No newline at end of file diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/SimpleLogFormatter.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/SimpleLogFormatter.java deleted file mode 100644 index db0aaca..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/SimpleLogFormatter.java +++ /dev/null @@ -1,104 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 IBM Corp. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v2.0 - * and Eclipse Distribution License v1.0 which accompany this distribution. - * - * The Eclipse Public License is available at - * https://www.eclipse.org/legal/epl-2.0 - * and the Eclipse Distribution License is available at - * https://www.eclipse.org/org/documents/edl-v10.php - */ - -package org.eclipse.paho.client.mqttv3.logging; - -import java.io.PrintWriter; -import java.io.StringWriter; -import java.text.MessageFormat; -import java.util.Date; -import java.util.logging.Formatter; -import java.util.logging.LogRecord; - -/** - * SimpleLogFormatter prints a single line - * log record in human readable form. - */ -public class SimpleLogFormatter extends Formatter { - - private static final String LS = System.getProperty("line.separator"); - /** - * Constructs a SimpleFormatter object. - */ - public SimpleLogFormatter() { - super(); - } - - /** - * Format the logrecord as a single line with well defined columns. - */ - public String format(LogRecord r) { - StringBuffer sb = new StringBuffer(); - sb.append(r.getLevel().getName()).append("\t"); - sb.append(MessageFormat.format("{0, date, yy-MM-dd} {0, time, kk:mm:ss.SSSS} ", - new Object[] { new Date(r.getMillis()) })+"\t"); - String cnm = r.getSourceClassName(); - String cn=""; - if (cnm != null) { - int cnl = cnm.length(); - if (cnl>20) { - cn = r.getSourceClassName().substring(cnl-19); - } else { - char[] sp = {' '}; - StringBuffer sb1= new StringBuffer().append(cnm); - cn = sb1.append(sp,0, 1).toString(); - } - } - sb.append(cn).append("\t").append(" "); - sb.append(left(r.getSourceMethodName(),23,' ')).append("\t"); - sb.append(r.getThreadID()).append("\t"); - sb.append(formatMessage(r)).append(LS); - if (null != r.getThrown()) { - sb.append("Throwable occurred: "); - Throwable t = r.getThrown(); - PrintWriter pw = null; - try { - StringWriter sw = new StringWriter(); - pw = new PrintWriter(sw); - t.printStackTrace(pw); - sb.append(sw.toString()); - } finally { - if (pw != null) { - try { - pw.close(); - } catch (Exception e) { - // ignore - } - } - } - } - return sb.toString(); - } - - /** - * Left justify a string. - * - * @param s the string to justify - * @param width the field width to justify within - * @param fillChar the character to fill with - * - * @return the justified string. - */ - public static String left(String s, int width, char fillChar) { - if (s.length() >= width) { - return s; - } - StringBuffer sb = new StringBuffer(width); - sb.append(s); - for (int i = width - s.length(); --i >= 0;) { - sb.append(fillChar); - } - return sb.toString(); - } - -} diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/jsr47min.properties b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/jsr47min.properties deleted file mode 100644 index c10ad67..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/jsr47min.properties +++ /dev/null @@ -1,82 +0,0 @@ -# Properties file which configures the operation of the JDK logging facility. -# -# The configuration in this file is the suggesgted configuration -# for collecting trace for helping debug problems related to the -# Paho MQTT client. It configures trace to be continuosly collected -# in memory with minimal impact on performance. -# -# When the push trigger (by default a Severe level message) or a -# specific request is made to "push" the in memory trace then it -# is "pushed" to the configured target handler. By default -# this is the standard java.util.logging.FileHandler. The Paho Debug -# class can be used to push the memory trace to its target -# -# To enable trace either: -# - use this properties file as is and set the logging facility up -# to use it by configuring the util logging system property e.g. -# -# >java -Djava.util.logging.config.file=\jsr47min.properties -# -# - This contents of this file can also be merged with another -# java.util.logging config file to ensure provide wider logging -# and trace including Paho trace - -# Global logging properties. -# ------------------------------------------ -# The set of handlers to be loaded upon startup. -# Comma-separated list of class names. -# - Root handlers are not enabled by default - just handlers on the Paho packages. -#handlers=java.util.logging.MemoryHandler,java.util.logging.FileHandler, java.util.logging.ConsoleHandler - -# Default global logging level. -# Loggers and Handlers may override this level -#.level=INFO - -# Loggers -# ------------------------------------------ -# A memoryhandler is attached to the paho packages -# and the level specified to collected all trace related -# to paho packages. This will override any root/global -# level handlers if set. -org.eclipse.paho.mqttv5.client.handlers=java.util.logging.MemoryHandler -org.eclipse.paho.mqttv5.client.level=ALL -# It is possible to set more granular trace on a per class basis e.g. -#org.eclipse.paho.mqttv5.client.internal.ClientComms.level=ALL - -# Handlers -# ----------------------------------------- -# Note: the target handler that is associated with the MemoryHandler is not a root handler -# and hence not returned when getting the handlers from root. It appears accessing -# target handler programatically is not possible as target is a private variable in -# class MemoryHandler -java.util.logging.MemoryHandler.level=ALL -java.util.logging.MemoryHandler.size=10000 -java.util.logging.MemoryHandler.push=ALL -java.util.logging.MemoryHandler.target=java.util.logging.FileHandler -#java.util.logging.MemoryHandler.target=java.util.logging.ConsoleHandler - - -# --- FileHandler --- -# Override of global logging level -java.util.logging.FileHandler.level=ALL - -# Naming style for the output file: -# (The output file is placed in the directory -# defined by the "user.home" System property.) -# See java.util.logging for more options -java.util.logging.FileHandler.pattern=%h/ibm/paho/trace/paho%u.log - -# Limiting size of output file in bytes: -java.util.logging.FileHandler.limit=200000 - -# Number of output files to cycle through, by appending an -# integer to the base file name: -java.util.logging.FileHandler.count=3 - -java.util.logging.FileHandler.formatter=org.eclipse.paho.client.mqttv3.logging.SimpleLogFormatter - -# --- ConsoleHandler --- -# Override of global logging level -#java.util.logging.ConsoleHandler.level=INFO -#java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter -#java.util.logging.ConsoleHandler.formatter=org.eclipse.paho.client.mqttv3.logging.SimpleLogFormatter diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/package.html b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/package.html deleted file mode 100644 index a679cf1..0000000 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/logging/package.html +++ /dev/null @@ -1,18 +0,0 @@ - -Provides facilities to write and format log and trace to help debug problems. - -

The default log and trace facility uses Java's build in log facility:- -java.util.logging. For systems where this is not available or where -an alternative logging framework is required the logging facility can be -replaced using {@link org.eclipse.paho.client.mqttv3.logging.LoggerFactory#setLogger(String)} -which takes an implementation of the {@link org.eclipse.paho.client.mqttv3.logging.Logger} -interface. - -

A sample java.util.logging properties file - jsr47min.properties is provided that demonstrates -how to run with a memory based trace facility that runs with minimal performance -overhead. The memory buffer can be dumped when a log/trace record is written matching -the MemoryHandlers trigger level or when the push method is invoked on the MemoryHandler. -{@link org.eclipse.paho.client.mqttv3.util.Debug Debug} provides method to make it easy -to dump the memory buffer as well as other useful debug info. - - \ No newline at end of file diff --git a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/util/Debug.java b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/util/Debug.java index 09b3104..6f272f8 100644 --- a/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/util/Debug.java +++ b/puymvpjava/src/main/java/org/eclipse/paho/client/mqttv3/util/Debug.java @@ -19,8 +19,6 @@ import java.util.Properties; import org.eclipse.paho.client.mqttv3.internal.ClientComms; -import org.eclipse.paho.client.mqttv3.logging.Logger; -import org.eclipse.paho.client.mqttv3.logging.LoggerFactory; /** * Utility to help debug problems with the Paho MQTT client @@ -34,7 +32,6 @@ public class Debug { private static final String CLASS_NAME = ClientComms.class.getName(); - private Logger log = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT,CLASS_NAME); private static final String separator = "=============="; private static final String lineSep = System.getProperty("line.separator","\n"); @@ -49,7 +46,6 @@ public class Debug { public Debug(String clientID, ClientComms comms) { this.clientID = clientID; this.comms = comms; - log.setResourceName(clientID); } /** @@ -73,17 +69,13 @@ public void dumpClientDebug() { public void dumpBaseDebug() { dumpVersion(); dumpSystemProperties(); - dumpMemoryTrace(); } /** * If memory trace is being used a request is made to push it * to the target handler. */ - protected void dumpMemoryTrace() { - log.dumpTrace(); - } - + /** * Dump information that show the version of the MQTT client being used. */ @@ -93,7 +85,6 @@ protected void dumpVersion() { vInfo.append(left("Version",20,' ') + ": "+ ClientComms.VERSION + lineSep); vInfo.append(left("Build Level",20,' ') + ": "+ ClientComms.BUILD_LEVEL + lineSep); vInfo.append(separator+separator+separator+lineSep); - log.fine(CLASS_NAME,"dumpVersion", vInfo.toString()); } /** @@ -102,7 +93,6 @@ protected void dumpVersion() { public void dumpSystemProperties() { Properties sysProps = System.getProperties(); - log.fine(CLASS_NAME,"dumpSystemProperties", dumpProperties(sysProps, "SystemProperties").toString()); } /** @@ -112,7 +102,6 @@ public void dumpClientState() { Properties props = null; if (comms != null && comms.getClientState() != null ) { props = comms.getClientState().getDebug(); - log.fine(CLASS_NAME,"dumpClientState", dumpProperties(props, clientID + " : ClientState").toString()); } } @@ -123,7 +112,6 @@ public void dumpClientComms() { Properties props = null; if (comms != null) { props = comms.getDebug(); - log.fine(CLASS_NAME,"dumpClientComms", dumpProperties(props, clientID + " : ClientComms").toString()); } } @@ -134,7 +122,6 @@ public void dumpConOptions() { Properties props = null; if (comms != null) { props = comms.getConOptions().getDebug(); - log.fine(CLASS_NAME,"dumpConOptions", dumpProperties(props, clientID + " : Connect Options").toString()); } }