クラス XPathRouter

実装されたすべてのインターフェース:
org.reactivestreams.Subscriber<Message<?>>AwareBeanFactoryAwareBeanNameAwareDisposableBeanInitializingBeanApplicationContextAwareOrderedExpressionCapableOrderableIntegrationPatternMessageRouterNamedComponentIntegrationManagementMappingMessageRouterManagementTrackableComponentMessageHandlerreactor.core.CoreSubscriber<Message<?>>

public class XPathRouter extends AbstractMappingMessageRouter
XPathExpression 評価を使用してチャネル名を判別するメッセージルーター。
作成者:
Jonas Partner, Oleg Zhurakousky
  • コンストラクターの詳細

    • XPathRouter

      public XPathRouter(StringSE expression, MapSE<StringSE,StringSE> namespaces)
      XPath 式を使用するルーターを作成します。式には、0 個以上の名前空間プレフィックスを含めることができます。
      パラメーター:
      expression - 文字列としての XPath 式
      namespaces - マップキーとしてプレフィックスを持つ名前空間のマップ
    • XPathRouter

      public XPathRouter(StringSE expression, StringSE prefix, StringSE namespace)
      1 つの名前空間で XPath 式を使用するルーターを作成します。例: expression='/ns1:one/@type' prefix =' ns1'namespace='www.example.org'
      パラメーター:
      expression - 文字列としての XPath 式
      prefix - 名前空間接頭部
      namespace - 名前空間 URI
    • XPathRouter

      public XPathRouter(StringSE expression)
      名前空間のない XPath 式を使用するルーターを作成します。例 '/one/@type'
      パラメーター:
      expression - 文字列としての XPath 式
    • XPathRouter

      public XPathRouter(XPathExpression expression)
      提供された XPath 式を使用するルーターを作成します。
      パラメーター:
      expression - XPath 式
  • メソッドの詳細

    • setEvaluateAsString

      public void setEvaluateAsString(boolean evaluateAsString)
    • setConverter

      public void setConverter(XmlPayloadConverter converter)
      XPath 評価の前にペイロードを変換するときに使用するコンバーターを指定します。
      パラメーター:
      converter - ペイロードコンバーター。
    • getComponentType

      public StringSE getComponentType()
      クラスからコピーされた説明: IntegrationObjectSupport
      サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。
      次で指定:
      インターフェース NamedComponentgetComponentType 
      オーバーライド:
      クラス AbstractMessageRoutergetComponentType 
    • getChannelKeys

      protected ListSE<ObjectSE> getChannelKeys(Message<?> message)
      クラスからコピーされた説明: AbstractMappingMessageRouter
      サブクラスは、チャネルキーを返すためにこのメソッドを実装する必要があります。「キー」はこのルーターの "channelMappings" に存在する場合があります。または、チャネルの名前またはメッセージチャネルインスタンス自体である場合もあります。
      次で指定:
      クラス AbstractMappingMessageRoutergetChannelKeys 
      パラメーター:
      message - メッセージ。
      戻り値:
      チャンネルキー。