public class GatewayProxySpec extends ObjectSE implements ComponentsRegistration
MessagingGateway
を宣言できない場合の GatewayProxyFactoryBean
オプションのビルダー。修飾子と型 | フィールドと説明 |
---|---|
protected GatewayMethodMetadata | gatewayMethodMetadata |
protected GatewayProxyFactoryBean | gatewayProxyFactoryBean |
protected MessageChannel | gatewayRequestChannel |
protected MapSE<StringSE, Expression> | headerExpressions |
protected static SpelExpressionParser | PARSER |
修飾子 | コンストラクターと説明 |
---|---|
protected | GatewayProxySpec(ClassSE<?> serviceInterface) |
修飾子と型 | メソッドと説明 |
---|---|
GatewayProxySpec | asyncExecutor(ExecutorSE executor) Future SE 戻り値の型を持つ任意のインターフェースメソッドに使用する Executor SE の実装への参照を提供します。 |
GatewayProxySpec | beanName(StringSE beanName) ターゲット GatewayProxyFactoryBean の Bean 名を指定します。 |
GatewayProxySpec | errorChannel(MessageChannel errorChannel) ゲートウェイのプロキシ呼び出しで障害が発生した場合にエラーメッセージが送信されるチャネルを識別します。 |
GatewayProxySpec | errorChannel(StringSE errorChannelName) ゲートウェイのプロキシ呼び出しで障害が発生した場合にエラーメッセージが送信されるチャネルを識別します。 |
MapSE<ObjectSE, StringSE> | getComponentsToRegister() |
GatewayProxySpec | header(StringSE headerName, Expression valueExpression) カスタムメッセージヘッダーを提供します。 |
GatewayProxySpec | header(StringSE headerName, java.util.function.FunctionSE<MethodArgsHolder,?> valueFunction) カスタムメッセージヘッダーを提供します。 |
GatewayProxySpec | header(StringSE headerName, ObjectSE value) カスタムメッセージヘッダーを提供します。 |
GatewayProxySpec | mapper(MethodArgsMessageMapper mapper) メソッド引数を Message にマップするための MethodArgsMessageMapper 。 |
GatewayProxySpec | payloadExpression(Expression expression) メソッド宣言によって明示的にオーバーライドされない限り、サービスインターフェースのすべてのメソッドの payload を生成するために使用される式。 |
GatewayProxySpec | payloadExpression(StringSE expression) メソッド宣言によって明示的にオーバーライドされない限り、サービスインターフェースのすべてのメソッドの payload を生成するために使用される式。 |
GatewayProxySpec | payloadFunction(java.util.function.FunctionSE<MethodArgsHolder,?> defaultPayloadFunction) メソッド宣言によって明示的にオーバーライドされない限り、サービスインターフェースのすべてのメソッドの payload を生成するために使用される Function SE。 |
GatewayProxySpec | proxyDefaultMethods(boolean proxyDefaultMethods) インターフェースの default メソッドもプロキシする必要があるかどうかを示します。 |
GatewayProxySpec | replyChannel(MessageChannel replyChannel) ゲートウェイプロキシがサブスクライブするデフォルトチャネルを識別し、応答 Message を受信します。そのペイロードは、メソッドシグネチャーの戻り値の型に変換されます。 |
GatewayProxySpec | replyChannel(StringSE channelName) ゲートウェイプロキシがサブスクライブするデフォルトチャネルを識別し、応答 Message を受信します。そのペイロードは、メソッドシグネチャーの戻り値の型に変換されます。 |
GatewayProxySpec | replyTimeout(long replyTimeout) このゲートウェイが応答 Message を待ってから戻るまでの時間を指定できます。 |
GatewayProxySpec | requestTimeout(long requestTimeout) ディスパッチャーが Message の送信を待機する時間を提供します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
protected static final SpelExpressionParser PARSER
protected final MessageChannel gatewayRequestChannel
protected final GatewayProxyFactoryBean gatewayProxyFactoryBean
protected final GatewayMethodMetadata gatewayMethodMetadata
protected final MapSE<StringSE,Expression> headerExpressions
protected GatewayProxySpec(ClassSE<?> serviceInterface)
public GatewayProxySpec beanName(@Nullable StringSE beanName)
GatewayProxyFactoryBean
の Bean 名を指定します。beanName
- ゲートウェイプロキシに Bean を登録するために使用される Bean 名 GatewayProxySpec
。public GatewayProxySpec replyChannel(StringSE channelName)
Message
を受信します。そのペイロードは、メソッドシグネチャーの戻り値の型に変換されます。channelName
- MessageChannel
の Bean 名 GatewayProxySpec
。GatewayProxyFactoryBean.setDefaultReplyChannel(org.springframework.messaging.MessageChannel)
public GatewayProxySpec replyChannel(MessageChannel replyChannel)
Message
を受信します。そのペイロードは、メソッドシグネチャーの戻り値の型に変換されます。replyChannel
- 返信用の MessageChannel
。GatewayProxySpec
。GatewayProxyFactoryBean.setDefaultReplyChannel(org.springframework.messaging.MessageChannel)
public GatewayProxySpec errorChannel(StringSE errorChannelName)
errorChannel
参照が提供されていない場合、ゲートウェイは Exception
を呼び出し元に伝搬します。Exception
を完全に抑制するには、ここで nullChannel
への参照を提供します。errorChannelName
- MessageChannel
の Bean 名 GatewayProxySpec
。GatewayProxyFactoryBean.setErrorChannel(org.springframework.messaging.MessageChannel)
public GatewayProxySpec errorChannel(MessageChannel errorChannel)
errorChannel
参照が提供されていない場合、ゲートウェイは Exception
を呼び出し元に伝搬します。Exception
を完全に抑制するには、ここで nullChannel
への参照を提供します。errorChannel
- 返信用の MessageChannel
。GatewayProxySpec
。GatewayProxyFactoryBean.setErrorChannel(org.springframework.messaging.MessageChannel)
public GatewayProxySpec requestTimeout(long requestTimeout)
Message
の送信を待機する時間を提供します。このタイムアウトは、送信呼び出しでブロックされる可能性がある場合にのみ適用されます。たとえば、このゲートウェイが QueueChannel
に接続されている場合です。値はミリ秒単位で指定されます。requestTimeout
- リクエストのタイムアウト(ミリ秒単位)。GatewayProxySpec
。GatewayProxyFactoryBean.setDefaultRequestTimeout(java.lang.Long)
public GatewayProxySpec replyTimeout(long replyTimeout)
Message
を待ってから戻るまでの時間を指定できます。デフォルトでは、無期限に待機します。ゲートウェイがタイムアウトした場合、null
が返されます。値はミリ秒単位で指定されます。replyTimeout
- ミリ秒単位の応答のタイムアウト。GatewayProxySpec
。GatewayProxyFactoryBean.setDefaultReplyTimeout(java.lang.Long)
public GatewayProxySpec asyncExecutor(@Nullable ExecutorSE executor)
Future
SE 戻り値の型を持つ任意のインターフェースメソッドに使用する Executor
SE の実装への参照を提供します。この Executor
は、これらの非同期メソッドにのみ使用されます。同期メソッドは、呼び出し元のスレッドで呼び出されます。null
を使用して、非同期エグゼキュータを指定しないでください。たとえば、ダウンストリームフローが Future
SE を返す場合などです。executor
- 使用する Executor
SE。GatewayProxySpec
。GatewayProxyFactoryBean.setAsyncExecutor(java.util.concurrent.Executor)
public GatewayProxySpec payloadExpression(StringSE expression)
payload
を生成するために使用される式。評価コンテキストのルートオブジェクトは MethodArgsHolder
です。expression
- デフォルトのペイロードの SpEL 式。GatewayProxySpec
。MessagingGateway.defaultPayloadExpression()
public GatewayProxySpec payloadFunction(java.util.function.FunctionSE<MethodArgsHolder,?> defaultPayloadFunction)
payload
を生成するために使用される Function
SE。defaultPayloadFunction
- デフォルトのペイロードの Function
SE。GatewayProxySpec
。MessagingGateway.defaultPayloadExpression()
public GatewayProxySpec payloadExpression(Expression expression)
payload
を生成するために使用される式。評価コンテキストのルートオブジェクトは MethodArgsHolder
です。Bean リゾルバーも利用可能で、@someBean(#args)
のような式を有効にします。expression
- デフォルトのペイロードの SpEL 式。GatewayProxySpec
。MessagingGateway.defaultPayloadExpression()
public GatewayProxySpec header(StringSE headerName, ObjectSE value)
headerName
- ヘッダーの名前。value
- ヘッダーの静的な値。GatewayProxySpec
。MessagingGateway.defaultHeaders()
public GatewayProxySpec header(StringSE headerName, java.util.function.FunctionSE<MethodArgsHolder,?> valueFunction)
headerName
- ヘッダーの名前。valueFunction
- ヘッダー値の Function
SE。GatewayProxySpec
。MessagingGateway.defaultHeaders()
public GatewayProxySpec header(StringSE headerName, Expression valueExpression)
MethodArgsHolder
にアクセスできます。headerName
- ヘッダーの名前。valueExpression
- ヘッダー値の SpEL 式。GatewayProxySpec
。MessagingGateway.defaultHeaders()
public GatewayProxySpec mapper(MethodArgsMessageMapper mapper)
Message
にマップするための MethodArgsMessageMapper
。これが提供されている場合、payload-expression
または header
は許可されません。カスタムマッパーはメッセージの作成を担当します。mapper
- 使用する MethodArgsMessageMapper
。GatewayProxySpec
。GatewayProxyFactoryBean.setMapper(MethodArgsMessageMapper)
public GatewayProxySpec proxyDefaultMethods(boolean proxyDefaultMethods)
default
メソッドもプロキシする必要があるかどうかを示します。proxyDefaultMethods
- デフォルトのメソッドをプロキシする、または MethodHandle
を介して呼び出すブールフラグ。GatewayProxySpec
。GatewayProxyFactoryBean.setProxyDefaultMethods(boolean)
public MapSE<ObjectSE,StringSE> getComponentsToRegister()
ComponentsRegistration
の getComponentsToRegister