Skip to content

Commit 70e49b9

Browse files
Implement #getComponentType
Signed-off-by: Tran Ngoc Nhan <[email protected]>
1 parent 66aebbb commit 70e49b9

File tree

12 files changed

+47
-7
lines changed

12 files changed

+47
-7
lines changed

spring-integration-core/src/main/java/org/springframework/integration/channel/DefaultHeaderChannelRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public void run() {
261261

262262
@Override
263263
public String getComponentType() {
264-
return "channel";
264+
return "header-channel-registry";
265265
}
266266

267267
protected record MessageChannelWrapper(MessageChannel channel, long expireAt) {

spring-integration-core/src/main/java/org/springframework/integration/endpoint/AbstractEndpoint.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,6 @@ public final void stop(Runnable callback) {
201201
}
202202
}
203203

204-
@Override
205-
public String getComponentType() {
206-
return "endpoint";
207-
}
208-
209204
/**
210205
* Stop the component and invoke callback.
211206
* @param callback the Runnable to invoke.

spring-integration-core/src/main/java/org/springframework/integration/endpoint/AbstractPollingEndpoint.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ public void setTransactionSynchronizationFactory(
183183
this.transactionSynchronizationFactory = transactionSynchronizationFactory;
184184
}
185185

186+
@Override
187+
public String getComponentType() {
188+
return "polling-endpoint";
189+
}
190+
186191
/**
187192
* Return the default error channel if the error handler is explicitly provided and
188193
* it is a {@link MessagePublishingErrorHandler}.

spring-integration-core/src/main/java/org/springframework/integration/endpoint/EventDrivenConsumer.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,9 @@ private void logComponentSubscriptionEvent(boolean add) {
123123
}
124124
}
125125

126+
@Override
127+
public String getComponentType() {
128+
return "event-driven";
129+
}
130+
126131
}

spring-integration-core/src/main/java/org/springframework/integration/endpoint/MessageProducerSupport.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ public void setOutputChannelName(String outputChannelName) {
111111
return this.outputChannel;
112112
}
113113

114+
@Override
115+
public String getComponentType() {
116+
return "message-producer";
117+
}
118+
114119
public void setErrorChannel(MessageChannel errorChannel) {
115120
this.errorChannel = errorChannel;
116121
}

spring-integration-core/src/main/java/org/springframework/integration/endpoint/ReactiveStreamsConsumer.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,11 @@ protected void doStop() {
208208
}
209209
}
210210

211+
@Override
212+
public String getComponentType() {
213+
return "reactive-streams";
214+
}
215+
211216
private static final class MessageHandlerSubscriber
212217
implements CoreSubscriber<Message<?>>, Disposable, Lifecycle {
213218

spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,6 +1055,11 @@ public void destroy() {
10551055
this.gatewayMap.values().forEach(MethodInvocationGateway::destroy);
10561056
}
10571057

1058+
@Override
1059+
public String getComponentType() {
1060+
return "gateway-proxy-factory";
1061+
}
1062+
10581063
private static final class MethodInvocationGateway extends MessagingGatewaySupport {
10591064

10601065
private Expression receiveTimeoutExpression;

spring-integration-core/src/test/java/org/springframework/integration/endpoint/MessageProducerSupportTests.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,11 @@ protected void doStop() {
202202
this.stopped.set(true);
203203
}
204204

205+
@Override
206+
public String getComponentType() {
207+
return "custom-endpoint";
208+
}
209+
205210
}
206211

207212
}

spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/AbstractConnectionFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public ApplicationEventPublisher getApplicationEventPublisher() {
167167

168168
@Override
169169
public String getComponentType() {
170-
return "connection";
170+
return "connection-factory";
171171
}
172172

173173
/**

spring-integration-jmx/src/test/java/org/springframework/integration/monitor/MBeanExporterIntegrationTests.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,11 @@ protected void doStart() {
302302
protected void doStop() {
303303
}
304304

305+
@Override
306+
public String getComponentType() {
307+
return "bogus-endpoint";
308+
}
309+
305310
}
306311

307312
public static class DateFactoryBean implements FactoryBean<Date> {

0 commit comments

Comments
 (0)