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
e6e970f1
Commit
e6e970f1
authored
Apr 03, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Netty 服务工厂数据校验修改
parent
5deaf41d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
RpcMainPluginServerFactory.java
...ain/java/com/byit/factory/RpcMainPluginServerFactory.java
+3
-0
NettyPluginServer.java
...rver/src/main/java/com/byit/server/NettyPluginServer.java
+7
-0
plugin.xml
...core/myth-plugin-rpc-server/src/main/resources/plugin.xml
+3
-2
No files found.
byit-plugin-core/myth-plugin-rpc-server/src/main/java/com/byit/factory/RpcMainPluginServerFactory.java
View file @
e6e970f1
package
com
.
byit
.
factory
;
package
com
.
byit
.
factory
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.byit.executor.handler.interfaces.IJobHandler
;
import
com.byit.executor.handler.interfaces.IJobHandler
;
import
com.byit.model.ServerConfigurationModel
;
import
com.byit.model.ServerConfigurationModel
;
import
com.byit.model.ServiceConfigModel
;
import
com.byit.model.ServiceConfigModel
;
...
@@ -52,6 +53,7 @@ public class RpcMainPluginServerFactory extends PluginServerFactory {
...
@@ -52,6 +53,7 @@ public class RpcMainPluginServerFactory extends PluginServerFactory {
serverConfigurationModel
.
getServerEnv
(),
serverConfigurationModel
.
getServerBiz
(),
serverConfigurationModel
.
getServerEnv
(),
serverConfigurationModel
.
getServerBiz
(),
pluginServiceRegistryClass
,
pluginServerClass
);
pluginServiceRegistryClass
,
pluginServerClass
);
if
(
CollectionUtil
.
isNotEmpty
(
classNames
))
{
classNames
.
forEach
((
key
,
value
)
->{
classNames
.
forEach
((
key
,
value
)
->{
try
{
try
{
Object
o
=
Class
.
forName
(
value
).
newInstance
();
Object
o
=
Class
.
forName
(
value
).
newInstance
();
...
@@ -60,6 +62,7 @@ public class RpcMainPluginServerFactory extends PluginServerFactory {
...
@@ -60,6 +62,7 @@ public class RpcMainPluginServerFactory extends PluginServerFactory {
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
});
});
}
super
.
start
();
super
.
start
();
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
...
...
byit-plugin-core/myth-plugin-rpc-server/src/main/java/com/byit/server/NettyPluginServer.java
View file @
e6e970f1
...
@@ -7,9 +7,16 @@ import com.byit.factory.PluginServerFactory;
...
@@ -7,9 +7,16 @@ import com.byit.factory.PluginServerFactory;
* @author huangfu
* @author huangfu
*/
*/
public
class
NettyPluginServer
extends
PluginServer
{
public
class
NettyPluginServer
extends
PluginServer
{
private
Thread
serverThread
;
@Override
@Override
public
void
start
(
PluginServerFactory
pluginServerFactory
)
{
public
void
start
(
PluginServerFactory
pluginServerFactory
)
{
serverThread
=
new
Thread
(()
->{
System
.
out
.
println
(
"-----com.byit.server.NettyPluginServer.start----"
);
System
.
out
.
println
(
"-----com.byit.server.NettyPluginServer.start----"
);
});
serverThread
.
setName
(
"【com.byit.server.NettyPluginServer#start thread run】"
+
serverThread
.
hashCode
());
serverThread
.
setDaemon
(
true
);
serverThread
.
start
();
super
.
onStart
();
}
}
@Override
@Override
...
...
byit-plugin-core/myth-plugin-rpc-server/src/main/resources/plugin.xml
View file @
e6e970f1
...
@@ -10,9 +10,9 @@
...
@@ -10,9 +10,9 @@
<pluginServerClass
value=
"com.byit.server.NettyPluginServer"
/>
<pluginServerClass
value=
"com.byit.server.NettyPluginServer"
/>
</serverConfiguration>
</serverConfiguration>
<classNames>
<
!--<
classNames>
<className jobName="demo" class="com.byit.job.DemoJob"/>
<className jobName="demo" class="com.byit.job.DemoJob"/>
<className jobName="demo1" class="com.byit.job.EndNode"/>
<className jobName="demo1" class="com.byit.job.EndNode"/>
<className jobName="demo2" class="com.byit.job.StartNode"/>
<className jobName="demo2" class="com.byit.job.StartNode"/>
</classNames>
</classNames>
-->
</executor-plugin>
</executor-plugin>
\ No newline at end of file
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