资源简介
物联网(Internet of Things,IoT)最近曝光率越来越高。虽然HTTP是网页的事实标准,不过机器之间(Machine-to-Machine,M2M)的大规模沟通需要不同的模式:之前的请求/回答(Request/Response)模式不再合适,取而代之的是发布/订阅(Publish/Subscribe)模式。这就是轻量级、可扩展的MQTT(Message Queuing Telemetry Transport)可以施展拳脚的舞台。
代码片段和文件信息
package com.mqtt.controller;
import java.io.IOException;
import java.util.Map;
import java.util.Set;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mqtt.controller.mqtt.MqttUtli;
import io.netty.channel.socket.SocketChannel;
@WebServlet(“/getstate“)
public class getstate extends HttpServlet {
private static final long serialVersionUID = 1L;
public getstate() {
super();
// TODO Auto-generated constructor stub
}
protected void doGet(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
// TODO Auto-generated method stub
response.setContentType(“text/html;charset=utf-8“);
response. setCharacterEncoding(“UTF-8“);
String zt = request.getParameter(“zt“).trim();
String con = request.getParameter(“con“).trim();
MqttUtli.sendMsg(zt con);
response.getWriter().append(“正在获取“);
}
protected void doPost(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
// TODO Auto-generated method stub
doGet(request response);
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-03-15 14:50 MQTT_DEMO\
文件 658 2017-11-20 17:21 MQTT_DEMO\.classpath
文件 1042 2017-11-15 11:25 MQTT_DEMO\.project
目录 0 2018-03-15 14:50 MQTT_DEMO\.settings\
文件 567 2017-08-18 10:20 MQTT_DEMO\.settings\.jsdtscope
文件 364 2017-08-18 10:20 MQTT_DEMO\.settings\org.eclipse.jdt.core.prefs
文件 117 2017-11-15 11:40 MQTT_DEMO\.settings\org.eclipse.jst.j2ee.ejb.annotations.xdoclet.prefs
文件 495 2017-11-15 11:40 MQTT_DEMO\.settings\org.eclipse.wst.common.component
文件 305 2017-10-10 11:35 MQTT_DEMO\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2017-08-18 10:20 MQTT_DEMO\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2017-08-18 10:20 MQTT_DEMO\.settings\org.eclipse.wst.jsdt.ui.superType.name
文件 87 2017-11-15 11:23 MQTT_DEMO\.settings\org.eclipse.wst.ws.service.policy.prefs
目录 0 2018-03-15 14:50 MQTT_DEMO\build\
目录 0 2018-03-15 14:50 MQTT_DEMO\build\classes\
目录 0 2018-03-15 14:50 MQTT_DEMO\build\classes\com\
目录 0 2018-03-15 14:50 MQTT_DEMO\build\classes\com\mqtt\
目录 0 2018-03-15 14:50 MQTT_DEMO\build\classes\com\mqtt\controller\
文件 1700 2018-03-07 11:06 MQTT_DEMO\build\classes\com\mqtt\controller\getstate.class
目录 0 2018-03-15 14:50 MQTT_DEMO\build\classes\com\mqtt\controller\mqtt\
文件 1427 2018-03-07 11:06 MQTT_DEMO\build\classes\com\mqtt\controller\mqtt\MqttUtli$1.class
文件 1920 2018-03-07 11:06 MQTT_DEMO\build\classes\com\mqtt\controller\mqtt\MqttUtli$2.class
文件 1313 2018-03-07 11:06 MQTT_DEMO\build\classes\com\mqtt\controller\mqtt\MqttUtli$3$1.class
文件 1746 2018-03-07 11:06 MQTT_DEMO\build\classes\com\mqtt\controller\mqtt\MqttUtli$3$2.class
文件 2071 2018-03-07 11:06 MQTT_DEMO\build\classes\com\mqtt\controller\mqtt\MqttUtli$3.class
文件 1630 2018-03-07 11:06 MQTT_DEMO\build\classes\com\mqtt\controller\mqtt\MqttUtli$4.class
文件 3086 2018-03-07 11:06 MQTT_DEMO\build\classes\com\mqtt\controller\mqtt\MqttUtli.class
目录 0 2018-03-15 14:50 MQTT_DEMO\src\
目录 0 2018-03-15 14:50 MQTT_DEMO\src\com\
目录 0 2018-03-15 14:50 MQTT_DEMO\src\com\mqtt\
目录 0 2018-03-15 14:50 MQTT_DEMO\src\com\mqtt\controller\
文件 1311 2017-11-15 11:38 MQTT_DEMO\src\com\mqtt\controller\getstate.java
............此处省略578个文件信息
相关资源
- 利用apache-apollo-1.7.1创建MQTT broker和服
- 最新Android Studio3.0.1版收发MQTT消息
- mqtt详细
- mqtt + webScoket + apollo 具体
- android MQTT的使用及demo
- MQTT协议在Android的使用demo
- Android集成消息推送之MQTT
- send_mqtt.zip
- MQTT jar包 wmqtt.jar
- MQTT消息队列mosquitto的java方式实现客户
- org.eclipse.paho.client.mqttv3-1.0.1
- 基于Eclipse paho的MQTT java客户端
- MQTT JAVA jar包 wmqtt.jar
- MQTT相关java代码实现
- mqtt android使用源码
- org.eclipse.paho.android.service-1.1.0.jar
- mqtt的android端jar包
- mqtt jar包
- mqtt-spy 调试工具
- org.eclipse.paho.client.mqttv3-1.0.1.jar
- mqtt-xmeter-jar-with-dependencies.jar
- Android实现MQTT传输
- mqtt-client-1.7-uber.jar
- android 安卓mqtt 收发APP
- java 连接阿里云的mqtt服务(客户端源
- mqtt接收数据并保存
- apollo 源码需要的jar包
- Android MQTT Demo(阿里云)
- mqtt java客户端开发所使用的jar包
- moquette-mqtt源码
评论
共有 条评论