org.springframework.integration.context.IntegrationObjectSupport Java Examples

The following examples show how to use org.springframework.integration.context.IntegrationObjectSupport. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OpenTracingChannelInterceptor.java    From java-specialagent with Apache License 2.0 6 votes vote down vote up
protected String getChannelName(MessageChannel messageChannel) {
  String name = null;
  if (ClassUtils.isPresent("org.springframework.integration.context.IntegrationObjectSupport", null)) {
    if (messageChannel instanceof IntegrationObjectSupport) {
      name = ((IntegrationObjectSupport) messageChannel).getComponentName();
    }
    if (name == null && messageChannel instanceof AbstractMessageChannel) {
      name = ((AbstractMessageChannel) messageChannel).getFullChannelName();
    }
  }

  if (name == null) {
    return messageChannel.toString();
  }

  return name;
}
 
Example #2
Source File: TracingChannelInterceptor.java    From spring-cloud-sleuth with Apache License 2.0 5 votes vote down vote up
private String channelName(MessageChannel channel) {
	String name = null;
	if (this.integrationObjectSupportPresent) {
		if (channel instanceof IntegrationObjectSupport) {
			name = ((IntegrationObjectSupport) channel).getComponentName();
		}
		if (name == null && channel instanceof AbstractMessageChannel) {
			name = ((AbstractMessageChannel) channel).getFullChannelName();
		}
	}
	if (name == null) {
		name = channel.toString();
	}
	return name;
}
 
Example #3
Source File: DefaultBinding.java    From spring-cloud-stream with Apache License 2.0 4 votes vote down vote up
public String getBindingName() {
	String resolvedName = (this.target instanceof IntegrationObjectSupport)
			? ((IntegrationObjectSupport) this.target).getComponentName() : getName();
	return resolvedName == null ? getName() : resolvedName;
}