diff --git a/README.md b/README.md
index 4fab7fe..51f648f 100644
--- a/README.md
+++ b/README.md
@@ -8,12 +8,11 @@
* TCP协议服务端开发
## 代码仓库
- * Gitee仓库地址:[https://gitee.com/yezhihao/netmc/tree/master](https://gitee.com/yezhihao/netmc/tree/master)
- * Github仓库地址:[https://github.com/yezhihao/netmc/tree/master](https://github.com/yezhihao/netmc/tree/master)
+ * Gitee仓库地址:[http://115.29.108.160:3000/TripartiteOpenSource/netmc](http://115.29.108.160:3000/TripartiteOpenSource/netmc)
+ * Github仓库地址:[http://115.29.108.160:3000/TripartiteOpenSource/netmc](http://115.29.108.160:3000/TripartiteOpenSource/netmc)
## 下载方式
- * Gitee下载命令:`git clone https://gitee.com/yezhihao/netmc -b master`
- * Github下载命令:`git clone https://github.com/yezhihao/netmc -b master`
+ * Git下载命令:`git clone http://115.29.108.160:3000/TripartiteOpenSource/netmc.git -b master`
## 项目结构
```sh
@@ -72,10 +71,4 @@ public class JT808Endpoint {
详细的例子请参考Test目录
-使用该组件的项目:[https://gitee.com/yezhihao/jt808-server/tree/master](https://gitee.com/yezhihao/jt808-server/tree/master)
-
-项目会不定期进行更新,建议star和watch一份,您的支持是我最大的动力。
-
-如有任何疑问或者BUG,请联系我,非常感谢。
-
-技术交流QQ群:[906230542]
+当前项目是Fork [剑器近](https://gitee.com/yezhihao) 的 [netmc](https://gitee.com/yezhihao/netmc?_from=gitee_search)
diff --git a/pom.xml b/pom.xml
index 50cdf7d..1c4db72 100644
--- a/pom.xml
+++ b/pom.xml
@@ -177,11 +177,13 @@
nexus-release
- https://oss.sonatype.org/service/local/staging/deploy/maven2
+ Nexus Release Repository
+ http://113.250.52.44:8081/repository/maven-releases/
- nexus-snapshot
- https://oss.sonatype.org/content/repositories/snapshots
+ nexus-snapshots
+ Nexus Release Repository
+ http://113.250.52.44:8081/repository/maven-snapshots/
@@ -189,13 +191,16 @@
- central
- Maven Central
- http://maven.aliyun.com/nexus/content/groups/public/
+ deployer
+ deployer
+ http://113.250.52.44:8081/repository/maven-public/
default
true
+
+ true
+
\ No newline at end of file
diff --git a/src/main/java/io/github/yezhihao/netmc/NettyConfig.java b/src/main/java/com/dust/tripartite/netmc/NettyConfig.java
similarity index 92%
rename from src/main/java/io/github/yezhihao/netmc/NettyConfig.java
rename to src/main/java/com/dust/tripartite/netmc/NettyConfig.java
index 8c7cbc8..bf4fe89 100644
--- a/src/main/java/io/github/yezhihao/netmc/NettyConfig.java
+++ b/src/main/java/com/dust/tripartite/netmc/NettyConfig.java
@@ -1,13 +1,13 @@
-package io.github.yezhihao.netmc;
+package com.dust.tripartite.netmc;
-import io.github.yezhihao.netmc.codec.Delimiter;
-import io.github.yezhihao.netmc.codec.LengthField;
-import io.github.yezhihao.netmc.codec.MessageDecoder;
-import io.github.yezhihao.netmc.codec.MessageEncoder;
-import io.github.yezhihao.netmc.core.HandlerInterceptor;
-import io.github.yezhihao.netmc.core.HandlerMapping;
-import io.github.yezhihao.netmc.session.SessionListener;
-import io.github.yezhihao.netmc.session.SessionManager;
+import com.dust.tripartite.netmc.codec.LengthField;
+import com.dust.tripartite.netmc.codec.MessageEncoder;
+import com.dust.tripartite.netmc.core.HandlerInterceptor;
+import com.dust.tripartite.netmc.core.HandlerMapping;
+import com.dust.tripartite.netmc.session.SessionListener;
+import com.dust.tripartite.netmc.codec.Delimiter;
+import com.dust.tripartite.netmc.codec.MessageDecoder;
+import com.dust.tripartite.netmc.session.SessionManager;
import io.netty.channel.ChannelInboundHandlerAdapter;
/**
diff --git a/src/main/java/io/github/yezhihao/netmc/TCPServer.java b/src/main/java/com/dust/tripartite/netmc/TCPServer.java
similarity index 82%
rename from src/main/java/io/github/yezhihao/netmc/TCPServer.java
rename to src/main/java/com/dust/tripartite/netmc/TCPServer.java
index 3484334..a2c8407 100644
--- a/src/main/java/io/github/yezhihao/netmc/TCPServer.java
+++ b/src/main/java/com/dust/tripartite/netmc/TCPServer.java
@@ -1,9 +1,9 @@
-package io.github.yezhihao.netmc;
+package com.dust.tripartite.netmc;
-import io.github.yezhihao.netmc.codec.DelimiterBasedFrameDecoder;
-import io.github.yezhihao.netmc.codec.LengthFieldAndDelimiterFrameDecoder;
-import io.github.yezhihao.netmc.codec.MessageDecoderWrapper;
-import io.github.yezhihao.netmc.codec.MessageEncoderWrapper;
+import com.dust.tripartite.netmc.codec.DelimiterBasedFrameDecoder;
+import com.dust.tripartite.netmc.codec.LengthFieldAndDelimiterFrameDecoder;
+import com.dust.tripartite.netmc.codec.MessageDecoderWrapper;
+import com.dust.tripartite.netmc.codec.MessageEncoderWrapper;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelInitializer;
@@ -20,6 +20,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
/**
* @author yezhihao
@@ -28,7 +29,7 @@ import java.util.concurrent.TimeUnit;
public class TCPServer {
private static final Logger log = LoggerFactory.getLogger(TCPServer.class);
- private volatile boolean isRunning = false;
+ private final AtomicBoolean isRunning = new AtomicBoolean(false);
private EventLoopGroup bossGroup = null;
private EventLoopGroup workerGroup = null;
@@ -83,29 +84,27 @@ public class TCPServer {
return new LengthFieldAndDelimiterFrameDecoder(config.maxFrameLength, config.lengthField, config.delimiter);
}
- public synchronized void start() {
- if (this.isRunning) {
+ public void start() {
+ if (!isRunning.compareAndSet(false, true)) {
log.warn("==={}已经启动, port={}===", name, config.port);
return;
}
- this.isRunning = true;
- new Thread(() -> startInternal()).start();
+ new Thread(this::startInternal).start();
}
- public synchronized void stop() {
- if (!this.isRunning) {
+ public void stop() {
+ if (!isRunning.compareAndSet(true, false)) {
log.warn("==={}已经停止, port={}===", name, config.port);
+ return;
}
- this.isRunning = false;
-
- Future future = this.bossGroup.shutdownGracefully();
- if (!future.isSuccess())
+ Future> future = this.bossGroup.shutdownGracefully();
+ if (!future.isSuccess()) {
log.warn("bossGroup 无法正常停止", future.cause());
-
+ }
future = this.workerGroup.shutdownGracefully();
- if (!future.isSuccess())
+ if (!future.isSuccess()) {
log.warn("workerGroup 无法正常停止", future.cause());
-
+ }
log.warn("==={}已经停止, port={}===", name, config.port);
}
}
\ No newline at end of file
diff --git a/src/main/java/io/github/yezhihao/netmc/TCPServerHandler.java b/src/main/java/com/dust/tripartite/netmc/TCPServerHandler.java
similarity index 90%
rename from src/main/java/io/github/yezhihao/netmc/TCPServerHandler.java
rename to src/main/java/com/dust/tripartite/netmc/TCPServerHandler.java
index 707f1b3..54e9b68 100644
--- a/src/main/java/io/github/yezhihao/netmc/TCPServerHandler.java
+++ b/src/main/java/com/dust/tripartite/netmc/TCPServerHandler.java
@@ -1,12 +1,12 @@
-package io.github.yezhihao.netmc;
+package com.dust.tripartite.netmc;
-import io.github.yezhihao.netmc.core.HandlerInterceptor;
-import io.github.yezhihao.netmc.core.HandlerMapping;
-import io.github.yezhihao.netmc.core.handler.Handler;
-import io.github.yezhihao.netmc.core.model.Message;
-import io.github.yezhihao.netmc.session.Session;
-import io.github.yezhihao.netmc.session.SessionListener;
-import io.github.yezhihao.netmc.session.SessionManager;
+import com.dust.tripartite.netmc.core.HandlerInterceptor;
+import com.dust.tripartite.netmc.core.HandlerMapping;
+import com.dust.tripartite.netmc.core.handler.Handler;
+import com.dust.tripartite.netmc.core.model.Message;
+import com.dust.tripartite.netmc.session.Session;
+import com.dust.tripartite.netmc.session.SessionListener;
+import com.dust.tripartite.netmc.session.SessionManager;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
diff --git a/src/main/java/io/github/yezhihao/netmc/codec/Delimiter.java b/src/main/java/com/dust/tripartite/netmc/codec/Delimiter.java
similarity index 90%
rename from src/main/java/io/github/yezhihao/netmc/codec/Delimiter.java
rename to src/main/java/com/dust/tripartite/netmc/codec/Delimiter.java
index 2d8b1ed..3b4a440 100644
--- a/src/main/java/io/github/yezhihao/netmc/codec/Delimiter.java
+++ b/src/main/java/com/dust/tripartite/netmc/codec/Delimiter.java
@@ -1,4 +1,4 @@
-package io.github.yezhihao.netmc.codec;
+package com.dust.tripartite.netmc.codec;
public class Delimiter {
protected byte[] value;
diff --git a/src/main/java/io/github/yezhihao/netmc/codec/DelimiterBasedFrameDecoder.java b/src/main/java/com/dust/tripartite/netmc/codec/DelimiterBasedFrameDecoder.java
similarity index 97%
rename from src/main/java/io/github/yezhihao/netmc/codec/DelimiterBasedFrameDecoder.java
rename to src/main/java/com/dust/tripartite/netmc/codec/DelimiterBasedFrameDecoder.java
index 1aa7b59..1e8972f 100644
--- a/src/main/java/io/github/yezhihao/netmc/codec/DelimiterBasedFrameDecoder.java
+++ b/src/main/java/com/dust/tripartite/netmc/codec/DelimiterBasedFrameDecoder.java
@@ -1,11 +1,11 @@
-package io.github.yezhihao.netmc.codec;
+package com.dust.tripartite.netmc.codec;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;
import io.netty.handler.codec.TooLongFrameException;
import io.netty.util.internal.ObjectUtil;
-import io.github.yezhihao.netmc.util.ByteBufUtils;
+import com.dust.tripartite.netmc.util.ByteBufUtils;
import java.util.List;
diff --git a/src/main/java/io/github/yezhihao/netmc/codec/LengthField.java b/src/main/java/com/dust/tripartite/netmc/codec/LengthField.java
similarity index 98%
rename from src/main/java/io/github/yezhihao/netmc/codec/LengthField.java
rename to src/main/java/com/dust/tripartite/netmc/codec/LengthField.java
index 0f0ebc8..42c6105 100644
--- a/src/main/java/io/github/yezhihao/netmc/codec/LengthField.java
+++ b/src/main/java/com/dust/tripartite/netmc/codec/LengthField.java
@@ -1,4 +1,4 @@
-package io.github.yezhihao.netmc.codec;
+package com.dust.tripartite.netmc.codec;
import static io.netty.util.internal.ObjectUtil.checkPositive;
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
diff --git a/src/main/java/io/github/yezhihao/netmc/codec/LengthFieldAndDelimiterFrameDecoder.java b/src/main/java/com/dust/tripartite/netmc/codec/LengthFieldAndDelimiterFrameDecoder.java
similarity index 98%
rename from src/main/java/io/github/yezhihao/netmc/codec/LengthFieldAndDelimiterFrameDecoder.java
rename to src/main/java/com/dust/tripartite/netmc/codec/LengthFieldAndDelimiterFrameDecoder.java
index df5320d..ca7494f 100644
--- a/src/main/java/io/github/yezhihao/netmc/codec/LengthFieldAndDelimiterFrameDecoder.java
+++ b/src/main/java/com/dust/tripartite/netmc/codec/LengthFieldAndDelimiterFrameDecoder.java
@@ -1,12 +1,12 @@
-package io.github.yezhihao.netmc.codec;
+package com.dust.tripartite.netmc.codec;
+import com.dust.tripartite.netmc.util.ByteBufUtils;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.CorruptedFrameException;
import io.netty.handler.codec.DecoderException;
import io.netty.handler.codec.TooLongFrameException;
import io.netty.util.internal.ObjectUtil;
-import io.github.yezhihao.netmc.util.ByteBufUtils;
import java.util.List;
diff --git a/src/main/java/io/github/yezhihao/netmc/codec/MessageDecoder.java b/src/main/java/com/dust/tripartite/netmc/codec/MessageDecoder.java
similarity index 70%
rename from src/main/java/io/github/yezhihao/netmc/codec/MessageDecoder.java
rename to src/main/java/com/dust/tripartite/netmc/codec/MessageDecoder.java
index a3ae408..e5cdae2 100644
--- a/src/main/java/io/github/yezhihao/netmc/codec/MessageDecoder.java
+++ b/src/main/java/com/dust/tripartite/netmc/codec/MessageDecoder.java
@@ -1,6 +1,6 @@
-package io.github.yezhihao.netmc.codec;
+package com.dust.tripartite.netmc.codec;
-import io.github.yezhihao.netmc.session.Session;
+import com.dust.tripartite.netmc.session.Session;
import io.netty.buffer.ByteBuf;
/**
diff --git a/src/main/java/io/github/yezhihao/netmc/codec/MessageDecoderWrapper.java b/src/main/java/com/dust/tripartite/netmc/codec/MessageDecoderWrapper.java
similarity index 93%
rename from src/main/java/io/github/yezhihao/netmc/codec/MessageDecoderWrapper.java
rename to src/main/java/com/dust/tripartite/netmc/codec/MessageDecoderWrapper.java
index 967be35..65e01c5 100644
--- a/src/main/java/io/github/yezhihao/netmc/codec/MessageDecoderWrapper.java
+++ b/src/main/java/com/dust/tripartite/netmc/codec/MessageDecoderWrapper.java
@@ -1,6 +1,6 @@
-package io.github.yezhihao.netmc.codec;
+package com.dust.tripartite.netmc.codec;
-import io.github.yezhihao.netmc.session.Session;
+import com.dust.tripartite.netmc.session.Session;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufUtil;
import io.netty.channel.ChannelHandler;
diff --git a/src/main/java/io/github/yezhihao/netmc/codec/MessageEncoder.java b/src/main/java/com/dust/tripartite/netmc/codec/MessageEncoder.java
similarity index 70%
rename from src/main/java/io/github/yezhihao/netmc/codec/MessageEncoder.java
rename to src/main/java/com/dust/tripartite/netmc/codec/MessageEncoder.java
index e732d05..cc87566 100644
--- a/src/main/java/io/github/yezhihao/netmc/codec/MessageEncoder.java
+++ b/src/main/java/com/dust/tripartite/netmc/codec/MessageEncoder.java
@@ -1,6 +1,6 @@
-package io.github.yezhihao.netmc.codec;
+package com.dust.tripartite.netmc.codec;
-import io.github.yezhihao.netmc.session.Session;
+import com.dust.tripartite.netmc.session.Session;
import io.netty.buffer.ByteBuf;
/**
diff --git a/src/main/java/io/github/yezhihao/netmc/codec/MessageEncoderWrapper.java b/src/main/java/com/dust/tripartite/netmc/codec/MessageEncoderWrapper.java
similarity index 93%
rename from src/main/java/io/github/yezhihao/netmc/codec/MessageEncoderWrapper.java
rename to src/main/java/com/dust/tripartite/netmc/codec/MessageEncoderWrapper.java
index 78b9813..1a6353b 100644
--- a/src/main/java/io/github/yezhihao/netmc/codec/MessageEncoderWrapper.java
+++ b/src/main/java/com/dust/tripartite/netmc/codec/MessageEncoderWrapper.java
@@ -1,6 +1,6 @@
-package io.github.yezhihao.netmc.codec;
+package com.dust.tripartite.netmc.codec;
-import io.github.yezhihao.netmc.session.Session;
+import com.dust.tripartite.netmc.session.Session;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelHandler;
diff --git a/src/main/java/io/github/yezhihao/netmc/core/AbstractHandlerMapping.java b/src/main/java/com/dust/tripartite/netmc/core/AbstractHandlerMapping.java
similarity index 81%
rename from src/main/java/io/github/yezhihao/netmc/core/AbstractHandlerMapping.java
rename to src/main/java/com/dust/tripartite/netmc/core/AbstractHandlerMapping.java
index 42aef77..63641d8 100644
--- a/src/main/java/io/github/yezhihao/netmc/core/AbstractHandlerMapping.java
+++ b/src/main/java/com/dust/tripartite/netmc/core/AbstractHandlerMapping.java
@@ -1,10 +1,10 @@
-package io.github.yezhihao.netmc.core;
+package com.dust.tripartite.netmc.core;
-import io.github.yezhihao.netmc.core.annotation.AsyncBatch;
-import io.github.yezhihao.netmc.core.annotation.Mapping;
-import io.github.yezhihao.netmc.core.handler.AsyncBatchHandler;
-import io.github.yezhihao.netmc.core.handler.Handler;
-import io.github.yezhihao.netmc.core.handler.SimpleHandler;
+import com.dust.tripartite.netmc.core.annotation.AsyncBatch;
+import com.dust.tripartite.netmc.core.annotation.Mapping;
+import com.dust.tripartite.netmc.core.handler.AsyncBatchHandler;
+import com.dust.tripartite.netmc.core.handler.Handler;
+import com.dust.tripartite.netmc.core.handler.SimpleHandler;
import java.lang.reflect.Method;
import java.util.HashMap;
diff --git a/src/main/java/io/github/yezhihao/netmc/core/DefaultHandlerMapping.java b/src/main/java/com/dust/tripartite/netmc/core/DefaultHandlerMapping.java
similarity index 80%
rename from src/main/java/io/github/yezhihao/netmc/core/DefaultHandlerMapping.java
rename to src/main/java/com/dust/tripartite/netmc/core/DefaultHandlerMapping.java
index b6d8ee0..3c78637 100644
--- a/src/main/java/io/github/yezhihao/netmc/core/DefaultHandlerMapping.java
+++ b/src/main/java/com/dust/tripartite/netmc/core/DefaultHandlerMapping.java
@@ -1,7 +1,7 @@
-package io.github.yezhihao.netmc.core;
+package com.dust.tripartite.netmc.core;
-import io.github.yezhihao.netmc.core.annotation.Endpoint;
-import io.github.yezhihao.netmc.util.ClassUtils;
+import com.dust.tripartite.netmc.util.ClassUtils;
+import com.dust.tripartite.netmc.core.annotation.Endpoint;
import java.util.List;
diff --git a/src/main/java/io/github/yezhihao/netmc/core/HandlerInterceptor.java b/src/main/java/com/dust/tripartite/netmc/core/HandlerInterceptor.java
similarity index 82%
rename from src/main/java/io/github/yezhihao/netmc/core/HandlerInterceptor.java
rename to src/main/java/com/dust/tripartite/netmc/core/HandlerInterceptor.java
index b97ad18..a4e02fb 100644
--- a/src/main/java/io/github/yezhihao/netmc/core/HandlerInterceptor.java
+++ b/src/main/java/com/dust/tripartite/netmc/core/HandlerInterceptor.java
@@ -1,7 +1,7 @@
-package io.github.yezhihao.netmc.core;
+package com.dust.tripartite.netmc.core;
-import io.github.yezhihao.netmc.core.model.Message;
-import io.github.yezhihao.netmc.session.Session;
+import com.dust.tripartite.netmc.core.model.Message;
+import com.dust.tripartite.netmc.session.Session;
/**
* 消息拦截器
diff --git a/src/main/java/io/github/yezhihao/netmc/core/HandlerMapping.java b/src/main/java/com/dust/tripartite/netmc/core/HandlerMapping.java
similarity index 64%
rename from src/main/java/io/github/yezhihao/netmc/core/HandlerMapping.java
rename to src/main/java/com/dust/tripartite/netmc/core/HandlerMapping.java
index 3c81513..2f9ad86 100644
--- a/src/main/java/io/github/yezhihao/netmc/core/HandlerMapping.java
+++ b/src/main/java/com/dust/tripartite/netmc/core/HandlerMapping.java
@@ -1,6 +1,6 @@
-package io.github.yezhihao.netmc.core;
+package com.dust.tripartite.netmc.core;
-import io.github.yezhihao.netmc.core.handler.Handler;
+import com.dust.tripartite.netmc.core.handler.Handler;
/**
* 消息映射接口
diff --git a/src/main/java/io/github/yezhihao/netmc/core/SpringHandlerMapping.java b/src/main/java/com/dust/tripartite/netmc/core/SpringHandlerMapping.java
similarity index 87%
rename from src/main/java/io/github/yezhihao/netmc/core/SpringHandlerMapping.java
rename to src/main/java/com/dust/tripartite/netmc/core/SpringHandlerMapping.java
index 19bfee4..5c14fa8 100644
--- a/src/main/java/io/github/yezhihao/netmc/core/SpringHandlerMapping.java
+++ b/src/main/java/com/dust/tripartite/netmc/core/SpringHandlerMapping.java
@@ -1,6 +1,6 @@
-package io.github.yezhihao.netmc.core;
+package com.dust.tripartite.netmc.core;
-import io.github.yezhihao.netmc.core.annotation.Endpoint;
+import com.dust.tripartite.netmc.core.annotation.Endpoint;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
diff --git a/src/main/java/io/github/yezhihao/netmc/core/annotation/AsyncBatch.java b/src/main/java/com/dust/tripartite/netmc/core/annotation/AsyncBatch.java
similarity index 89%
rename from src/main/java/io/github/yezhihao/netmc/core/annotation/AsyncBatch.java
rename to src/main/java/com/dust/tripartite/netmc/core/annotation/AsyncBatch.java
index 37a6e62..07fb6d7 100644
--- a/src/main/java/io/github/yezhihao/netmc/core/annotation/AsyncBatch.java
+++ b/src/main/java/com/dust/tripartite/netmc/core/annotation/AsyncBatch.java
@@ -1,4 +1,4 @@
-package io.github.yezhihao.netmc.core.annotation;
+package com.dust.tripartite.netmc.core.annotation;
import java.lang.annotation.*;
diff --git a/src/main/java/io/github/yezhihao/netmc/core/annotation/Endpoint.java b/src/main/java/com/dust/tripartite/netmc/core/annotation/Endpoint.java
similarity index 81%
rename from src/main/java/io/github/yezhihao/netmc/core/annotation/Endpoint.java
rename to src/main/java/com/dust/tripartite/netmc/core/annotation/Endpoint.java
index 1e00b07..cb18043 100644
--- a/src/main/java/io/github/yezhihao/netmc/core/annotation/Endpoint.java
+++ b/src/main/java/com/dust/tripartite/netmc/core/annotation/Endpoint.java
@@ -1,4 +1,4 @@
-package io.github.yezhihao.netmc.core.annotation;
+package com.dust.tripartite.netmc.core.annotation;
import java.lang.annotation.*;
diff --git a/src/main/java/io/github/yezhihao/netmc/core/annotation/Mapping.java b/src/main/java/com/dust/tripartite/netmc/core/annotation/Mapping.java
similarity index 84%
rename from src/main/java/io/github/yezhihao/netmc/core/annotation/Mapping.java
rename to src/main/java/com/dust/tripartite/netmc/core/annotation/Mapping.java
index 71967db..f3ff673 100644
--- a/src/main/java/io/github/yezhihao/netmc/core/annotation/Mapping.java
+++ b/src/main/java/com/dust/tripartite/netmc/core/annotation/Mapping.java
@@ -1,4 +1,4 @@
-package io.github.yezhihao.netmc.core.annotation;
+package com.dust.tripartite.netmc.core.annotation;
import java.lang.annotation.*;
diff --git a/src/main/java/io/github/yezhihao/netmc/core/handler/AsyncBatchHandler.java b/src/main/java/com/dust/tripartite/netmc/core/handler/AsyncBatchHandler.java
similarity index 93%
rename from src/main/java/io/github/yezhihao/netmc/core/handler/AsyncBatchHandler.java
rename to src/main/java/com/dust/tripartite/netmc/core/handler/AsyncBatchHandler.java
index 767569f..c0e89ea 100644
--- a/src/main/java/io/github/yezhihao/netmc/core/handler/AsyncBatchHandler.java
+++ b/src/main/java/com/dust/tripartite/netmc/core/handler/AsyncBatchHandler.java
@@ -1,9 +1,9 @@
-package io.github.yezhihao.netmc.core.handler;
+package com.dust.tripartite.netmc.core.handler;
-import io.github.yezhihao.netmc.core.model.Message;
-import io.github.yezhihao.netmc.session.Session;
-import io.github.yezhihao.netmc.util.BasicThreadFactory;
-import io.github.yezhihao.netmc.util.VirtualList;
+import com.dust.tripartite.netmc.core.model.Message;
+import com.dust.tripartite.netmc.session.Session;
+import com.dust.tripartite.netmc.util.BasicThreadFactory;
+import com.dust.tripartite.netmc.util.VirtualList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/src/main/java/io/github/yezhihao/netmc/core/handler/Handler.java b/src/main/java/com/dust/tripartite/netmc/core/handler/Handler.java
similarity index 93%
rename from src/main/java/io/github/yezhihao/netmc/core/handler/Handler.java
rename to src/main/java/com/dust/tripartite/netmc/core/handler/Handler.java
index 4e493df..32cd3b6 100644
--- a/src/main/java/io/github/yezhihao/netmc/core/handler/Handler.java
+++ b/src/main/java/com/dust/tripartite/netmc/core/handler/Handler.java
@@ -1,7 +1,7 @@
-package io.github.yezhihao.netmc.core.handler;
+package com.dust.tripartite.netmc.core.handler;
-import io.github.yezhihao.netmc.core.model.Message;
-import io.github.yezhihao.netmc.session.Session;
+import com.dust.tripartite.netmc.core.model.Message;
+import com.dust.tripartite.netmc.session.Session;
import sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl;
import java.lang.reflect.Method;
diff --git a/src/main/java/io/github/yezhihao/netmc/core/handler/SimpleHandler.java b/src/main/java/com/dust/tripartite/netmc/core/handler/SimpleHandler.java
similarity index 74%
rename from src/main/java/io/github/yezhihao/netmc/core/handler/SimpleHandler.java
rename to src/main/java/com/dust/tripartite/netmc/core/handler/SimpleHandler.java
index c89e7bc..33bb828 100644
--- a/src/main/java/io/github/yezhihao/netmc/core/handler/SimpleHandler.java
+++ b/src/main/java/com/dust/tripartite/netmc/core/handler/SimpleHandler.java
@@ -1,7 +1,7 @@
-package io.github.yezhihao.netmc.core.handler;
+package com.dust.tripartite.netmc.core.handler;
-import io.github.yezhihao.netmc.core.model.Message;
-import io.github.yezhihao.netmc.session.Session;
+import com.dust.tripartite.netmc.core.model.Message;
+import com.dust.tripartite.netmc.session.Session;
import java.lang.reflect.Method;
diff --git a/src/main/java/io/github/yezhihao/netmc/core/model/Message.java b/src/main/java/com/dust/tripartite/netmc/core/model/Message.java
similarity index 89%
rename from src/main/java/io/github/yezhihao/netmc/core/model/Message.java
rename to src/main/java/com/dust/tripartite/netmc/core/model/Message.java
index e04d937..386bd9c 100644
--- a/src/main/java/io/github/yezhihao/netmc/core/model/Message.java
+++ b/src/main/java/com/dust/tripartite/netmc/core/model/Message.java
@@ -1,4 +1,4 @@
-package io.github.yezhihao.netmc.core.model;
+package com.dust.tripartite.netmc.core.model;
import java.io.Serializable;
diff --git a/src/main/java/io/github/yezhihao/netmc/core/model/Response.java b/src/main/java/com/dust/tripartite/netmc/core/model/Response.java
similarity index 78%
rename from src/main/java/io/github/yezhihao/netmc/core/model/Response.java
rename to src/main/java/com/dust/tripartite/netmc/core/model/Response.java
index 697c3ae..837c639 100644
--- a/src/main/java/io/github/yezhihao/netmc/core/model/Response.java
+++ b/src/main/java/com/dust/tripartite/netmc/core/model/Response.java
@@ -1,4 +1,4 @@
-package io.github.yezhihao.netmc.core.model;
+package com.dust.tripartite.netmc.core.model;
/**
* @author yezhihao
diff --git a/src/main/java/io/github/yezhihao/netmc/session/Session.java b/src/main/java/com/dust/tripartite/netmc/session/Session.java
similarity index 98%
rename from src/main/java/io/github/yezhihao/netmc/session/Session.java
rename to src/main/java/com/dust/tripartite/netmc/session/Session.java
index 918c8f7..5ce976d 100644
--- a/src/main/java/io/github/yezhihao/netmc/session/Session.java
+++ b/src/main/java/com/dust/tripartite/netmc/session/Session.java
@@ -1,7 +1,7 @@
-package io.github.yezhihao.netmc.session;
+package com.dust.tripartite.netmc.session;
-import io.github.yezhihao.netmc.core.model.Message;
-import io.github.yezhihao.netmc.core.model.Response;
+import com.dust.tripartite.netmc.core.model.Message;
+import com.dust.tripartite.netmc.core.model.Response;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelFutureListener;
diff --git a/src/main/java/io/github/yezhihao/netmc/session/SessionListener.java b/src/main/java/com/dust/tripartite/netmc/session/SessionListener.java
similarity index 90%
rename from src/main/java/io/github/yezhihao/netmc/session/SessionListener.java
rename to src/main/java/com/dust/tripartite/netmc/session/SessionListener.java
index bb9d0b1..9397fbe 100644
--- a/src/main/java/io/github/yezhihao/netmc/session/SessionListener.java
+++ b/src/main/java/com/dust/tripartite/netmc/session/SessionListener.java
@@ -1,4 +1,4 @@
-package io.github.yezhihao.netmc.session;
+package com.dust.tripartite.netmc.session;
/**
* @author yezhihao
diff --git a/src/main/java/io/github/yezhihao/netmc/session/SessionManager.java b/src/main/java/com/dust/tripartite/netmc/session/SessionManager.java
similarity index 97%
rename from src/main/java/io/github/yezhihao/netmc/session/SessionManager.java
rename to src/main/java/com/dust/tripartite/netmc/session/SessionManager.java
index a94e601..da1742f 100644
--- a/src/main/java/io/github/yezhihao/netmc/session/SessionManager.java
+++ b/src/main/java/com/dust/tripartite/netmc/session/SessionManager.java
@@ -1,4 +1,4 @@
-package io.github.yezhihao.netmc.session;
+package com.dust.tripartite.netmc.session;
import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
diff --git a/src/main/java/io/github/yezhihao/netmc/util/AdapterCollection.java b/src/main/java/com/dust/tripartite/netmc/util/AdapterCollection.java
similarity index 96%
rename from src/main/java/io/github/yezhihao/netmc/util/AdapterCollection.java
rename to src/main/java/com/dust/tripartite/netmc/util/AdapterCollection.java
index dcf878f..b5eb75a 100644
--- a/src/main/java/io/github/yezhihao/netmc/util/AdapterCollection.java
+++ b/src/main/java/com/dust/tripartite/netmc/util/AdapterCollection.java
@@ -1,4 +1,4 @@
-package io.github.yezhihao.netmc.util;
+package com.dust.tripartite.netmc.util;
import java.util.AbstractCollection;
import java.util.Collection;
diff --git a/src/main/java/io/github/yezhihao/netmc/util/AdapterList.java b/src/main/java/com/dust/tripartite/netmc/util/AdapterList.java
similarity index 93%
rename from src/main/java/io/github/yezhihao/netmc/util/AdapterList.java
rename to src/main/java/com/dust/tripartite/netmc/util/AdapterList.java
index a54b669..eec0b4b 100644
--- a/src/main/java/io/github/yezhihao/netmc/util/AdapterList.java
+++ b/src/main/java/com/dust/tripartite/netmc/util/AdapterList.java
@@ -1,4 +1,4 @@
-package io.github.yezhihao.netmc.util;
+package com.dust.tripartite.netmc.util;
import java.util.AbstractList;
import java.util.List;
diff --git a/src/main/java/io/github/yezhihao/netmc/util/AdapterMap.java b/src/main/java/com/dust/tripartite/netmc/util/AdapterMap.java
similarity index 94%
rename from src/main/java/io/github/yezhihao/netmc/util/AdapterMap.java
rename to src/main/java/com/dust/tripartite/netmc/util/AdapterMap.java
index a2b9492..49f8bdb 100644
--- a/src/main/java/io/github/yezhihao/netmc/util/AdapterMap.java
+++ b/src/main/java/com/dust/tripartite/netmc/util/AdapterMap.java
@@ -1,4 +1,4 @@
-package io.github.yezhihao.netmc.util;
+package com.dust.tripartite.netmc.util;
import java.util.AbstractMap;
import java.util.Map;
diff --git a/src/main/java/io/github/yezhihao/netmc/util/AdapterSet.java b/src/main/java/com/dust/tripartite/netmc/util/AdapterSet.java
similarity index 96%
rename from src/main/java/io/github/yezhihao/netmc/util/AdapterSet.java
rename to src/main/java/com/dust/tripartite/netmc/util/AdapterSet.java
index e9e9ccd..c45bef9 100644
--- a/src/main/java/io/github/yezhihao/netmc/util/AdapterSet.java
+++ b/src/main/java/com/dust/tripartite/netmc/util/AdapterSet.java
@@ -1,4 +1,4 @@
-package io.github.yezhihao.netmc.util;
+package com.dust.tripartite.netmc.util;
import java.util.AbstractSet;
import java.util.Iterator;
diff --git a/src/main/java/io/github/yezhihao/netmc/util/BasicThreadFactory.java b/src/main/java/com/dust/tripartite/netmc/util/BasicThreadFactory.java
similarity index 98%
rename from src/main/java/io/github/yezhihao/netmc/util/BasicThreadFactory.java
rename to src/main/java/com/dust/tripartite/netmc/util/BasicThreadFactory.java
index 77d1f2f..8df3547 100644
--- a/src/main/java/io/github/yezhihao/netmc/util/BasicThreadFactory.java
+++ b/src/main/java/com/dust/tripartite/netmc/util/BasicThreadFactory.java
@@ -1,4 +1,4 @@
-package io.github.yezhihao.netmc.util;
+package com.dust.tripartite.netmc.util;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
diff --git a/src/main/java/io/github/yezhihao/netmc/util/ByteBufUtils.java b/src/main/java/com/dust/tripartite/netmc/util/ByteBufUtils.java
similarity index 97%
rename from src/main/java/io/github/yezhihao/netmc/util/ByteBufUtils.java
rename to src/main/java/com/dust/tripartite/netmc/util/ByteBufUtils.java
index 7ee7224..3a9faf6 100644
--- a/src/main/java/io/github/yezhihao/netmc/util/ByteBufUtils.java
+++ b/src/main/java/com/dust/tripartite/netmc/util/ByteBufUtils.java
@@ -1,4 +1,4 @@
-package io.github.yezhihao.netmc.util;
+package com.dust.tripartite.netmc.util;
import io.netty.buffer.ByteBuf;
diff --git a/src/main/java/io/github/yezhihao/netmc/util/ClassUtils.java b/src/main/java/com/dust/tripartite/netmc/util/ClassUtils.java
similarity index 99%
rename from src/main/java/io/github/yezhihao/netmc/util/ClassUtils.java
rename to src/main/java/com/dust/tripartite/netmc/util/ClassUtils.java
index 424b4a1..828a9fd 100644
--- a/src/main/java/io/github/yezhihao/netmc/util/ClassUtils.java
+++ b/src/main/java/com/dust/tripartite/netmc/util/ClassUtils.java
@@ -1,4 +1,4 @@
-package io.github.yezhihao.netmc.util;
+package com.dust.tripartite.netmc.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/src/main/java/io/github/yezhihao/netmc/util/VirtualList.java b/src/main/java/com/dust/tripartite/netmc/util/VirtualList.java
similarity index 98%
rename from src/main/java/io/github/yezhihao/netmc/util/VirtualList.java
rename to src/main/java/com/dust/tripartite/netmc/util/VirtualList.java
index a0cb062..4786c5f 100644
--- a/src/main/java/io/github/yezhihao/netmc/util/VirtualList.java
+++ b/src/main/java/com/dust/tripartite/netmc/util/VirtualList.java
@@ -1,4 +1,4 @@
-package io.github.yezhihao.netmc.util;
+package com.dust.tripartite.netmc.util;
import java.io.Serializable;
import java.util.*;
diff --git a/src/test/java/io/github/yezhihao/netmc/QuickStart.java b/src/test/java/com/dust/tripartite/netmc/QuickStart.java
similarity index 72%
rename from src/test/java/io/github/yezhihao/netmc/QuickStart.java
rename to src/test/java/com/dust/tripartite/netmc/QuickStart.java
index eab96bb..38af95d 100644
--- a/src/test/java/io/github/yezhihao/netmc/QuickStart.java
+++ b/src/test/java/com/dust/tripartite/netmc/QuickStart.java
@@ -1,10 +1,10 @@
-package io.github.yezhihao.netmc;
+package com.dust.tripartite.netmc;
-import io.github.yezhihao.netmc.core.DefaultHandlerMapping;
-import io.github.yezhihao.netmc.endpoint.MyHandlerInterceptor;
-import io.github.yezhihao.netmc.codec.MyMessageDecoder;
-import io.github.yezhihao.netmc.codec.MyMessageEncoder;
-import io.github.yezhihao.netmc.session.SessionManager;
+import com.dust.tripartite.netmc.codec.MyMessageDecoder;
+import com.dust.tripartite.netmc.codec.MyMessageEncoder;
+import com.dust.tripartite.netmc.core.DefaultHandlerMapping;
+import com.dust.tripartite.netmc.endpoint.MyHandlerInterceptor;
+import com.dust.tripartite.netmc.session.SessionManager;
import java.nio.charset.StandardCharsets;
diff --git a/src/test/java/io/github/yezhihao/netmc/Test.java b/src/test/java/com/dust/tripartite/netmc/Test.java
similarity index 91%
rename from src/test/java/io/github/yezhihao/netmc/Test.java
rename to src/test/java/com/dust/tripartite/netmc/Test.java
index e1cf787..370e99e 100644
--- a/src/test/java/io/github/yezhihao/netmc/Test.java
+++ b/src/test/java/com/dust/tripartite/netmc/Test.java
@@ -1,4 +1,4 @@
-package io.github.yezhihao.netmc;
+package com.dust.tripartite.netmc;
import io.netty.buffer.ByteBufUtil;
diff --git a/src/test/java/io/github/yezhihao/netmc/codec/MyMessageDecoder.java b/src/test/java/com/dust/tripartite/netmc/codec/MyMessageDecoder.java
similarity index 80%
rename from src/test/java/io/github/yezhihao/netmc/codec/MyMessageDecoder.java
rename to src/test/java/com/dust/tripartite/netmc/codec/MyMessageDecoder.java
index 6c00f60..1805ce7 100644
--- a/src/test/java/io/github/yezhihao/netmc/codec/MyMessageDecoder.java
+++ b/src/test/java/com/dust/tripartite/netmc/codec/MyMessageDecoder.java
@@ -1,8 +1,8 @@
-package io.github.yezhihao.netmc.codec;
+package com.dust.tripartite.netmc.codec;
-import io.github.yezhihao.netmc.model.MyHeader;
-import io.github.yezhihao.netmc.model.MyMessage;
-import io.github.yezhihao.netmc.session.Session;
+import com.dust.tripartite.netmc.model.MyHeader;
+import com.dust.tripartite.netmc.model.MyMessage;
+import com.dust.tripartite.netmc.session.Session;
import io.netty.buffer.ByteBuf;
import java.nio.charset.StandardCharsets;
diff --git a/src/test/java/io/github/yezhihao/netmc/codec/MyMessageEncoder.java b/src/test/java/com/dust/tripartite/netmc/codec/MyMessageEncoder.java
similarity index 77%
rename from src/test/java/io/github/yezhihao/netmc/codec/MyMessageEncoder.java
rename to src/test/java/com/dust/tripartite/netmc/codec/MyMessageEncoder.java
index 09283c5..ac150b7 100644
--- a/src/test/java/io/github/yezhihao/netmc/codec/MyMessageEncoder.java
+++ b/src/test/java/com/dust/tripartite/netmc/codec/MyMessageEncoder.java
@@ -1,8 +1,8 @@
-package io.github.yezhihao.netmc.codec;
+package com.dust.tripartite.netmc.codec;
-import io.github.yezhihao.netmc.model.MyHeader;
-import io.github.yezhihao.netmc.model.MyMessage;
-import io.github.yezhihao.netmc.session.Session;
+import com.dust.tripartite.netmc.model.MyHeader;
+import com.dust.tripartite.netmc.model.MyMessage;
+import com.dust.tripartite.netmc.session.Session;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
diff --git a/src/test/java/com/dust/tripartite/netmc/endpoint/MyEndpoint.java b/src/test/java/com/dust/tripartite/netmc/endpoint/MyEndpoint.java
new file mode 100644
index 0000000..8f98c8c
--- /dev/null
+++ b/src/test/java/com/dust/tripartite/netmc/endpoint/MyEndpoint.java
@@ -0,0 +1,15 @@
+package com.dust.tripartite.netmc.endpoint;
+
+import com.dust.tripartite.netmc.core.annotation.Endpoint;
+import com.dust.tripartite.netmc.core.annotation.Mapping;
+import com.dust.tripartite.netmc.model.MyMessage;
+import com.dust.tripartite.netmc.session.Session;
+
+@Endpoint
+public class MyEndpoint {
+
+ @Mapping(types = 1, desc = "注册")
+ public void register(MyMessage request, Session session) {
+ System.out.println(request);
+ }
+}
diff --git a/src/test/java/io/github/yezhihao/netmc/endpoint/MyHandlerInterceptor.java b/src/test/java/com/dust/tripartite/netmc/endpoint/MyHandlerInterceptor.java
similarity index 90%
rename from src/test/java/io/github/yezhihao/netmc/endpoint/MyHandlerInterceptor.java
rename to src/test/java/com/dust/tripartite/netmc/endpoint/MyHandlerInterceptor.java
index 810c5dc..9bf2762 100644
--- a/src/test/java/io/github/yezhihao/netmc/endpoint/MyHandlerInterceptor.java
+++ b/src/test/java/com/dust/tripartite/netmc/endpoint/MyHandlerInterceptor.java
@@ -1,9 +1,9 @@
-package io.github.yezhihao.netmc.endpoint;
+package com.dust.tripartite.netmc.endpoint;
-import io.github.yezhihao.netmc.core.HandlerInterceptor;
-import io.github.yezhihao.netmc.model.MyHeader;
-import io.github.yezhihao.netmc.model.MyMessage;
-import io.github.yezhihao.netmc.session.Session;
+import com.dust.tripartite.netmc.core.HandlerInterceptor;
+import com.dust.tripartite.netmc.model.MyHeader;
+import com.dust.tripartite.netmc.model.MyMessage;
+import com.dust.tripartite.netmc.session.Session;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/src/test/java/io/github/yezhihao/netmc/model/MyHeader.java b/src/test/java/com/dust/tripartite/netmc/model/MyHeader.java
similarity index 95%
rename from src/test/java/io/github/yezhihao/netmc/model/MyHeader.java
rename to src/test/java/com/dust/tripartite/netmc/model/MyHeader.java
index 015fa0e..5cb6b1a 100644
--- a/src/test/java/io/github/yezhihao/netmc/model/MyHeader.java
+++ b/src/test/java/com/dust/tripartite/netmc/model/MyHeader.java
@@ -1,4 +1,4 @@
-package io.github.yezhihao.netmc.model;
+package com.dust.tripartite.netmc.model;
public class MyHeader {
diff --git a/src/test/java/io/github/yezhihao/netmc/model/MyMessage.java b/src/test/java/com/dust/tripartite/netmc/model/MyMessage.java
similarity index 89%
rename from src/test/java/io/github/yezhihao/netmc/model/MyMessage.java
rename to src/test/java/com/dust/tripartite/netmc/model/MyMessage.java
index 738097d..514a890 100644
--- a/src/test/java/io/github/yezhihao/netmc/model/MyMessage.java
+++ b/src/test/java/com/dust/tripartite/netmc/model/MyMessage.java
@@ -1,7 +1,7 @@
-package io.github.yezhihao.netmc.model;
+package com.dust.tripartite.netmc.model;
-import io.github.yezhihao.netmc.core.model.Message;
-import io.github.yezhihao.netmc.session.Session;
+import com.dust.tripartite.netmc.core.model.Message;
+import com.dust.tripartite.netmc.session.Session;
public class MyMessage implements Message {
diff --git a/src/test/java/io/github/yezhihao/netmc/endpoint/MyEndpoint.java b/src/test/java/io/github/yezhihao/netmc/endpoint/MyEndpoint.java
deleted file mode 100644
index b0986bb..0000000
--- a/src/test/java/io/github/yezhihao/netmc/endpoint/MyEndpoint.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package io.github.yezhihao.netmc.endpoint;
-
-import io.github.yezhihao.netmc.core.annotation.Endpoint;
-import io.github.yezhihao.netmc.core.annotation.Mapping;
-import io.github.yezhihao.netmc.model.MyMessage;
-import io.github.yezhihao.netmc.session.Session;
-
-@Endpoint
-public class MyEndpoint {
-
- @Mapping(types = 1, desc = "注册")
- public void register(MyMessage request, Session session) {
- System.out.println(request);
- }
-}