Skip to content

Commit

Permalink
feat[virtual thread]: support virtual thread in net
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysunxiao committed Sep 20, 2023
1 parent d51e343 commit b47e8ea
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
* See the License for the specific language governing permissions and limitations under the License.
*/

package com.zfoo.net.router.receiver;
package com.zfoo.net.enhance;

import com.zfoo.event.anno.Bus;
import com.zfoo.net.anno.Task;
import com.zfoo.net.session.Session;
import com.zfoo.protocol.util.StringUtils;
Expand Down Expand Up @@ -76,7 +75,7 @@ public static IPacketReceiver createPacketReceiver(PacketReceiverDefinition defi
enhanceClazz.addMethod(invokeMethod);

// 定义类实现的接口方法bus
CtMethod busMethod = new CtMethod(classPool.get(Bus.class.getCanonicalName()), "task", null, enhanceClazz);
CtMethod busMethod = new CtMethod(classPool.get(Task.class.getCanonicalName()), "task", null, enhanceClazz);
busMethod.setModifiers(Modifier.PUBLIC + Modifier.FINAL);
String busMethodBody = StringUtils.format("{ return {}.{}; }", Task.class.getCanonicalName(), definition.getTask());
busMethod.setBody(busMethodBody);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/

package com.zfoo.net.router.receiver;
package com.zfoo.net.enhance;

import com.zfoo.net.anno.Task;
import com.zfoo.net.session.Session;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/

package com.zfoo.net.router.receiver;
package com.zfoo.net.enhance;

import com.zfoo.net.anno.Task;
import com.zfoo.net.session.Session;
Expand Down
6 changes: 3 additions & 3 deletions net/src/main/java/com/zfoo/net/router/Router.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
import com.zfoo.net.router.exception.ErrorResponseException;
import com.zfoo.net.router.exception.NetTimeOutException;
import com.zfoo.net.router.exception.UnexpectedProtocolException;
import com.zfoo.net.router.receiver.EnhanceUtils;
import com.zfoo.net.router.receiver.IPacketReceiver;
import com.zfoo.net.router.receiver.PacketReceiverDefinition;
import com.zfoo.net.enhance.EnhanceUtils;
import com.zfoo.net.enhance.IPacketReceiver;
import com.zfoo.net.enhance.PacketReceiverDefinition;
import com.zfoo.net.session.Session;
import com.zfoo.net.task.PacketReceiverTask;
import com.zfoo.net.task.TaskBus;
Expand Down

0 comments on commit b47e8ea

Please sign in to comment.