Skip to content

Commit

Permalink
fix variable format
Browse files Browse the repository at this point in the history
  • Loading branch information
lrhkobe committed Jun 24, 2022
1 parent cf06a48 commit db3bd54
Showing 1 changed file with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class EventMeshServer {

private EventMeshHTTPConfiguration eventMeshHttpConfiguration;

private EventMeshTCPConfiguration eventMeshTCPConfiguration;
private EventMeshTCPConfiguration eventMeshTcpConfiguration;

private Acl acl;

Expand All @@ -58,17 +58,17 @@ public class EventMeshServer {
private ServiceState serviceState;

public EventMeshServer(EventMeshHTTPConfiguration eventMeshHttpConfiguration,
EventMeshTCPConfiguration eventMeshTCPConfiguration,
EventMeshTCPConfiguration eventMeshTcpConfiguration,
EventMeshGrpcConfiguration eventMeshGrpcConfiguration) {
this.eventMeshHttpConfiguration = eventMeshHttpConfiguration;
this.eventMeshTCPConfiguration = eventMeshTCPConfiguration;
this.eventMeshTcpConfiguration = eventMeshTcpConfiguration;
this.eventMeshGrpcConfiguration = eventMeshGrpcConfiguration;
this.acl = new Acl();
this.registry = new Registry();
this.trace = new Trace(eventMeshHttpConfiguration.eventMeshServerTraceEnable);
this.connectorResource = new ConnectorResource();

ConfigurationContextUtil.putIfAbsent(ConfigurationContextUtil.TCP, eventMeshTCPConfiguration);
ConfigurationContextUtil.putIfAbsent(ConfigurationContextUtil.TCP, eventMeshTcpConfiguration);
ConfigurationContextUtil.putIfAbsent(ConfigurationContextUtil.GRPC, eventMeshGrpcConfiguration);
ConfigurationContextUtil.putIfAbsent(ConfigurationContextUtil.HTTP, eventMeshHttpConfiguration);
}
Expand All @@ -79,10 +79,10 @@ public void init() throws Exception {
}

// registry init
if (eventMeshTCPConfiguration != null
&& eventMeshTCPConfiguration.eventMeshTcpServerEnabled
&& eventMeshTCPConfiguration.eventMeshServerRegistryEnable) {
registry.init(eventMeshTCPConfiguration.eventMeshRegistryPluginType);
if (eventMeshTcpConfiguration != null
&& eventMeshTcpConfiguration.eventMeshTcpServerEnabled
&& eventMeshTcpConfiguration.eventMeshServerRegistryEnable) {
registry.init(eventMeshTcpConfiguration.eventMeshRegistryPluginType);
}

if (eventMeshGrpcConfiguration != null && eventMeshGrpcConfiguration.eventMeshServerRegistryEnable) {
Expand Down Expand Up @@ -110,9 +110,9 @@ public void init() throws Exception {
eventMeshHTTPServer.init();
}

if (eventMeshTCPConfiguration != null) {
eventMeshTCPServer = new EventMeshTCPServer(this, eventMeshTCPConfiguration, registry);
if (eventMeshTCPConfiguration.eventMeshTcpServerEnabled) {
if (eventMeshTcpConfiguration != null) {
eventMeshTCPServer = new EventMeshTCPServer(this, eventMeshTcpConfiguration, registry);
if (eventMeshTcpConfiguration.eventMeshTcpServerEnabled) {
eventMeshTCPServer.init();
}
}
Expand All @@ -130,9 +130,9 @@ public void start() throws Exception {
acl.start();
}
// registry start
if (eventMeshTCPConfiguration != null
&& eventMeshTCPConfiguration.eventMeshTcpServerEnabled
&& eventMeshTCPConfiguration.eventMeshServerRegistryEnable) {
if (eventMeshTcpConfiguration != null
&& eventMeshTcpConfiguration.eventMeshTcpServerEnabled
&& eventMeshTcpConfiguration.eventMeshServerRegistryEnable) {
registry.start();
}
if (eventMeshHttpConfiguration != null && eventMeshHttpConfiguration.eventMeshServerRegistryEnable) {
Expand All @@ -149,7 +149,7 @@ public void start() throws Exception {
if (eventMeshHttpConfiguration != null) {
eventMeshHTTPServer.start();
}
if (eventMeshTCPConfiguration != null && eventMeshTCPConfiguration.eventMeshTcpServerEnabled) {
if (eventMeshTcpConfiguration != null && eventMeshTcpConfiguration.eventMeshTcpServerEnabled) {
eventMeshTCPServer.start();
}
serviceState = ServiceState.RUNNING;
Expand All @@ -160,7 +160,7 @@ public void shutdown() throws Exception {
serviceState = ServiceState.STOPING;
logger.info("server state:{}", serviceState);
eventMeshHTTPServer.shutdown();
if (eventMeshTCPConfiguration != null && eventMeshTCPConfiguration.eventMeshTcpServerEnabled) {
if (eventMeshTcpConfiguration != null && eventMeshTcpConfiguration.eventMeshTcpServerEnabled) {
eventMeshTCPServer.shutdown();
}

Expand Down

0 comments on commit db3bd54

Please sign in to comment.