クラス ZeroMqMessageProducer
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.MessageProducerSupport
org.springframework.integration.zeromq.inbound.ZeroMqMessageProducer
- 実装されたすべてのインターフェース:
Aware
、BeanFactoryAware
、BeanNameAware
、DisposableBean
、InitializingBean
、SmartInitializingSingleton
、ApplicationContextAware
、Lifecycle
、Phased
、SmartLifecycle
、ComponentSourceAware
、ExpressionCapable
、MessageProducer
、IntegrationPattern
、NamedComponent
、IntegrationInboundManagement
、IntegrationManagement
、ManageableLifecycle
、ManageableSmartLifecycle
、TrackableComponent
@ManagedResource
@IntegrationManagedResource
public class ZeroMqMessageProducer
extends MessageProducerSupport
ZeroMq ソケットからのメッセージを消費するための
MessageProducerSupport
実装。SocketType.PAIR
、SocketType.SUB
、SocketType.PULL
のみがサポートされています。このコンポーネントは、ソケットをバインドまたは接続できます。SocketType.SUB
を使用すると、受信したトピックが ZeroMqHeaders.TOPIC
に保存されます。
- 導入:
- 5.4
- 作成者:
- Artem Bilan, Alessio Matricardi
ネストされたクラスのサマリー
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverrides
フィールドのサマリー
フィールドクラス 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
コンストラクターの概要
コンストラクターコンストラクター説明ZeroMqMessageProducer
(org.zeromq.ZContext context) ZeroMqMessageProducer
(org.zeromq.ZContext context, org.zeromq.SocketType socketType) メソッドのサマリー
修飾子と型メソッド説明void
destroy()
protected void
doStart()
デフォルトでは何もしません。protected void
doStop()
デフォルトでは何もしません。int
このメッセージプロデューサーがまだ開始されていないか、ソケットが接続されている場合は、ソケットがバインドされているポートを返します。バインドされていません。サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。protected void
onInit()
サブクラスは、初期化ロジック用にこれを実装できます。void
setBindPort
(int port) ZMQ.Socket.bind(String)
を介した TCP プロトコルバインディング用のポートを構成します。void
setConnectUrl
(StringSE connectUrl) ZMQ.Socket.connect(String)
の URL を構成します。void
setConsumeDelay
(DurationSE consumeDelay) データが受信されないときに消費を遅らせるには、Duration
SE を指定します。void
setMessageConverter
(MessageConverter messageConverter) 消費されたデータを生成するメッセージに変換するためのMessageConverter
(messageMapper
の代替として)を提供します。void
setMessageMapper
(InboundMessageMapper<byte[]> messageMapper) 消費されたデータを生成するメッセージに変換するInboundMessageMapper
を提供します。void
setReceiveRaw
(boolean receiveRaw) void
setSocketConfigurer
(ConsumerSE<org.zeromq.ZMQ.Socket> socketConfigurer) Consumer
SE を提供して、セキュリティなどの任意のオプションでソケットを構成します。void
SocketType.SUB
ソケットがサブスクリプションに使用するトピックを指定します。void
subscribeToTopics
(StringSE... topics) void
unsubscribeFromTopics
(StringSE... topics) void
unwrapTopic
(boolean unwrapTopic) SocketType.SUB
ソケットが受信するトピックが追加の空フレームでラップされるかどうかを指定します。クラス org.springframework.integration.endpoint.MessageProducerSupport から継承されたメソッド
afterSingletonsInstantiated, buildErrorMessage, getErrorChannel, getErrorMessageAttributes, getErrorMessageStrategy, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, isObserved, registerObservationRegistry, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setObservationConvention, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrack, subscribeToPublisher
クラス 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 から継承されたメソッド
getManagedName, getManagedType, getOverrides, getThisAs, isLoggingEnabled, registerMetricsCaptor, setLoggingEnabled, setManagedName, setManagedType
インターフェース org.springframework.integration.support.context.NamedComponent から継承されたメソッド
getBeanName, getComponentName
フィールドの詳細
DEFAULT_CONSUME_DELAY
コンストラクターの詳細
ZeroMqMessageProducer
public ZeroMqMessageProducer(org.zeromq.ZContext context) ZeroMqMessageProducer
public ZeroMqMessageProducer(org.zeromq.ZContext context, org.zeromq.SocketType socketType)
メソッドの詳細
setConsumeDelay
データが受信されないときに消費を遅らせるには、Duration
SE を指定します。- パラメーター:
consumeDelay
- 空のときに消費を遅らせるDuration
SE。デフォルトはDEFAULT_CONSUME_DELAY
です。
setMessageMapper
- パラメーター:
messageMapper
- 使用するInboundMessageMapper
。
setMessageConverter
消費されたデータを生成するメッセージに変換するためのMessageConverter
(messageMapper
の代替として)を提供します。setReceiveRaw(boolean)
がtrue
の場合は無視されます。- パラメーター:
messageConverter
- 使用するMessageConverter
。
setReceiveRaw
public void setReceiveRaw(boolean receiveRaw) - パラメーター:
receiveRaw
-ZMsg
から変換するかどうか。デフォルトで変換します。
setSocketConfigurer
Consumer
SE を提供して、セキュリティなどの任意のオプションでソケットを構成します。- パラメーター:
socketConfigurer
- ソケットオプションのコンフィギュレーター。
setTopics
SocketType.SUB
ソケットがサブスクリプションに使用するトピックを指定します。サポートされている他のすべてのSocketType
では無視されます。- パラメーター:
topics
- 使用するトピック。
setConnectUrl
ZMQ.Socket.connect(String)
の URL を構成します。setBindPort(int)
と相互に排他的です。- パラメーター:
connectUrl
- ZeroMq ソケットを接続する URL。
setBindPort
public void setBindPort(int port) ZMQ.Socket.bind(String)
を介した TCP プロトコルバインディング用のポートを構成します。setConnectUrl(String)
と相互に排他的です。- パラメーター:
port
- ZeroMq ソケットを TCP 経由でバインドするポート。
getBoundPort
public int getBoundPort()このメッセージプロデューサーがまだ開始されていないか、ソケットが接続されている場合は、ソケットがバインドされているポートを返します。バインドされていません。- 戻り値:
- ソケットまたは 0 のポート。
unwrapTopic
public void unwrapTopic(boolean unwrapTopic) SocketType.SUB
ソケットが受信するトピックが追加の空フレームでラップされるかどうかを指定します。サポートされている他のすべてのSocketType
では無視されます。この属性はデフォルトでtrue
に設定されています。- パラメーター:
unwrapTopic
- 受信したトピックが追加の空のフレームでラップされている場合は true です。- 導入:
- 6.2.6
getComponentType
クラスからコピーされた説明:IntegrationObjectSupport
サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。- 次で指定:
- インターフェース
NamedComponent
のgetComponentType
- オーバーライド:
- クラス
IntegrationObjectSupport
のgetComponentType
onInit
protected void onInit()クラスからコピーされた説明:IntegrationObjectSupport
サブクラスは、初期化ロジック用にこれを実装できます。- オーバーライド:
- クラス
MessageProducerSupport
のonInit
subscribeToTopics
unsubscribeFromTopics
doStart
protected void doStart()クラスからコピーされた説明:MessageProducerSupport
デフォルトでは何も実行されません。ライフサイクル管理された動作が必要な場合、サブクラスはこれをオーバーライドできます。'lifecycleLock' によって保護されています。- オーバーライド:
- クラス
MessageProducerSupport
のdoStart
doStop
protected void doStop()クラスからコピーされた説明:MessageProducerSupport
デフォルトでは何もしません。サブクラスは、ライフサイクル管理の動作が必要な場合、これをオーバーライドできます。- オーバーライド:
- クラス
MessageProducerSupport
のdoStop
destroy
public void destroy()- 次で指定:
- インターフェース
DisposableBean
のdestroy
- 次で指定:
- インターフェース
IntegrationManagement
のdestroy
- オーバーライド:
- クラス
AbstractEndpoint
のdestroy