Class SimpleBranchComponent

java.lang.Object
com.infoteria.asteria.flowengine2.flow.Component
com.infoteria.asteria.flowlibrary2.component.SimpleBranchComponent
All Implemented Interfaces:
Cloneable

public abstract class SimpleBranchComponent extends Component
2分岐のコンポーネントの基底クラスです。
このクラスでは「Exception」というプロパティがあらかじめ登録されています。
  • Field Details

  • Constructor Details

    • SimpleBranchComponent

      public SimpleBranchComponent(int inputTypes, int defaultExitTypes, int branchExitTypes)
      入力可能なストリームフォーマットとそれぞれのコネクタで出力可能なストリームフォーマットを指定するコンストラクタ。
      Parameters:
      inputTypes - 入力可能ストリームフォーマット。StreamTypeクラスのシンボルを使用して設定します。
      defaultExitTypes - defaultコネクタで出力可能ストリームフォーマット。StreamTypeクラスのシンボルを使用して設定します。
      branchExitTypes - branchコネクタで出力可能ストリームフォーマット。StreamTypeクラスのシンボルを使用して設定します。
  • Method Details

    • getComponentEntrance

      public ComponentEntrance getComponentEntrance()
      入力コネクタセットを取得します。
      Specified by:
      getComponentEntrance in class Component
    • getComponentExit

      public ComponentExit getComponentExit(String state)
      stateに対応する出力コネクタセットを取得します。
      Specified by:
      getComponentExit in class Component
    • getStateArray

      public String[] getStateArray()
      このコンポーネントでは「default」と「branch」というふたつのStateを返します。
      Specified by:
      getStateArray in class Component
    • getState

      public String getState()
      出力Stateを返します。
      このコンポーネントではsetOutputStreamメソッドの第一引数にtrueが設定された場合は「branch」を、 falseが設定された場合は「default」を返します。
      Overrides:
      getState in class Component
    • setOutputStream

      protected void setOutputStream(boolean takeBranch, StreamDataObject stream) throws StreamException
      出力Stateと出力ストリームを設定します。
      Parameters:
      takeBranch - trueの場合は出力Stateは「branch」に、falseの場合は「default」になります。
      stream - 出力ストリーム
      Throws:
      StreamException
    • getInputConnector

      protected InputConnector getInputConnector()
      入力コネクタを取得します。
    • getDefaultOutputConnector

      protected OutputConnector getDefaultOutputConnector()
      「default」Stateの出力コネクタを取得します。
    • getBranchOutputConnector

      protected OutputConnector getBranchOutputConnector()
      「branch」Stateの出力コネクタを取得します。