static private String toString(MQTTFrame frame) {
if( frame == null )
return null;
try {
switch (frame.messageType()) {
case PINGREQ.TYPE: return new PINGREQ().decode(frame).toString();
case PINGRESP.TYPE: return new PINGRESP().decode(frame).toString();
case CONNECT.TYPE: return new CONNECT().decode(frame).toString();
case DISCONNECT.TYPE: return new DISCONNECT().decode(frame).toString();
case SUBSCRIBE.TYPE: return new SUBSCRIBE().decode(frame).toString();
case UNSUBSCRIBE.TYPE: return new UNSUBSCRIBE().decode(frame).toString();