クラス 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、ComponentSourceAware、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 から継承されたフィールド
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 ModelAndViewhandleRequest(HttpServletRequestEE servletRequest, HttpServletResponseEE servletResponse) メッセージを生成してリクエストチャネルに送信することにより、HTTP リクエストを処理します。protected voidonInit()可能な場合は、DispatcherServlet.MULTIPART_RESOLVER_BEAN_NAME定数で定義されたデフォルト名に基づいてMultipartResolverBean を見つけます。voidsetErrorCode(StringSE errorCode) メッセージ処理のエラーを通知するために使用するエラーコード。voidsetErrorsKey(StringSE errorsKey) メッセージ処理が失敗した場合に、コアでErrorsを公開するために使用されるキー。voidsetReplyKey(StringSE replyKey) 応答メッセージまたはペイロードをコアマップに追加するときに使用するキーを指定します(BaseHttpInboundEndpoint.setExtractReplyPayload(boolean)の値がfalseでない限り、ペイロードのみになります)。voidsetViewExpression(Expression viewExpression) ビュー名を生成するために評価する SpEL 式を指定します。voidsetViewName(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, 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インターフェース org.springframework.context.SmartLifecycle から継承されたメソッド
isPauseable
フィールドの詳細
DEFAULT_ERROR_CODE
DEFAULT_REPLY_KEY
DEFAULT_ERRORS_KEY
コンストラクターの詳細
HttpRequestHandlingController
public HttpRequestHandlingController()HttpRequestHandlingController
public HttpRequestHandlingController(boolean expectReply)
メソッドの詳細
setViewName
setReplyKey
応答メッセージまたはペイロードをコアマップに追加するときに使用するキーを指定します(BaseHttpInboundEndpoint.setExtractReplyPayload(boolean)の値がfalseでない限り、ペイロードのみになります)。デフォルトのキーは「返信」です。- パラメーター:
replyKey- 返信キー。
setErrorsKey
setErrorCode
メッセージ処理のエラーを通知するために使用するエラーコード。エラーの場合、このコードはオブジェクトエラーで提供され、MessageSourceを使用して標準の MVC 方式でオプションで変換されます。デフォルト値はspring.integration.http.handler.errorです。例外、メッセージ、文字列としてのスタックトレースの 3 つの引数が提供されます。- パラメーター:
errorCode- 設定するエラーコード。
setViewExpression
ビュー名を生成するために評価する SpEL 式を指定します。EvaluationContext には、ルートオブジェクトとして応答メッセージが入力されます。- パラメーター:
viewExpression- ビュー式。
onInit
protected void onInit()クラスからコピーされた説明:HttpRequestHandlingEndpointSupport可能な場合は、DispatcherServlet.MULTIPART_RESOLVER_BEAN_NAME定数で定義されたデフォルト名に基づいてMultipartResolverBean を見つけます。コンバーターが設定されていない場合、またはコンバーターが設定された後にHttpRequestHandlingEndpointSupport.setMergeWithDefaultConverters(boolean)が true で呼び出された場合、デフォルトのコンバーターをセットアップします。- オーバーライド:
- クラス
HttpRequestHandlingEndpointSupportのonInit
handleRequest
public final ModelAndView handleRequest(HttpServletRequestEE servletRequest, HttpServletResponseEE servletResponse) メッセージを生成し、それをリクエストチャネルに送信することで、HTTP リクエストを処理します。このゲートウェイの 'expectReply' プロパティが true の場合、受信するとレスポンスメッセージからのレスポンスも生成されます。- 次で指定:
- インターフェース
ControllerのhandleRequest