Skip to content

Commit 81a5b71

Browse files
committed
fix variable format
1 parent 0b7ceca commit 81a5b71

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/EventMeshServer.java

+16-16
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class EventMeshServer {
4545

4646
private EventMeshHTTPConfiguration eventMeshHttpConfiguration;
4747

48-
private EventMeshTCPConfiguration eventMeshTCPConfiguration;
48+
private EventMeshTCPConfiguration eventMeshTcpConfiguration;
4949

5050
private Acl acl;
5151

@@ -58,17 +58,17 @@ public class EventMeshServer {
5858
private ServiceState serviceState;
5959

6060
public EventMeshServer(EventMeshHTTPConfiguration eventMeshHttpConfiguration,
61-
EventMeshTCPConfiguration eventMeshTCPConfiguration,
61+
EventMeshTCPConfiguration eventMeshTcpConfiguration,
6262
EventMeshGrpcConfiguration eventMeshGrpcConfiguration) {
6363
this.eventMeshHttpConfiguration = eventMeshHttpConfiguration;
64-
this.eventMeshTCPConfiguration = eventMeshTCPConfiguration;
64+
this.eventMeshTcpConfiguration = eventMeshTcpConfiguration;
6565
this.eventMeshGrpcConfiguration = eventMeshGrpcConfiguration;
6666
this.acl = new Acl();
6767
this.registry = new Registry();
6868
this.trace = new Trace(eventMeshHttpConfiguration.eventMeshServerTraceEnable);
6969
this.connectorResource = new ConnectorResource();
7070

71-
ConfigurationContextUtil.putIfAbsent(ConfigurationContextUtil.TCP, eventMeshTCPConfiguration);
71+
ConfigurationContextUtil.putIfAbsent(ConfigurationContextUtil.TCP, eventMeshTcpConfiguration);
7272
ConfigurationContextUtil.putIfAbsent(ConfigurationContextUtil.GRPC, eventMeshGrpcConfiguration);
7373
ConfigurationContextUtil.putIfAbsent(ConfigurationContextUtil.HTTP, eventMeshHttpConfiguration);
7474
}
@@ -79,10 +79,10 @@ public void init() throws Exception {
7979
}
8080

8181
// registry init
82-
if (eventMeshTCPConfiguration != null
83-
&& eventMeshTCPConfiguration.eventMeshTcpServerEnabled
84-
&& eventMeshTCPConfiguration.eventMeshServerRegistryEnable) {
85-
registry.init(eventMeshTCPConfiguration.eventMeshRegistryPluginType);
82+
if (eventMeshTcpConfiguration != null
83+
&& eventMeshTcpConfiguration.eventMeshTcpServerEnabled
84+
&& eventMeshTcpConfiguration.eventMeshServerRegistryEnable) {
85+
registry.init(eventMeshTcpConfiguration.eventMeshRegistryPluginType);
8686
}
8787

8888
if (eventMeshGrpcConfiguration != null && eventMeshGrpcConfiguration.eventMeshServerRegistryEnable) {
@@ -110,9 +110,9 @@ public void init() throws Exception {
110110
eventMeshHTTPServer.init();
111111
}
112112

113-
if (eventMeshTCPConfiguration != null) {
114-
eventMeshTCPServer = new EventMeshTCPServer(this, eventMeshTCPConfiguration, registry);
115-
if (eventMeshTCPConfiguration.eventMeshTcpServerEnabled) {
113+
if (eventMeshTcpConfiguration != null) {
114+
eventMeshTCPServer = new EventMeshTCPServer(this, eventMeshTcpConfiguration, registry);
115+
if (eventMeshTcpConfiguration.eventMeshTcpServerEnabled) {
116116
eventMeshTCPServer.init();
117117
}
118118
}
@@ -130,9 +130,9 @@ public void start() throws Exception {
130130
acl.start();
131131
}
132132
// registry start
133-
if (eventMeshTCPConfiguration != null
134-
&& eventMeshTCPConfiguration.eventMeshTcpServerEnabled
135-
&& eventMeshTCPConfiguration.eventMeshServerRegistryEnable) {
133+
if (eventMeshTcpConfiguration != null
134+
&& eventMeshTcpConfiguration.eventMeshTcpServerEnabled
135+
&& eventMeshTcpConfiguration.eventMeshServerRegistryEnable) {
136136
registry.start();
137137
}
138138
if (eventMeshHttpConfiguration != null && eventMeshHttpConfiguration.eventMeshServerRegistryEnable) {
@@ -149,7 +149,7 @@ public void start() throws Exception {
149149
if (eventMeshHttpConfiguration != null) {
150150
eventMeshHTTPServer.start();
151151
}
152-
if (eventMeshTCPConfiguration != null && eventMeshTCPConfiguration.eventMeshTcpServerEnabled) {
152+
if (eventMeshTcpConfiguration != null && eventMeshTcpConfiguration.eventMeshTcpServerEnabled) {
153153
eventMeshTCPServer.start();
154154
}
155155
serviceState = ServiceState.RUNNING;
@@ -160,7 +160,7 @@ public void shutdown() throws Exception {
160160
serviceState = ServiceState.STOPING;
161161
logger.info("server state:{}", serviceState);
162162
eventMeshHTTPServer.shutdown();
163-
if (eventMeshTCPConfiguration != null && eventMeshTCPConfiguration.eventMeshTcpServerEnabled) {
163+
if (eventMeshTcpConfiguration != null && eventMeshTcpConfiguration.eventMeshTcpServerEnabled) {
164164
eventMeshTCPServer.shutdown();
165165
}
166166

0 commit comments

Comments
 (0)