netty-确定客户端和微信端的沟通方式
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
package com.sv.netty.config;
|
||||
|
||||
/**
|
||||
* 会话中存储的客户端对象
|
||||
*
|
||||
* @author peakren
|
||||
* @since 16/05/2017 11:09 PM
|
||||
*/
|
||||
public class ChannelParam {
|
||||
|
||||
/**
|
||||
* 设备ip
|
||||
*/
|
||||
private String clientIp;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
private String deviceName;
|
||||
|
||||
/**
|
||||
* 设备所在场馆
|
||||
*/
|
||||
private Integer venueId;
|
||||
|
||||
public ChannelParam(String clientIP) {
|
||||
this.clientIp = clientIP;
|
||||
}
|
||||
|
||||
public String getClientIp() {
|
||||
return clientIp;
|
||||
}
|
||||
|
||||
public void setClientIp(String clientIp) {
|
||||
this.clientIp = clientIp;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public Integer getVenueId() {
|
||||
return venueId;
|
||||
}
|
||||
|
||||
public void setVenueId(Integer venueId) {
|
||||
this.venueId = venueId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.sv.netty.config;
|
||||
|
||||
import io.netty.util.AttributeKey;
|
||||
|
||||
public interface NettyConstant {
|
||||
String SERVER_IP = "120.27.209.4";
|
||||
Integer SERVER_PORT = 56791;
|
||||
|
||||
/**
|
||||
* session中存储终端发送的额外参数
|
||||
*/
|
||||
public static AttributeKey<ChannelParam> CHANNEL_PARAM = AttributeKey.newInstance("CHANNEL_PARAM");
|
||||
|
||||
public final static String SPIT_WORD = "#";
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user