Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
byit-myth-job
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyuan
byit-myth-job
Commits
08c1cab7
Commit
08c1cab7
authored
Apr 09, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Netty 结果自动以回调开发
parent
02f63551
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
ResultCallback.java
...c-common/src/main/java/com/byit/param/ResultCallback.java
+18
-0
DefaultResultCallback.java
...va/com/byit/param/defaultparam/DefaultResultCallback.java
+18
-0
No files found.
byit-plugin-core/byit-plugin-rpc-common/src/main/java/com/byit/param/ResultCallback.java
0 → 100644
View file @
08c1cab7
package
com
.
byit
.
param
;
import
com.byit.packet.response.PluginRpcResponsePacket
;
import
io.netty.channel.ChannelHandlerContext
;
import
java.io.Serializable
;
/**
* @author 结果集回调 用户自定义实现 执行完成后的结果返回操作
*/
public
interface
ResultCallback
extends
Serializable
{
/**
* 对于服务器处理完的数据 用户自定义定义返回操作
* @param ctx
* @param pluginRpcResponsePacket
*/
void
resultCallback
(
ChannelHandlerContext
ctx
,
PluginRpcResponsePacket
pluginRpcResponsePacket
);
}
byit-plugin-core/byit-plugin-rpc-common/src/main/java/com/byit/param/defaultparam/DefaultResultCallback.java
0 → 100644
View file @
08c1cab7
package
com
.
byit
.
param
.
defaultparam
;
import
com.alibaba.fastjson.JSON
;
import
com.byit.packet.response.PluginRpcResponsePacket
;
import
com.byit.param.ResultCallback
;
import
io.netty.channel.ChannelHandlerContext
;
/**
* 默认的回调方式
* @author huangfu
*/
public
class
DefaultResultCallback
implements
ResultCallback
{
@Override
public
void
resultCallback
(
ChannelHandlerContext
ctx
,
PluginRpcResponsePacket
pluginRpcResponsePacket
)
{
System
.
out
.
println
(
pluginRpcResponsePacket
);
System
.
out
.
println
(
JSON
.
toJSONString
(
pluginRpcResponsePacket
));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment