クラス BaseHttpInboundEndpoint
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.gateway.MessagingGatewaySupport
org.springframework.integration.http.inbound.BaseHttpInboundEndpoint
- 実装されたすべてのインターフェース:
Aware
、BeanFactoryAware
、BeanNameAware
、DisposableBean
、InitializingBean
、ApplicationContextAware
、Lifecycle
、Phased
、SmartLifecycle
、ComponentSourceAware
、ExpressionCapable
、OrderlyShutdownCapable
、IntegrationPattern
、NamedComponent
、IntegrationInboundManagement
、IntegrationManagement
、ManageableLifecycle
、ManageableSmartLifecycle
、TrackableComponent
public class BaseHttpInboundEndpoint
extends MessagingGatewaySupport
implements OrderlyShutdownCapable
基本的なプロパティを持つ HTTP 受信エンドポイント用の
MessagingGatewaySupport
拡張。- 導入:
- 5.0
- 作成者:
- Artem Bilan, Gary Russell, Trung Pham, Ngoc Nhan
ネストされたクラスのサマリー
クラス org.springframework.integration.gateway.MessagingGatewaySupport から継承されたネストクラス / インターフェース
MessagingGatewaySupport.ConvertingMessagingTemplate
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverrides
フィールドのサマリー
フィールド修飾子と型フィールド説明protected final AtomicIntegerSE
protected static final boolean
protected static final ListSE
<HttpMethod> protected static final boolean
クラス org.springframework.integration.gateway.MessagingGatewaySupport から継承されたフィールド
messagingTemplate
クラス org.springframework.integration.endpoint.AbstractEndpoint から継承されたフィールド
lifecycleCondition, lifecycleLock
クラス org.springframework.integration.context.IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, logger
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたフィールド
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
インターフェース org.springframework.context.SmartLifecycle から継承されたフィールド
DEFAULT_PHASE
コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明int
スケジューラー、エグゼキューターなどの通常のシャットダウンの後、シャットダウン遅延が経過した後、残りのアクティブなスケジューラー / エグゼキュータースレッドの強制シャットダウンの前に呼び出されます。オプションで、まだ処理中のアクティブなメッセージの数を返すことができます。int
シャットダウンが始まる前に呼び出されます。protected StandardEvaluationContext
protected HttpStatus
evaluateHttpStatus
(HttpEntity<?> httpEntity) サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。protected boolean
protected MapSE
<StringSE, Expression> protected HeaderMapper
<HttpHeaders> このコンポーネントが実装するパターン型を返します。protected Expression
final RequestMapping
protected ResolvableType
protected Expression
protected Validator
protected boolean
protected static boolean
isReadable
(HttpMethod httpMethod) リクエストに読み取り可能な本文があるかどうかを確認します(GET、HEAD、OPTIONS リクエストではありません)。protected void
onInit()
サブクラスは、初期化ロジック用にこれを実装できます。protected HttpStatus
void
setCrossOrigin
(CrossOrigin crossOrigin) CrossOrigin
を設定して、このエンドポイントのクロスオリジンリクエストを許可します。void
setExtractReplyPayload
(boolean extractReplyPayload) レスポンスメッセージのペイロードのみをレスポンスで渡すかどうかを指定します。void
setHeaderExpressions
(MapSE<StringSE, Expression> headerExpressions) Message ヘッダーを生成するために評価する SpEL 式のマップを指定します。void
setHeaderMapper
(HeaderMapper<HttpHeaders> headerMapper) HTTP ヘッダーと MessageHeaders の間のマッピング時に使用するHeaderMapper
を設定します。void
setPayloadExpression
(Expression payloadExpression) メッセージペイロードを生成するために評価する SpEL 式を指定します。void
setRequestMapping
(RequestMapping requestMapping) このエンドポイントに柔軟な RESTFul マッピングを指定できるようにするRequestMapping
を設定します。void
setRequestPayloadType
(ResolvableType requestPayloadType) コンバーター / エンコーダーが受信 HTTP リクエストコンテンツを読み取るときに生成されるペイロードの型を指定します。void
setRequestPayloadTypeClass
(ClassSE<?> requestPayloadType) コンバーター / エンコーダーが受信 HTTP リクエストコンテンツを読み取るときに生成されるペイロードの型を指定します。void
setStatusCodeExpression
(Expression statusCodeExpression) Expression
を指定して、レスポンスのステータスコードを解決し、タイムアウトのデフォルトの "200 OK" または "500 Internal Server Error" をオーバーライドします。void
setStatusCodeExpressionString
(StringSE statusCodeExpression) Expression
を指定して、レスポンスのステータスコードを解決し、タイムアウトのデフォルトの "200 OK" または "500 Internal Server Error" をオーバーライドします。void
setValidator
(Validator validator) Validator
を指定して、リクエストから変換されたペイロードを検証します。protected void
クラス org.springframework.integration.gateway.MessagingGatewaySupport から継承されたメソッド
buildErrorMessage, buildSendTimer, destroy, doStart, doStop, getErrorChannel, getErrorMessageAttributes, getErrorMessageStrategy, getManagedName, getManagedType, getOverrides, getReplyChannel, getRequestChannel, isLoggingEnabled, isObserved, receive, receive, receiveMessage, receiveMessage, registerMetricsCaptor, registerObservationRegistry, registerReplyMessageCorrelatorIfNecessary, send, sendAndReceive, sendAndReceiveMessage, sendAndReceiveMessageReactive, sendTimer, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setErrorOnTimeout, setLoggingEnabled, setManagedName, setManagedType, setObservationConvention, setReceiverObservationConvention, setReplyChannel, setReplyChannelName, setReplyMapper, setReplyTimeout, setRequestChannel, setRequestChannelName, setRequestMapper, setRequestTimeout, setShouldTrack
クラス org.springframework.integration.endpoint.AbstractEndpoint から継承されたメソッド
doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stop
クラス org.springframework.integration.context.IntegrationObjectSupport から継承されたメソッド
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentDescription, getComponentName, getComponentSource, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentDescription, setComponentName, setComponentSource, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSE
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたメソッド
getThisAs
インターフェース org.springframework.integration.support.context.NamedComponent から継承されたメソッド
getBeanName, getComponentName
フィールドの詳細
JAXB_PRESENT
protected static final boolean JAXB_PRESENTROME_TOOLS_PRESENT
protected static final boolean ROME_TOOLS_PRESENTNON_READABLE_BODY_HTTP_METHODS
activeCount
コンストラクターの詳細
BaseHttpInboundEndpoint
public BaseHttpInboundEndpoint(boolean expectReply)
メソッドの詳細
setPayloadExpression
メッセージペイロードを生成するために評価する SpEL 式を指定します。EvaluationContext には、ルートオブジェクトとして HttpEntity インスタンスが設定され、変数を含めることができます。#pathVariables
#requestParams
#requestAttributes
#requestHeaders
#matrixVariables
#cookies
- パラメーター:
payloadExpression
- ペイロード式。
setHeaderExpressions
Message ヘッダーを生成するために評価する SpEL 式のマップを指定します。マップ内のキーはヘッダー名として使用されます。式を評価する場合、EvaluationContext にはルートオブジェクトとして HttpEntity インスタンスが設定され、変数を含めることができます。#pathVariables
#requestParams
#requestAttributes
#requestHeaders
#matrixVariables
#cookies
- パラメーター:
headerExpressions
- ヘッダー式。
setRequestMapping
このエンドポイントに柔軟な RESTFul マッピングを指定できるようにするRequestMapping
を設定します。- パラメーター:
requestMapping
- リクエストのマッピング。
getRequestMapping
setCrossOrigin
CrossOrigin
を設定して、このエンドポイントのクロスオリジンリクエストを許可します。- パラメーター:
crossOrigin
- CrossOrigin 構成。- 導入:
- 4.2
getCrossOrigin
getPayloadExpression
getHeaderExpressions
isExpectReply
protected boolean isExpectReply()- 戻り値:
- 返信を期待するかどうか。
setHeaderMapper
HTTP ヘッダーと MessageHeaders の間のマッピング時に使用するHeaderMapper
を設定します。- パラメーター:
headerMapper
- ヘッダーマッパー。
getHeaderMapper
setRequestPayloadTypeClass
コンバーター / エンコーダーが受信 HTTP リクエストコンテンツを読み取るときに生成されるペイロードの型を指定します。デフォルトでは、この値は null です。これは、実行時にすべての「テキスト」Content-Type が String になり、他のすべてはデフォルトでbyte[].class
になることを意味します。- パラメーター:
requestPayloadType
- ペイロード型。
setRequestPayloadType
コンバーター / エンコーダーが受信 HTTP リクエストコンテンツを読み取るときに生成されるペイロードの型を指定します。デフォルトでは、この値は null です。これは、実行時にすべての「テキスト」Content-Type が String になり、他のすべてはデフォルトでbyte[].class
になることを意味します。- パラメーター:
requestPayloadType
- ペイロード型。
getRequestPayloadType
setExtractReplyPayload
public void setExtractReplyPayload(boolean extractReplyPayload) レスポンスメッセージのペイロードのみをレスポンスで渡すかどうかを指定します。これが "false" に設定されている場合、メッセージ全体がレスポンスの生成に使用されます。デフォルトは "true" です。- パラメーター:
extractReplyPayload
- 応答ペイロードを抽出する場合は true。
getExtractReplyPayload
protected boolean getExtractReplyPayload()setStatusCodeExpressionString
Expression
を指定して、レスポンスのステータスコードを解決し、タイムアウトのデフォルトの "200 OK" または "500 Internal Server Error" をオーバーライドします。- パラメーター:
statusCodeExpression
- ステータスコードの式。- 導入:
- 5.0
- 関連事項:
setStatusCodeExpression
Expression
を指定して、レスポンスのステータスコードを解決し、タイムアウトのデフォルトの "200 OK" または "500 Internal Server Error" をオーバーライドします。statusCodeExpression
は、一方向<http:inbound-channel-adapter/>
の場合、またはゲートウェイの応答(タイムアウト)が受信されない場合にのみ適用されます。<http:inbound-gateway/>
(またはexpectReply
が true の場合)は、HttpHeaders.STATUS_CODE
応答Message
ヘッダーからHttpStatus
を解決します。- パラメーター:
statusCodeExpression
- ステータスコードの式。- 導入:
- 4.1
- 関連事項:
getStatusCodeExpression
setValidator
getValidator
onInit
protected void onInit()クラスからコピーされた説明:IntegrationObjectSupport
サブクラスは、初期化ロジック用にこれを実装できます。- オーバーライド:
- クラス
MessagingGatewaySupport
のonInit
evaluateHttpStatus
resolveHttpStatusFromHeaders
createEvaluationContext
beforeShutdown
public int beforeShutdown()インターフェースからコピーされた説明:OrderlyShutdownCapable
シャットダウンが始まる前に呼び出されます。実装は、新しいメッセージの受け入れを停止する必要があります。オプションで、処理中のアクティブなメッセージの数を返すことができます。- 次で指定:
- インターフェース
OrderlyShutdownCapable
のbeforeShutdown
- 戻り値:
- 使用可能な場合、アクティブなメッセージの数。
afterShutdown
public int afterShutdown()インターフェースからコピーされた説明:OrderlyShutdownCapable
スケジューラー、エグゼキューターなどの通常のシャットダウンの後、シャットダウン遅延が経過した後、残りのアクティブなスケジューラー / エグゼキュータースレッドの強制シャットダウンの前に呼び出されます。オプションで、まだ処理中のアクティブなメッセージの数を返すことができます。- 次で指定:
- インターフェース
OrderlyShutdownCapable
のafterShutdown
- 戻り値:
- 使用可能な場合、アクティブなメッセージの数。
getComponentType
クラスからコピーされた説明:IntegrationObjectSupport
サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。- 次で指定:
- インターフェース
NamedComponent
のgetComponentType
- オーバーライド:
- クラス
MessagingGatewaySupport
のgetComponentType
getIntegrationPatternType
インターフェースからコピーされた説明:IntegrationPattern
このコンポーネントが実装するパターン型を返します。- 次で指定:
- インターフェース
IntegrationPattern
のgetIntegrationPatternType
- オーバーライド:
- クラス
MessagingGatewaySupport
のgetIntegrationPatternType
- 戻り値:
- このコンポーネントが実装する
IntegrationPatternType
validate
isReadable
リクエストに読み取り可能な本文があるかどうかを確認します(GET、HEAD、OPTIONS リクエストではありません)。- パラメーター:
httpMethod
- チェックする HTTP メソッド- 戻り値:
- HTTP リクエストに本文を含めることができる場合は true または false