mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-25 22:47:49 +08:00
优化架构,获取设备注册时的设备相关信息
This commit is contained in:
parent
79dc7e79d2
commit
9494b6dc85
@ -13,6 +13,8 @@ import io.netty.channel.ChannelHandlerContext;
|
|||||||
import io.netty.handler.codec.ByteToMessageDecoder;
|
import io.netty.handler.codec.ByteToMessageDecoder;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -25,6 +27,12 @@ import java.util.List;
|
|||||||
public class Jt808Decoder extends ByteToMessageDecoder {
|
public class Jt808Decoder extends ByteToMessageDecoder {
|
||||||
private final static Logger log = LoggerFactory.getLogger(Jt808Decoder.class);
|
private final static Logger log = LoggerFactory.getLogger(Jt808Decoder.class);
|
||||||
|
|
||||||
|
private ApplicationEventPublisher applicationEventPublisher = null;
|
||||||
|
|
||||||
|
public Jt808Decoder(ApplicationEventPublisher applicationEventPublisher) {
|
||||||
|
this.applicationEventPublisher = applicationEventPublisher;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
|
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
|
||||||
Session session = ctx.channel().attr(Session.KEY).get();
|
Session session = ctx.channel().attr(Session.KEY).get();
|
||||||
@ -51,6 +59,10 @@ public class Jt808Decoder extends ByteToMessageDecoder {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Rs decode = handler.decode(buf, header, session);
|
Rs decode = handler.decode(buf, header, session);
|
||||||
|
ApplicationEvent applicationEvent = handler.getEvent();
|
||||||
|
if (applicationEvent != null) {
|
||||||
|
applicationEventPublisher.publishEvent(applicationEvent);
|
||||||
|
}
|
||||||
if (decode != null) {
|
if (decode != null) {
|
||||||
out.add(decode);
|
out.add(decode);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,6 +19,7 @@ import io.netty.handler.timeout.IdleStateHandler;
|
|||||||
import io.netty.util.concurrent.Future;
|
import io.netty.util.concurrent.Future;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@ -35,11 +36,13 @@ public class TcpServer {
|
|||||||
private boolean isRunning = false;
|
private boolean isRunning = false;
|
||||||
private EventLoopGroup bossGroup = null;
|
private EventLoopGroup bossGroup = null;
|
||||||
private EventLoopGroup workerGroup = null;
|
private EventLoopGroup workerGroup = null;
|
||||||
|
private ApplicationEventPublisher applicationEventPublisher = null;
|
||||||
|
|
||||||
private final ByteBuf DECODER_JT808 = Unpooled.wrappedBuffer(new byte[]{0x7e});
|
private final ByteBuf DECODER_JT808 = Unpooled.wrappedBuffer(new byte[]{0x7e});
|
||||||
|
|
||||||
public TcpServer(Integer port) {
|
public TcpServer(Integer port, ApplicationEventPublisher applicationEventPublisher) {
|
||||||
this.port = port;
|
this.port = port;
|
||||||
|
this.applicationEventPublisher = applicationEventPublisher;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startTcpServer() {
|
private void startTcpServer() {
|
||||||
@ -60,7 +63,7 @@ public class TcpServer {
|
|||||||
channel.pipeline()
|
channel.pipeline()
|
||||||
.addLast(new IdleStateHandler(10, 0, 0, TimeUnit.MINUTES))
|
.addLast(new IdleStateHandler(10, 0, 0, TimeUnit.MINUTES))
|
||||||
.addLast(new DelimiterBasedFrameDecoder(1024 * 2, DECODER_JT808))
|
.addLast(new DelimiterBasedFrameDecoder(1024 * 2, DECODER_JT808))
|
||||||
.addLast(new Jt808Decoder())
|
.addLast(new Jt808Decoder(applicationEventPublisher))
|
||||||
.addLast(new Jt808Encoder())
|
.addLast(new Jt808Encoder())
|
||||||
.addLast(new Jt808EncoderCmd())
|
.addLast(new Jt808EncoderCmd())
|
||||||
.addLast(new Jt808Handler());
|
.addLast(new Jt808Handler());
|
||||||
|
|||||||
@ -2,8 +2,10 @@ package com.genersoft.iot.vmp.jt1078.config;
|
|||||||
|
|
||||||
import com.genersoft.iot.vmp.jt1078.cmd.JT1078Template;
|
import com.genersoft.iot.vmp.jt1078.cmd.JT1078Template;
|
||||||
import com.genersoft.iot.vmp.jt1078.codec.netty.TcpServer;
|
import com.genersoft.iot.vmp.jt1078.codec.netty.TcpServer;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.core.annotation.Order;
|
import org.springframework.core.annotation.Order;
|
||||||
@ -18,9 +20,12 @@ import org.springframework.core.annotation.Order;
|
|||||||
@ConditionalOnProperty(value = "jt1078.enable", havingValue = "true")
|
@ConditionalOnProperty(value = "jt1078.enable", havingValue = "true")
|
||||||
public class JT1078AutoConfiguration {
|
public class JT1078AutoConfiguration {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ApplicationEventPublisher applicationEventPublisher;
|
||||||
|
|
||||||
@Bean(initMethod = "start", destroyMethod = "stop")
|
@Bean(initMethod = "start", destroyMethod = "stop")
|
||||||
public TcpServer jt1078Server(@Value("${jt1078.port}") Integer port) {
|
public TcpServer jt1078Server(@Value("${jt1078.port}") Integer port) {
|
||||||
return new TcpServer(port);
|
return new TcpServer(port, applicationEventPublisher);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
|||||||
@ -33,7 +33,7 @@ public class JT1078Controller {
|
|||||||
public WVPResult<?> startLive(@PathVariable String deviceId, @PathVariable String channelId) {
|
public WVPResult<?> startLive(@PathVariable String deviceId, @PathVariable String channelId) {
|
||||||
J9101 j9101 = new J9101();
|
J9101 j9101 = new J9101();
|
||||||
j9101.setChannel(Integer.valueOf(channelId));
|
j9101.setChannel(Integer.valueOf(channelId));
|
||||||
j9101.setIp("192.168.1.1");
|
j9101.setIp("192.168.1.3");
|
||||||
j9101.setRate(1);
|
j9101.setRate(1);
|
||||||
j9101.setTcpPort(7618);
|
j9101.setTcpPort(7618);
|
||||||
j9101.setUdpPort(7618);
|
j9101.setUdpPort(7618);
|
||||||
|
|||||||
91
src/main/java/com/genersoft/iot/vmp/jt1078/event/RegisterEvent.java
Executable file
91
src/main/java/com/genersoft/iot/vmp/jt1078/event/RegisterEvent.java
Executable file
@ -0,0 +1,91 @@
|
|||||||
|
package com.genersoft.iot.vmp.jt1078.event;
|
||||||
|
|
||||||
|
import com.genersoft.iot.vmp.gb28181.bean.DeviceAlarm;
|
||||||
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册事件
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class RegisterEvent extends ApplicationEvent {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public RegisterEvent(Object source) {
|
||||||
|
super(source);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private int provinceId;
|
||||||
|
|
||||||
|
private int cityId;
|
||||||
|
|
||||||
|
private String makerId;
|
||||||
|
|
||||||
|
private String deviceModel;
|
||||||
|
|
||||||
|
private String deviceId;
|
||||||
|
|
||||||
|
private int plateColor;
|
||||||
|
|
||||||
|
private String plateNo;
|
||||||
|
|
||||||
|
|
||||||
|
public int getProvinceId() {
|
||||||
|
return provinceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProvinceId(int provinceId) {
|
||||||
|
this.provinceId = provinceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCityId() {
|
||||||
|
return cityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCityId(int cityId) {
|
||||||
|
this.cityId = cityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMakerId() {
|
||||||
|
return makerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMakerId(String makerId) {
|
||||||
|
this.makerId = makerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeviceModel() {
|
||||||
|
return deviceModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceModel(String deviceModel) {
|
||||||
|
this.deviceModel = deviceModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeviceId() {
|
||||||
|
return deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceId(String deviceId) {
|
||||||
|
this.deviceId = deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPlateColor() {
|
||||||
|
return plateColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPlateColor(int plateColor) {
|
||||||
|
this.plateColor = plateColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPlateNo() {
|
||||||
|
return plateNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPlateNo(String plateNo) {
|
||||||
|
this.plateNo = plateNo;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package com.genersoft.iot.vmp.jt1078.event.eventListener;
|
||||||
|
|
||||||
|
import com.genersoft.iot.vmp.gb28181.event.alarm.AlarmEvent;
|
||||||
|
import com.genersoft.iot.vmp.jt1078.event.RegisterEvent;
|
||||||
|
import org.springframework.context.ApplicationListener;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class RegisterEventListener implements ApplicationListener<RegisterEvent> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onApplicationEvent(RegisterEvent event) {
|
||||||
|
System.out.println("收到设备注册: "+ event.getDeviceId());
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -8,6 +8,7 @@ import com.genersoft.iot.vmp.jt1078.session.Session;
|
|||||||
import com.genersoft.iot.vmp.jt1078.session.SessionManager;
|
import com.genersoft.iot.vmp.jt1078.session.SessionManager;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.ByteBufUtil;
|
import io.netty.buffer.ByteBufUtil;
|
||||||
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端通用应答
|
* 终端通用应答
|
||||||
@ -47,4 +48,9 @@ public class J0001 extends Re {
|
|||||||
public int getResult() {
|
public int getResult() {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplicationEvent getEvent() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import com.genersoft.iot.vmp.jt1078.proc.response.J8001;
|
|||||||
import com.genersoft.iot.vmp.jt1078.proc.response.Rs;
|
import com.genersoft.iot.vmp.jt1078.proc.response.Rs;
|
||||||
import com.genersoft.iot.vmp.jt1078.session.Session;
|
import com.genersoft.iot.vmp.jt1078.session.Session;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端心跳
|
* 终端心跳
|
||||||
@ -29,4 +30,9 @@ public class J0002 extends Re {
|
|||||||
j8001.setResult(J8001.SUCCESS);
|
j8001.setResult(J8001.SUCCESS);
|
||||||
return j8001;
|
return j8001;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplicationEvent getEvent() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import com.genersoft.iot.vmp.jt1078.proc.Header;
|
|||||||
import com.genersoft.iot.vmp.jt1078.proc.response.Rs;
|
import com.genersoft.iot.vmp.jt1078.proc.response.Rs;
|
||||||
import com.genersoft.iot.vmp.jt1078.session.Session;
|
import com.genersoft.iot.vmp.jt1078.session.Session;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询服务器时间
|
* 查询服务器时间
|
||||||
@ -24,4 +25,9 @@ public class J0004 extends Re {
|
|||||||
protected Rs handler(Header header, Session session) {
|
protected Rs handler(Header header, Session session) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplicationEvent getEvent() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
package com.genersoft.iot.vmp.jt1078.proc.request;
|
package com.genersoft.iot.vmp.jt1078.proc.request;
|
||||||
|
|
||||||
import com.genersoft.iot.vmp.jt1078.annotation.MsgId;
|
import com.genersoft.iot.vmp.jt1078.annotation.MsgId;
|
||||||
|
import com.genersoft.iot.vmp.jt1078.event.RegisterEvent;
|
||||||
import com.genersoft.iot.vmp.jt1078.proc.Header;
|
import com.genersoft.iot.vmp.jt1078.proc.Header;
|
||||||
import com.genersoft.iot.vmp.jt1078.proc.response.J8100;
|
import com.genersoft.iot.vmp.jt1078.proc.response.J8100;
|
||||||
import com.genersoft.iot.vmp.jt1078.proc.response.Rs;
|
import com.genersoft.iot.vmp.jt1078.proc.response.Rs;
|
||||||
import com.genersoft.iot.vmp.jt1078.session.Session;
|
import com.genersoft.iot.vmp.jt1078.session.Session;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端注册
|
* 终端注册
|
||||||
@ -35,13 +39,34 @@ public class J0100 extends Re {
|
|||||||
protected Rs decode0(ByteBuf buf, Header header, Session session) {
|
protected Rs decode0(ByteBuf buf, Header header, Session session) {
|
||||||
Short version = header.getVersion();
|
Short version = header.getVersion();
|
||||||
provinceId = buf.readUnsignedShort();
|
provinceId = buf.readUnsignedShort();
|
||||||
if (version > 1) {
|
if (version >= 1) {
|
||||||
cityId = buf.readUnsignedShort();
|
cityId = buf.readUnsignedShort();
|
||||||
// decode as 2019
|
// decode as 2019
|
||||||
|
byte[] bytes11 = new byte[11];
|
||||||
|
buf.readBytes(bytes11);
|
||||||
|
makerId = new String(bytes11).trim();
|
||||||
|
|
||||||
|
byte[] bytes30 = new byte[30];
|
||||||
|
buf.readBytes(bytes30);
|
||||||
|
deviceModel = new String(bytes30).trim();
|
||||||
|
|
||||||
|
buf.readBytes(bytes30);
|
||||||
|
deviceId = new String(bytes30).trim();
|
||||||
|
|
||||||
|
plateColor = buf.readByte();
|
||||||
|
byte[] plateColorBytes = new byte[buf.readableBytes()];
|
||||||
|
buf.readBytes(plateColorBytes);
|
||||||
|
try {
|
||||||
|
plateNo = new String(plateColorBytes, "GBK").trim();
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
int i = buf.readUnsignedShort();
|
int i = buf.readUnsignedShort();
|
||||||
// decode as 2013
|
// decode as 2013
|
||||||
}
|
}
|
||||||
|
// 发送终端注册消息
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,4 +78,17 @@ public class J0100 extends Re {
|
|||||||
j8100.setCode("WVP_YYDS");
|
j8100.setCode("WVP_YYDS");
|
||||||
return j8100;
|
return j8100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplicationEvent getEvent() {
|
||||||
|
RegisterEvent registerEvent = new RegisterEvent(this);
|
||||||
|
registerEvent.setProvinceId(provinceId);
|
||||||
|
registerEvent.setCityId(cityId);
|
||||||
|
registerEvent.setDeviceId(deviceId);
|
||||||
|
registerEvent.setDeviceModel(deviceModel);
|
||||||
|
registerEvent.setMakerId(makerId);
|
||||||
|
registerEvent.setPlateColor(plateColor);
|
||||||
|
registerEvent.setPlateNo(plateNo);
|
||||||
|
return registerEvent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import com.genersoft.iot.vmp.jt1078.proc.response.J8001;
|
|||||||
import com.genersoft.iot.vmp.jt1078.proc.response.Rs;
|
import com.genersoft.iot.vmp.jt1078.proc.response.Rs;
|
||||||
import com.genersoft.iot.vmp.jt1078.session.Session;
|
import com.genersoft.iot.vmp.jt1078.session.Session;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端鉴权
|
* 终端鉴权
|
||||||
@ -33,4 +34,9 @@ public class J0102 extends Re {
|
|||||||
return j8001;
|
return j8001;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplicationEvent getEvent() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import com.genersoft.iot.vmp.jt1078.proc.response.J8001;
|
|||||||
import com.genersoft.iot.vmp.jt1078.proc.response.Rs;
|
import com.genersoft.iot.vmp.jt1078.proc.response.Rs;
|
||||||
import com.genersoft.iot.vmp.jt1078.session.Session;
|
import com.genersoft.iot.vmp.jt1078.session.Session;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实时消息上报
|
* 实时消息上报
|
||||||
@ -29,4 +30,9 @@ public class J0200 extends Re {
|
|||||||
j8001.setResult(J8001.SUCCESS);
|
j8001.setResult(J8001.SUCCESS);
|
||||||
return j8001;
|
return j8001;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplicationEvent getEvent() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.genersoft.iot.vmp.jt1078.session.Session;
|
|||||||
import com.genersoft.iot.vmp.jt1078.session.SessionManager;
|
import com.genersoft.iot.vmp.jt1078.session.SessionManager;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.ByteBufUtil;
|
import io.netty.buffer.ByteBufUtil;
|
||||||
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -187,4 +188,9 @@ public class J1205 extends Re {
|
|||||||
", recordList=" + recordList +
|
", recordList=" + recordList +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplicationEvent getEvent() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import com.genersoft.iot.vmp.jt1078.session.Session;
|
|||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.context.ApplicationEvent;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -37,4 +38,6 @@ public abstract class Re {
|
|||||||
|
|
||||||
return rs;
|
return rs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public abstract ApplicationEvent getEvent();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,7 +20,7 @@ public class JT1078ServerTest {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.out.println("Starting jt1078 server...");
|
System.out.println("Starting jt1078 server...");
|
||||||
TcpServer tcpServer = new TcpServer(21078);
|
TcpServer tcpServer = new TcpServer(21078, null);
|
||||||
tcpServer.start();
|
tcpServer.start();
|
||||||
System.out.println("Start jt1078 server success!");
|
System.out.println("Start jt1078 server success!");
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user