Skip to content

Commit

Permalink
[ISSUE apache#3952]Optimize EventMeshServer#EventMeshServer method
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsm committed May 17, 2023
1 parent 3bf8aed commit 2210315
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,16 @@ public EventMeshServer() {

final List<String> provideServerProtocols = configuration.getEventMeshProvideServerProtocols();
for (final String provideServerProtocol : provideServerProtocols) {
if (ConfigurationContextUtil.HTTP.equals(provideServerProtocol)) {
BOOTSTRAP_LIST.add(new EventMeshHttpBootstrap(this));
}
if (ConfigurationContextUtil.TCP.equals(provideServerProtocol)) {
BOOTSTRAP_LIST.add(new EventMeshTcpBootstrap(this));
}
if (ConfigurationContextUtil.GRPC.equals(provideServerProtocol)) {
BOOTSTRAP_LIST.add(new EventMeshGrpcBootstrap(this));
switch (provideServerProtocol) {
case ConfigurationContextUtil.HTTP:
BOOTSTRAP_LIST.add(new EventMeshHttpBootstrap(this));
break;
case ConfigurationContextUtil.TCP:
BOOTSTRAP_LIST.add(new EventMeshTcpBootstrap(this));
break;
case ConfigurationContextUtil.GRPC:
BOOTSTRAP_LIST.add(new EventMeshGrpcBootstrap(this));
break;
}
}
}
Expand Down

0 comments on commit 2210315

Please sign in to comment.