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
5b636225
Commit
5b636225
authored
Nov 17, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整代码规范
parent
f9d7178d
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
16 additions
and
55 deletions
+16
-55
RpcResultHttpCallback.java
...re/src/main/java/com/byit/conf/RpcResultHttpCallback.java
+0
-31
EndFlowEvent.java
...admin-core/src/main/java/com/byit/event/EndFlowEvent.java
+1
-0
JobStatusResultDto.java
...src/main/java/com/byit/dto/plugin/JobStatusResultDto.java
+1
-0
RunLog.java
...th-dto-core/src/main/java/com/byit/dto/plugin/RunLog.java
+3
-3
ReturnResult.java
...dto-core/src/main/java/com/byit/dto/web/ReturnResult.java
+1
-0
ImperativeExecutionImpl.java
...c/main/java/com/byit/service/ImperativeExecutionImpl.java
+3
-0
PluginRpcRequestPacket.java
.../java/com/byit/packet/request/PluginRpcRequestPacket.java
+0
-1
ResultCallback.java
...c-common/src/main/java/com/byit/param/ResultCallback.java
+0
-18
DefaultRemainingOperationsCallBack.java
...com/byit/callback/DefaultRemainingOperationsCallBack.java
+1
-1
GetRegisteredDataUtil.java
...r/src/main/java/com/byit/utils/GetRegisteredDataUtil.java
+6
-1
No files found.
byit-myth-core/myth-admin-core/src/main/java/com/byit/conf/RpcResultHttpCallback.java
deleted
100644 → 0
View file @
f9d7178d
package
com
.
byit
.
conf
;
import
cn.hutool.http.HttpRequest
;
import
com.alibaba.fastjson.JSON
;
import
com.byit.dto.web.ResponseResult
;
import
com.byit.packet.response.PluginRpcResponsePacket
;
import
com.byit.param.ResultCallback
;
import
io.netty.channel.ChannelHandlerContext
;
import
static
com
.
alibaba
.
fastjson
.
serializer
.
SerializerFeature
.
WriteClassName
;
/**
* @author huangfu
*/
public
class
RpcResultHttpCallback
implements
ResultCallback
{
private
String
gatewayIpAndPort
;
public
RpcResultHttpCallback
(
String
gatewayIpAndPort
)
{
this
.
gatewayIpAndPort
=
"http://"
+
gatewayIpAndPort
+
"/myth-job-admin/api/callback/callbackRes"
;
}
@Override
public
void
resultCallback
(
ChannelHandlerContext
ctx
,
PluginRpcResponsePacket
pluginRpcResponsePacket
)
{
Object
result
=
pluginRpcResponsePacket
.
getResult
();
String
responseStr
=
JSON
.
toJSONString
(
pluginRpcResponsePacket
,
WriteClassName
);
HttpRequest
post
=
HttpRequest
.
post
(
gatewayIpAndPort
);
post
.
header
(
"token"
,
"Token"
);
post
.
body
(
"param="
+
responseStr
).
execute
();
System
.
out
.
println
(
"-------消息回复成功-----------"
);
}
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/event/EndFlowEvent.java
View file @
5b636225
...
@@ -8,6 +8,7 @@ import org.springframework.context.ApplicationEvent;
...
@@ -8,6 +8,7 @@ import org.springframework.context.ApplicationEvent;
*/
*/
public
class
EndFlowEvent
extends
ApplicationEvent
{
public
class
EndFlowEvent
extends
ApplicationEvent
{
private
static
final
long
serialVersionUID
=
2874836396737756384L
;
private
Integer
flowId
;
private
Integer
flowId
;
/**
/**
...
...
byit-myth-core/myth-dto-core/src/main/java/com/byit/dto/plugin/JobStatusResultDto.java
View file @
5b636225
...
@@ -16,6 +16,7 @@ import java.io.Serializable;
...
@@ -16,6 +16,7 @@ import java.io.Serializable;
@NoArgsConstructor
@NoArgsConstructor
public
class
JobStatusResultDto
implements
Serializable
{
public
class
JobStatusResultDto
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
3939600613125618193L
;
private
String
jobName
;
private
String
jobName
;
/**
/**
* 调度类型
* 调度类型
...
...
byit-myth-core/myth-dto-core/src/main/java/com/byit/dto/plugin/RunLog.java
View file @
5b636225
...
@@ -8,9 +8,9 @@ import lombok.NoArgsConstructor;
...
@@ -8,9 +8,9 @@ import lombok.NoArgsConstructor;
import
java.io.Serializable
;
import
java.io.Serializable
;
/**
/**
*
@Description
运行日志信息
* 运行日志信息
*
@A
uthor guo_m
*
a
uthor guo_m
* @
D
ate 2020-03-19
* @
d
ate 2020-03-19
*/
*/
@Data
@Data
@Builder
@Builder
...
...
byit-myth-core/myth-dto-core/src/main/java/com/byit/dto/web/ReturnResult.java
View file @
5b636225
...
@@ -9,6 +9,7 @@ import java.io.Serializable;
...
@@ -9,6 +9,7 @@ import java.io.Serializable;
/**
/**
* 当前规定的所有的返回结果集都必须是{@link com.byit.dto.specials.SpecialJavaNode} 类型的
* 当前规定的所有的返回结果集都必须是{@link com.byit.dto.specials.SpecialJavaNode} 类型的
* 这个方法是rpc回调结果集合
*
*
* @program: byit-myth-job->ReturnResult
* @program: byit-myth-job->ReturnResult
* @description: 服务调用的返回结果
* @description: 服务调用的返回结果
...
...
byit-myth-executor/myth-executor-server/src/main/java/com/byit/service/ImperativeExecutionImpl.java
View file @
5b636225
...
@@ -42,6 +42,9 @@ public class ImperativeExecutionImpl implements ScriptExecutorService {
...
@@ -42,6 +42,9 @@ public class ImperativeExecutionImpl implements ScriptExecutorService {
private
final
ParameterVerificationProcessingMachine
parameterVerificationProcessingMachine
;
private
final
ParameterVerificationProcessingMachine
parameterVerificationProcessingMachine
;
private
final
StringRedisTemplate
stringRedisTemplate
;
private
final
StringRedisTemplate
stringRedisTemplate
;
/**
* 节点运行成功代码
*/
private
static
final
Integer
NODE_RUN_SUCCESS_CODE
=
0
;
private
static
final
Integer
NODE_RUN_SUCCESS_CODE
=
0
;
/**
/**
* 节点被杀死
* 节点被杀死
...
...
byit-plugin-core/byit-plugin-rpc-common/src/main/java/com/byit/packet/request/PluginRpcRequestPacket.java
View file @
5b636225
...
@@ -4,7 +4,6 @@ import com.byit.enums.Command;
...
@@ -4,7 +4,6 @@ import com.byit.enums.Command;
import
com.byit.enums.SerializerAlgorithm
;
import
com.byit.enums.SerializerAlgorithm
;
import
com.byit.packet.BasePacketModel
;
import
com.byit.packet.BasePacketModel
;
import
com.byit.param.CommunicationParam
;
import
com.byit.param.CommunicationParam
;
import
com.byit.param.ResultCallback
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
...
...
byit-plugin-core/byit-plugin-rpc-common/src/main/java/com/byit/param/ResultCallback.java
deleted
100644 → 0
View file @
f9d7178d
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/myth-plugin-rpc-server/src/main/java/com/byit/callback/DefaultRemainingOperationsCallBack.java
View file @
5b636225
...
@@ -20,7 +20,7 @@ import static com.alibaba.fastjson.serializer.SerializerFeature.WriteClassName;
...
@@ -20,7 +20,7 @@ import static com.alibaba.fastjson.serializer.SerializerFeature.WriteClassName;
public
class
DefaultRemainingOperationsCallBack
implements
RemainingOperationsCallBack
{
public
class
DefaultRemainingOperationsCallBack
implements
RemainingOperationsCallBack
{
@Override
@Override
public
void
serverRemainingOperations
(
Map
<
String
,
Object
>
map
)
{
public
void
serverRemainingOperations
(
Map
<
String
,
Object
>
map
)
{
//注册方法数据
//注册方法数据
TODO 这里是游离线程 会出问题
new
Thread
(()
->{
new
Thread
(()
->{
map
.
forEach
((
key
,
value
)
->{
map
.
forEach
((
key
,
value
)
->{
Class
<?>
nodeClass
=
value
.
getClass
();
Class
<?>
nodeClass
=
value
.
getClass
();
...
...
byit-plugin-core/plugin-spring-boot-starter/src/main/java/com/byit/utils/GetRegisteredDataUtil.java
View file @
5b636225
...
@@ -14,12 +14,17 @@ public class GetRegisteredDataUtil {
...
@@ -14,12 +14,17 @@ public class GetRegisteredDataUtil {
/**
/**
* 插件客户端工厂
* 插件客户端工厂
*/
*/
private
PluginSpringClientFactory
pluginSpringClientFactory
;
private
final
PluginSpringClientFactory
pluginSpringClientFactory
;
public
GetRegisteredDataUtil
(
PluginSpringClientFactory
pluginSpringClientFactory
)
{
public
GetRegisteredDataUtil
(
PluginSpringClientFactory
pluginSpringClientFactory
)
{
this
.
pluginSpringClientFactory
=
pluginSpringClientFactory
;
this
.
pluginSpringClientFactory
=
pluginSpringClientFactory
;
}
}
/**
* 根据 服务名称获取该服务下所由的ip地址及端口号
* @param serverName 服务名称
* @return 服务ip:port
*/
public
TreeSet
<
String
>
getRegisteredIpAndPort
(
String
serverName
){
public
TreeSet
<
String
>
getRegisteredIpAndPort
(
String
serverName
){
//获取插件工厂对象
//获取插件工厂对象
PluginClientFactory
pluginClientFactory
=
pluginSpringClientFactory
.
getPluginClientFactory
();
PluginClientFactory
pluginClientFactory
=
pluginSpringClientFactory
.
getPluginClientFactory
();
...
...
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