クラス HttpRequestHandlingController
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.gateway.MessagingGatewaySupport
org.springframework.integration.http.inbound.BaseHttpInboundEndpoint
org.springframework.integration.http.inbound.HttpRequestHandlingEndpointSupport
org.springframework.integration.http.inbound.HttpRequestHandlingController
- 実装されたすべてのインターフェース:
Aware
、BeanFactoryAware
、BeanNameAware
、DisposableBean
、InitializingBean
、ApplicationContextAware
、Lifecycle
、Phased
、SmartLifecycle
、ExpressionCapable
、OrderlyShutdownCapable
、IntegrationPattern
、NamedComponent
、IntegrationInboundManagement
、IntegrationManagement
、ManageableLifecycle
、ManageableSmartLifecycle
、TrackableComponent
、Controller
public class HttpRequestHandlingController
extends HttpRequestHandlingEndpointSupport
implements Controller
DispatcherServlet フロントコントローラーで使用する Spring の
Controller
インターフェースを実装する受信 HTTP エンドポイント。viewName
は ModelAndView 戻り値に渡されます。
このエンドポイントには、デフォルトでリクエスト / 応答の動作があります。これは、false
をコンストラクターに渡すことでオーバーライドできます。リクエスト / 応答の場合、コアマップはビューに渡され、BaseHttpInboundEndpoint.setExtractReplyPayload(boolean)
の値に応じて応答メッセージまたはペイロードのいずれかが含まれます(デフォルトでは true、ペイロードのみを意味します)。マップ内の対応するキーは、replyKey
プロパティによって決定されます(デフォルトは「応答」)。
- 導入:
- 2.0
- 作成者:
- Mark Fisher, Gary Russell, Artem Bilan
ネストされたクラスのサマリー
クラス org.springframework.integration.gateway.MessagingGatewaySupport から継承されたネストクラス / インターフェース
MessagingGatewaySupport.ConvertingMessagingTemplate
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverrides
フィールドサマリー
修飾子と型フィールド説明static final StringSE
エラーコードのビューモデルキー。static final StringSE
エラーのビューモデルキー。static final StringSE
返信用のビューモデルキー。クラス org.springframework.integration.http.inbound.BaseHttpInboundEndpoint から継承されたフィールド
activeCount, JAXB_PRESENT, NON_READABLE_BODY_HTTP_METHODS, ROME_TOOLS_PRESENT
クラス 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
コンストラクターのサマリー
メソッドのサマリー
修飾子と型メソッド説明final ModelAndView
handleRequest
(HttpServletRequestEE servletRequest, HttpServletResponseEE servletResponse) メッセージを生成してリクエストチャネルに送信することにより、HTTP リクエストを処理します。protected void
onInit()
可能な場合は、DispatcherServlet.MULTIPART_RESOLVER_BEAN_NAME
定数で定義されたデフォルト名に基づいてMultipartResolver
Bean を見つけます。void
setErrorCode
(StringSE errorCode) メッセージ処理のエラーを通知するために使用するエラーコード。void
setErrorsKey
(StringSE errorsKey) メッセージ処理が失敗した場合に、コアでErrors
を公開するために使用されるキー。void
setReplyKey
(StringSE replyKey) 応答メッセージまたはペイロードをコアマップに追加するときに使用するキーを指定します(BaseHttpInboundEndpoint.setExtractReplyPayload(boolean)
の値がfalse
でない限り、ペイロードのみになります)。void
setViewExpression
(Expression viewExpression) ビュー名を生成するために評価する SpEL 式を指定します。void
setViewName
(StringSE viewName) ビュー名を指定します。クラス org.springframework.integration.http.inbound.HttpRequestHandlingEndpointSupport から継承されたメソッド
doHandleRequest, extractRequestBody, getMessageConverters, prepareRequest, prepareRequestEntity, setMergeWithDefaultConverters, setMessageConverters, setMultipartResolver, setStatusCodeIfNeeded, setupResponseAndConvertReply
クラス org.springframework.integration.http.inbound.BaseHttpInboundEndpoint から継承されたメソッド
afterShutdown, beforeShutdown, createEvaluationContext, evaluateHttpStatus, getComponentType, getCrossOrigin, getExtractReplyPayload, getHeaderExpressions, getHeaderMapper, getIntegrationPatternType, getPayloadExpression, getRequestMapping, getRequestPayloadType, getStatusCodeExpression, getValidator, isExpectReply, isReadable, resolveHttpStatusFromHeaders, setCrossOrigin, setExtractReplyPayload, setHeaderExpressions, setHeaderMapper, setPayloadExpression, setRequestMapping, setRequestPayloadType, setRequestPayloadTypeClass, setStatusCodeExpression, setStatusCodeExpressionString, setValidator, validate
クラス 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, getComponentName, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, 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
フィールドの詳細
コンストラクターの詳細
HttpRequestHandlingController
public HttpRequestHandlingController()HttpRequestHandlingController
public HttpRequestHandlingController(boolean expectReply)
メソッドの詳細
setViewName
ビュー名を指定します。- パラメーター:
viewName
- ビュー名。
setReplyKey
応答メッセージまたはペイロードをコアマップに追加するときに使用するキーを指定します(BaseHttpInboundEndpoint.setExtractReplyPayload(boolean)
の値がfalse
でない限り、ペイロードのみになります)。デフォルトのキーは「返信」です。- パラメーター:
replyKey
- 返信キー。
setErrorsKey
メッセージ処理が失敗した場合に、コアでErrors
を公開するために使用されるキー。デフォルトは「エラー」です。- パラメーター:
errorsKey
- 設定するキー値。
setErrorCode
メッセージ処理のエラーを通知するために使用するエラーコード。エラーの場合、このコードはオブジェクトエラーで提供され、MessageSource
を使用して標準の MVC 方式でオプションで変換されます。デフォルト値はspring.integration.http.handler.error
です。例外、メッセージ、文字列としてのスタックトレースの 3 つの引数が提供されます。- パラメーター:
errorCode
- 設定するエラーコード。
setViewExpression
ビュー名を生成するために評価する SpEL 式を指定します。EvaluationContext には、ルートオブジェクトとして応答メッセージが入力されます。- パラメーター:
viewExpression
- ビュー式。
onInit
protected void onInit()クラスからコピーされた説明:HttpRequestHandlingEndpointSupport
可能な場合は、DispatcherServlet.MULTIPART_RESOLVER_BEAN_NAME
定数で定義されたデフォルト名に基づいてMultipartResolver
Bean を見つけます。コンバーターが設定されていない場合、またはコンバーターが設定された後にHttpRequestHandlingEndpointSupport.setMergeWithDefaultConverters(boolean)
が true で呼び出された場合、デフォルトのコンバーターをセットアップします。- オーバーライド:
- クラス
HttpRequestHandlingEndpointSupport
のonInit
handleRequest
public final ModelAndView handleRequest(HttpServletRequestEE servletRequest, HttpServletResponseEE servletResponse) メッセージを生成してリクエストチャネルに送信することにより、HTTP リクエストを処理します。このゲートウェイの 'expectReply' プロパティが true の場合、受信した返信メッセージからレスポンスも生成されます。- 次で指定:
- インターフェース
Controller
のhandleRequest