code: @Override
      public final Future<Void> sendMessage(Object message) throws IOException {
  
          checkNativeSessionInitialized();
  
          if (logger.isTraceEnabled()) {
              logger.trace("Sending " + message + ", " + this);
          }
  
          if (message instanceof TextMessage) {
              return sendTextMessage((TextMessage) message);
          } else if (message instanceof BinaryMessage) {
              return sendBinaryMessage((BinaryMessage) message);
          } else if (message instanceof PingMessage) {
              return sendPingMessage((PingMessage) message);
          } else if (message instanceof PongMessage) {
              return sendPongMessage((PongMessage) message);
          }
          return sendObjectMessage(message);
      }
docs: {@inheritDoc}