クラス 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 AtomicIntegerSEprotected static final booleanprotected static final ListSE<HttpMethod> protected static final booleanクラス org.springframework.integration.gateway.MessagingGatewaySupport から継承されたフィールド
messagingTemplateクラス org.springframework.integration.endpoint.AbstractEndpoint から継承されたフィールド
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 StandardEvaluationContextprotected HttpStatusevaluateHttpStatus(HttpEntity<?> httpEntity) サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。protected booleanprotected MapSE<StringSE, Expression> protected HeaderMapper<HttpHeaders> このコンポーネントが実装するパターン型を返します。protected Expressionfinal RequestMappingprotected ResolvableTypeprotected Expressionprotected Validatorprotected booleanprotected static booleanisReadable(HttpMethod httpMethod) リクエストに読み取り可能な本文があるかどうかを確認します(GET、HEAD、OPTIONS リクエストではありません)。protected voidonInit()サブクラスは、初期化ロジック用にこれを実装できます。protected HttpStatusvoidsetCrossOrigin(CrossOrigin crossOrigin) CrossOriginを設定して、このエンドポイントのクロスオリジンリクエストを許可します。voidsetExtractReplyPayload(boolean extractReplyPayload) レスポンスメッセージのペイロードのみをレスポンスで渡すかどうかを指定します。voidsetHeaderExpressions(MapSE<StringSE, Expression> headerExpressions) Message ヘッダーを生成するために評価する SpEL 式のマップを指定します。voidsetHeaderMapper(HeaderMapper<HttpHeaders> headerMapper) HTTP ヘッダーと MessageHeaders の間のマッピング時に使用するHeaderMapperを設定します。voidsetPayloadExpression(Expression payloadExpression) メッセージペイロードを生成するために評価する SpEL 式を指定します。voidsetRequestMapping(RequestMapping requestMapping) このエンドポイントに柔軟な RESTFul マッピングを指定できるようにするRequestMappingを設定します。voidsetRequestPayloadType(ResolvableType requestPayloadType) コンバーター / エンコーダーが受信 HTTP リクエストコンテンツを読み取るときに生成されるペイロードの型を指定します。voidsetRequestPayloadTypeClass(ClassSE<?> requestPayloadType) コンバーター / エンコーダーが受信 HTTP リクエストコンテンツを読み取るときに生成されるペイロードの型を指定します。voidsetStatusCodeExpression(Expression statusCodeExpression) Expressionを指定して、レスポンスのステータスコードを解決し、タイムアウトのデフォルトの "200 OK" または "500 Internal Server Error" をオーバーライドします。voidsetStatusCodeExpressionString(StringSE statusCodeExpression) Expressionを指定して、レスポンスのステータスコードを解決し、タイムアウトのデフォルトの "200 OK" または "500 Internal Server Error" をオーバーライドします。voidsetValidator(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