@IntegrationManagedResource public abstract class AbstractMessageChannel extends IntegrationObjectSupport implements MessageChannel, TrackableComponent, InterceptableChannel, IntegrationManagement, IntegrationPattern
MessageChannel
実装の基本クラス。また、ChannelInterceptors
の呼び出しを含む、Messages
を送受信するための共通機能も提供します。修飾子と型 | クラスと説明 |
---|---|
protected static class | AbstractMessageChannel.ChannelInterceptorList ChannelInterceptors のリストの便利なラッパークラス。 |
IntegrationManagement.ManagementOverrides
修飾子と型 | フィールドと説明 |
---|---|
protected AbstractMessageChannel.ChannelInterceptorList | interceptors |
protected SetSE<MeterFacade> | meters |
EXPRESSION_PARSER, logger
INDEFINITE_TIMEOUT
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
コンストラクターと説明 |
---|
AbstractMessageChannel() |
修飾子と型 | メソッドと説明 |
---|---|
void | addInterceptor(ChannelInterceptor interceptor) リストの最後にチャネルインターセプターを追加します。 |
void | addInterceptor(int index, ChannelInterceptor interceptor) リストの指定されたインデックスにチャネルインターセプターを追加します。 |
void | destroy() |
protected abstract boolean | doSend(Message<?> message, long timeout) サブクラスはこのメソッドを実装する必要があります。 |
StringSE | getComponentType() サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。 |
StringSE | getFullChannelName() 可能な場合は、アプリケーションコンテキスト ID を含む完全修飾チャネル名を返します。 |
protected AbstractMessageChannel.ChannelInterceptorList | getIChannelInterceptorList() サブクラスのインターセプターリストインスタンスを公開します。 |
IntegrationPatternType | getIntegrationPatternType() このコンポーネントが実装するパターン型を返します。 |
ListSE<ChannelInterceptor> | getInterceptors() 構成されたインターセプターの読み取り専用リストを返します。 |
protected MetricsCaptor | getMetricsCaptor() |
IntegrationManagement.ManagementOverrides | getOverrides() オーバーライドを返します。 |
boolean | isLoggingEnabled() ロギングが有効かどうかを返します。 |
protected void | onInit() サブクラスは、初期化ロジック用にこれを実装できます。 |
void | registerMetricsCaptor(MetricsCaptor metricsCaptorToRegister) MetricsCaptor を注入する |
boolean | removeInterceptor(ChannelInterceptor interceptor) |
ChannelInterceptor | removeInterceptor(int index) |
boolean | send(Message<?> message) このチャネルでメッセージを送信します。 |
boolean | send(Message<?> messageArg, long timeout) このチャネルでメッセージを送信します。 |
void | setDatatypes(ClassSE<?>... datatypes) このチャネルでサポートされているメッセージペイロードデータ型を指定します。 |
void | setInterceptors(ListSE<ChannelInterceptor> interceptors) チャネルインターセプターのリストを設定します。 |
void | setLoggingEnabled(boolean loggingEnabled) ロギングを有効にするかどうか。 |
void | setMessageConverter(MessageConverter messageConverter) ペイロードがまだ一致していないメッセージに対して、このチャネルでサポートされているデータ型の 1 つに(順番に)変換しようとするときに使用する MessageConverter を指定します。 |
void | setShouldTrack(boolean shouldTrack) |
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
getManagedName, getManagedType, getThisAs, setManagedName, setManagedType
getBeanName, getComponentName
protected final AbstractMessageChannel.ChannelInterceptorList interceptors
protected final SetSE<MeterFacade> meters
public StringSE getComponentType()
IntegrationObjectSupport
NamedComponent
の getComponentType
IntegrationObjectSupport
の getComponentType
public IntegrationPatternType getIntegrationPatternType()
IntegrationPattern
IntegrationPattern
の getIntegrationPatternType
IntegrationPatternType
public void setShouldTrack(boolean shouldTrack)
TrackableComponent
の setShouldTrack
public void registerMetricsCaptor(MetricsCaptor metricsCaptorToRegister)
IntegrationManagement
MetricsCaptor
を注入する IntegrationManagement
の registerMetricsCaptor
metricsCaptorToRegister
- キャプター。@Nullable protected MetricsCaptor getMetricsCaptor()
public boolean isLoggingEnabled()
IntegrationManagement
IntegrationManagement
の isLoggingEnabled
public void setLoggingEnabled(boolean loggingEnabled)
IntegrationManagement
IntegrationManagement
の setLoggingEnabled
loggingEnabled
- 無効にする dalse。public void setDatatypes(ClassSE<?>... datatypes)
このプロパティが明示的に設定されていない場合、すべてのメッセージペイロード型が受け入れられます。
datatypes
- サポートされているデータ型。setMessageConverter(MessageConverter)
public void setInterceptors(ListSE<ChannelInterceptor> interceptors)
InterceptableChannel
の setInterceptors
interceptors
- インターセプターのリスト。public void addInterceptor(ChannelInterceptor interceptor)
InterceptableChannel
の addInterceptor
interceptor
- インターセプター。public void addInterceptor(int index, ChannelInterceptor interceptor)
InterceptableChannel
の addInterceptor
index
- インターセプターを追加するためのインデックス。interceptor
- インターセプター。public void setMessageConverter(MessageConverter messageConverter)
MessageConverter
を指定します。 注意 : MessageConverter.fromMessage(Message, Class)
メソッドのみが使用されます。返されたオブジェクトが Message
でない場合、受信ヘッダーがコピーされます。返されたオブジェクトが Message
の場合、コンバーターはヘッダーに完全に入力されていると予想されます。チャネルはそれ以上のアクションを実行しません。null
が返されると、次のデータ型(存在する場合)への変換が試行されます。デフォルトは DefaultDatatypeChannelMessageConverter
です。
messageConverter
- メッセージコンバーター。public ListSE<ChannelInterceptor> getInterceptors()
InterceptableChannel
の getInterceptors
public boolean removeInterceptor(ChannelInterceptor interceptor)
InterceptableChannel
の removeInterceptor
@Nullable public ChannelInterceptor removeInterceptor(int index)
InterceptableChannel
の removeInterceptor
protected AbstractMessageChannel.ChannelInterceptorList getIChannelInterceptorList()
public IntegrationManagement.ManagementOverrides getOverrides()
IntegrationManagement
IntegrationManagement
の getOverrides
protected void onInit()
IntegrationObjectSupport
IntegrationObjectSupport
の onInit
public StringSE getFullChannelName()
public boolean send(Message<?> message)
MessageChannel
の send
message
- 送信するメッセージ true
、送信スレッドが中断された場合は false
。public boolean send(Message<?> messageArg, long timeout)
send(Message)
を参照)。MessageChannel
の send
messageArg
- 送信するメッセージ timeout
- ミリ秒単位のタイムアウト true
、割り当てられた時間内にメッセージを送信できない場合、または送信スレッドが中断された場合は false
。protected abstract boolean doSend(Message<?> message, long timeout)
message
- メッセージ。timeout
- タイムアウト。public void destroy()
DisposableBean
の destroy
IntegrationManagement
の destroy