クラス DirectChannel
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.channel.AbstractMessageChannel
org.springframework.integration.channel.AbstractSubscribableChannel
org.springframework.integration.channel.DirectChannel
- 実装済みのインターフェース一覧:
Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, ComponentSourceAware, ExpressionCapable, IntegrationPattern, NamedComponent, IntegrationManagement, SubscribableChannelManagement, TrackableComponent, MessageChannel, SubscribableChannel, InterceptableChannel
送信されたメッセージごとに 1 つのサブスクライバーを呼び出すチャネル。呼び出しは送信者のスレッドで発生します。
- 作成者:
- Dave Syer, Mark Fisher, Iwein Fuld, Oleg Zhurakousky, Gary Russell, Artem Bilan
ネストされたクラスの概要
クラス AbstractMessageChannel から継承されたネストクラス / インターフェース
AbstractMessageChannel.ChannelInterceptorListインターフェース IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverridesフィールド概要
クラス AbstractMessageChannel から継承されたフィールド
interceptors, metersクラス IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, loggerインターフェース IntegrationManagement から継承されたフィールド
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEインターフェース MessageChannel から継承されたフィールド
INDEFINITE_TIMEOUTコンストラクター概要
コンストラクターコンストラクター説明デフォルトのRoundRobinLoadBalancingStrategyでチャネルを作成します。DirectChannel(@Nullable LoadBalancingStrategy loadBalancingStrategy) LoadBalancingStrategyを使用して DirectChannel を作成します。方法の概要
修飾子と型メソッド説明protected UnicastingDispatcherprotected voidonInit()サブクラスは、初期化ロジック用にこれを実装できます。voidsetFailover(boolean failover) チャネルのディスパッチャーでフェイルオーバーを有効にするかどうかを指定します。voidsetFailoverStrategy(PredicateSE<ExceptionSE> failoverStrategy) スローされた例外に対してチャネルのディスパッチャーでフェイルオーバーを有効にするかどうかの戦略を構成します。voidsetMaxSubscribers(int maxSubscribers) チャネルのディスパッチャーがサポートするサブスクライバの最大数を指定します。クラス AbstractSubscribableChannel から継承されたメソッド
doSend, getSubscriberCount, subscribe, unsubscribeクラス AbstractMessageChannel から継承されたメソッド
addInterceptor, addInterceptor, destroy, getComponentType, getFullChannelName, getIChannelInterceptorList, getIntegrationPatternType, getInterceptors, getMetricsCaptor, getOverrides, isApplicationRunning, isLoggingEnabled, isObserved, registerMetricsCaptor, registerObservationRegistry, removeInterceptor, removeInterceptor, send, send, setDatatypes, setInterceptors, setLoggingEnabled, setMessageConverter, setObservationConvention, setShouldTrackクラス 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クラス ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSEインターフェース IntegrationManagement から継承されたメソッド
getManagedName, getManagedType, getThisAs, setManagedName, setManagedTypeインターフェース MessageChannel から継承されたメソッド
send, sendインターフェース NamedComponent から継承されたメソッド
getBeanName, getComponentName
コンストラクターの詳細
DirectChannel
public DirectChannel()デフォルトのRoundRobinLoadBalancingStrategyでチャネルを作成します。DirectChannel
LoadBalancingStrategyを使用して DirectChannel を作成します。nullにすることができます。これは、バランシングが適用されないことを意味します。すべてのメッセージは常に最初のサブスクライバーによって処理されます。- パラメーター:
loadBalancingStrategy- 負荷分散戦略の実装。- 関連事項:
方法の詳細
setFailover
public void setFailover(boolean failover) チャネルのディスパッチャーでフェイルオーバーを有効にするかどうかを指定します。デフォルトでは有効になっています。無効にするには、この値を "false" に設定します。setFailoverStrategy(Predicate)オプションを上書きします。つまり、またはこのオプション、そのオプションを設定する必要があります。- パラメーター:
failover- フェールオーバーブール値。
setFailoverStrategy
スローされた例外に対してチャネルのディスパッチャーがフェイルオーバーを有効にするかどうかの戦略を構成します。setFailover(boolean)オプションをオーバーライドします。つまり、このオプションまたはそのオプションを設定する必要があります。- パラメーター:
failoverStrategy- フェイルオーバー戦略述語。- 導入:
- 6.3
setMaxSubscribers
public void setMaxSubscribers(int maxSubscribers) チャネルのディスパッチャーがサポートするサブスクライバの最大数を指定します。- パラメーター:
maxSubscribers- 許可されるサブスクライバーの最大数。
getDispatcher
- 次で指定:
- クラス
AbstractSubscribableChannelのgetDispatcher
onInit
protected void onInit()クラスからコピーされた説明:IntegrationObjectSupportサブクラスは、初期化ロジック用にこれを実装できます。- オーバーライド:
- クラス
AbstractMessageChannelのonInit