org.springframework.integration.annotation.Gateway类的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(190)

本文整理了Java中org.springframework.integration.annotation.Gateway类的一些代码示例,展示了Gateway类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Gateway类的具体详情如下:
包路径:org.springframework.integration.annotation.Gateway
类名称:Gateway

Gateway介绍

暂无

代码示例

代码示例来源:origin: spring-cloud/spring-cloud-sleuth

@Gateway(requestChannel = "messages")
void send(String message);

代码示例来源:origin: spring-projects/spring-integration

Map<String, Expression> headerExpressions = new HashMap<String, Expression>();
if (gatewayAnnotation != null) {
  requestChannelName = gatewayAnnotation.requestChannel();
  replyChannelName = gatewayAnnotation.replyChannel();
  if (requestTimeout == null || gatewayAnnotation.requestTimeout() != Long.MIN_VALUE) {
    requestTimeout = new ValueExpression<>(gatewayAnnotation.requestTimeout());
  if (StringUtils.hasText(gatewayAnnotation.requestTimeoutExpression())) {
    requestTimeout = ExpressionUtils.longExpression(gatewayAnnotation.requestTimeoutExpression());
  if (replyTimeout == null || gatewayAnnotation.replyTimeout() != Long.MIN_VALUE) {
    replyTimeout = new ValueExpression<>(gatewayAnnotation.replyTimeout());
  if (StringUtils.hasText(gatewayAnnotation.replyTimeoutExpression())) {
    replyTimeout = ExpressionUtils.longExpression(gatewayAnnotation.replyTimeoutExpression());
  if (payloadExpression == null || StringUtils.hasText(gatewayAnnotation.payloadExpression())) {
    payloadExpression = gatewayAnnotation.payloadExpression();
  if (!ObjectUtils.isEmpty(gatewayAnnotation.headers())) {
    for (GatewayHeader gatewayHeader : gatewayAnnotation.headers()) {
      String value = gatewayHeader.value();
      String expression = gatewayHeader.expression();

代码示例来源:origin: org.springframework.integration/org.springframework.integration

if (gatewayAnnotation != null) {
  Assert.state(this.getChannelResolver() != null, "ChannelResolver is required");
  String requestChannelName = gatewayAnnotation.requestChannel();
  if (StringUtils.hasText(requestChannelName)) {
    requestChannel = this.getChannelResolver().resolveChannelName(requestChannelName);
    Assert.notNull(requestChannel, "failed to resolve request channel '" + requestChannelName + "'");
  String replyChannelName = gatewayAnnotation.replyChannel();
  if (StringUtils.hasText(replyChannelName)) {
    replyChannel = this.getChannelResolver().resolveChannelName(replyChannelName);
    Assert.notNull(replyChannel, "failed to resolve reply channel '" + replyChannelName + "'");
  requestTimeout = gatewayAnnotation.requestTimeout();
  replyTimeout = gatewayAnnotation.replyTimeout();

代码示例来源:origin: org.springframework.integration/spring-integration-core

Map<String, Expression> headerExpressions = new HashMap<String, Expression>();
if (gatewayAnnotation != null) {
  requestChannelName = gatewayAnnotation.requestChannel();
  replyChannelName = gatewayAnnotation.replyChannel();
  if (requestTimeout == null || gatewayAnnotation.requestTimeout() != Long.MIN_VALUE) {
    requestTimeout = new ValueExpression<>(gatewayAnnotation.requestTimeout());
  if (StringUtils.hasText(gatewayAnnotation.requestTimeoutExpression())) {
    requestTimeout = ExpressionUtils.longExpression(gatewayAnnotation.requestTimeoutExpression());
  if (replyTimeout == null || gatewayAnnotation.replyTimeout() != Long.MIN_VALUE) {
    replyTimeout = new ValueExpression<>(gatewayAnnotation.replyTimeout());
  if (StringUtils.hasText(gatewayAnnotation.replyTimeoutExpression())) {
    replyTimeout = ExpressionUtils.longExpression(gatewayAnnotation.replyTimeoutExpression());
  if (payloadExpression == null || StringUtils.hasText(gatewayAnnotation.payloadExpression())) {
    payloadExpression = gatewayAnnotation.payloadExpression();
  if (!ObjectUtils.isEmpty(gatewayAnnotation.headers())) {
    for (GatewayHeader gatewayHeader : gatewayAnnotation.headers()) {
      String value = gatewayHeader.value();
      String expression = gatewayHeader.expression();

代码示例来源:origin: spring-cloud/spring-cloud-sleuth

@Gateway(requestChannel = "xform")
String send(String input);

代码示例来源:origin: spring-projects/spring-integration-samples

@Gateway(requestChannel="orders")
void placeOrder(Order order);

代码示例来源:origin: spring-projects/spring-integration-samples

@Gateway(requestChannel = "gatewayChannel")
Mono<Integer> multiplyByTwo(int number);

代码示例来源:origin: spring-projects/spring-integration-samples

@Gateway(requestChannel = "gatewayChannel")
ListenableFuture<Integer> multiplyByTwo(int number);

代码示例来源:origin: spring-projects/spring-integration

@Gateway(requestChannel = "monoChannel")
Mono<Integer> multiply(Integer value);

代码示例来源:origin: spring-projects/spring-integration

@Gateway(replyTimeout = -1)
String annotationShouldOverrideDefaultToInfinity(String foo);

代码示例来源:origin: spring-projects/spring-integration

@Gateway(requestChannel = "requestChannelBar")
void bar(String payload);

代码示例来源:origin: spring-projects/spring-integration

@Gateway(requestChannel = "gatewayThreadChannel")
Future<Thread> test3(Thread caller);

代码示例来源:origin: spring-projects/spring-integration

@Gateway(requestChannel = "gatewayThreadChannel")
Future<Thread> test1(Thread caller);

代码示例来源:origin: spring-projects/spring-integration

@Gateway(payloadExpression = "#args[0]", requestChannel = "lateReplyChannel",
    requestTimeoutExpression = "#args[1]", replyTimeoutExpression = "#args[2]")
String lateReply(String payload, long requestTimeout, long replyTimeout);

代码示例来源:origin: spring-projects/spring-integration

@Gateway(requestChannel = "requestChannelFoo")
void foo(String payload);

代码示例来源:origin: spring-projects/spring-integration

@Gateway(requestChannel = "queueChannel")
Future<String> test(String payload);

代码示例来源:origin: spring-projects/spring-integration

@Gateway
String annotationShouldntOverrideDefault(String foo);

代码示例来源:origin: spring-projects/spring-integration

@Gateway(replyTimeout = 234)
String annotationShouldOverrideDefault(String foo);

代码示例来源:origin: spring-projects/spring-integration

@Gateway(requestChannel = "gatewayChannel", payloadExpression = "#args[0]")
Object test1(Map<Object, ?> map);

代码示例来源:origin: spring-projects/spring-integration

@Gateway(requestChannel = "gatewayThreadChannel")
Future<Thread> test1(Thread caller);

相关文章