パッケージ jakarta.faces.event

クラス ExceptionQueuedEventContext

java.lang.ObjectSE
jakarta.faces.event.ExceptionQueuedEventContext
実装されたすべてのインターフェース:
SystemEventListenerHolder

public class ExceptionQueuedEventContext extends ObjectSE implements SystemEventListenerHolder

このヘルパークラスは、ExceptionQueuedEvent が発生した時点でのシステムの状態に関する ExceptionQueuedEvent へのコンテキストを提供し、SystemEventListener を実装することによって ExceptionQueuedEvent を ExceptionHandler にリンクします。

導入:
2.0
  • フィールドの詳細

    • IN_BEFORE_PHASE_KEY

      public static final StringSE IN_BEFORE_PHASE_KEY

      getAttributes() から返された Map のこのキーにエントリが存在することは、現在のライフサイクルフェーズの「前フェーズ」部分でイベントが発生したことを示します。

    • IN_AFTER_PHASE_KEY

      public static final StringSE IN_AFTER_PHASE_KEY

      getAttributes() から返された Map のこのキーにエントリが存在することは、現在のライフサイクルフェーズの「アフターフェーズ」部分でイベントが発生したことを示します。

  • コンストラクターの詳細

    • ExceptionQueuedEventContext

      public ExceptionQueuedEventContext(FacesContext context, ThrowableSE thrown)

      引数 Throwable が発生したことを示す新しい ExceptionQueuedEventContext をインスタンス化します。

      パラメーター:
      context - 現在のリクエストの FacesContext
      thrown - この ExceptionQueuedEventContext インスタンスのコンテキストである Throwable
    • ExceptionQueuedEventContext

      public ExceptionQueuedEventContext(FacesContext context, ThrowableSE thrown, UIComponent component)

      引数 component に関連して、引数 Throwable が発生したことを示す新しい ExceptionQueuedEventContext をインスタンス化します。

      パラメーター:
      context - 現在のリクエストの FacesContext
      thrown - この ExceptionQueuedEventContext インスタンスのコンテキストである Throwable
      component - この ExceptionQueuedEventContext が関係する UIComponent インスタンス
    • ExceptionQueuedEventContext

      public ExceptionQueuedEventContext(FacesContext context, ThrowableSE thrown, UIComponent component, PhaseId phaseId)

      ライフサイクルフェーズ phaseId 中に、引数 component に関連する引数 Throwable が発生したことを示す新しい ExceptionQueuedEventContext をインスタンス化します。

      パラメーター:
      context - 現在のリクエストの FacesContext
      thrown - この ExceptionQueuedEventContext インスタンスのコンテキストである Throwable
      component - コンテキストに関連する UIComponent
      phaseId - この ExeceptionEventContext が作成された時点の PhaseId
  • メソッドの詳細

    • getContext

      public FacesContext getContext()

      このリクエストの FacesContext

      戻り値:
      この ExceptionQueuedEventContext インスタンスの作成に使用される FacesContext
    • getException

      public ThrowableSE getException()

      exception プロパティを返します。

      戻り値:
      例外
    • getComponent

      public UIComponent getComponent()

      例外がスローされたときに処理されていた UIComponent を返します。ないか利用できない場合、これは null になります。

      戻り値:
      コンポーネント
    • getPhaseId

      public PhaseId getPhaseId()

      例外がスローされたときに処理されていた PhaseId を返します。ないか利用できない場合、これは null になります。

      戻り値:
      フェーズ ID
    • inBeforePhase

      public boolean inBeforePhase()
      戻り値:
      特定のライフサイクルフェーズの before phase 処理中に例外が発生した場合は true 
    • inAfterPhase

      public boolean inAfterPhase()
      戻り値:
      特定のライフサイクルフェーズの after phase 処理中に例外が発生した場合は true 
    • getAttributes

      public MapSE<ObjectSE,ObjectSE> getAttributes()

      この ExceptionQueuedEvent のコンテキストに関連する属性の Map

      戻り値:
      このコンテキストに関連する属性
    • getListenersForEventClass

      public ListSE<SystemEventListener> getListenersForEventClass(ClassSE<? extends SystemEvent> facesEventClass)

      現在のリクエストの ExceptionHandler という 1 つのエントリを含む List を返します。

      次で指定:
      インターフェース SystemEventListenerHoldergetListenersForEventClass 
      パラメーター:
      facesEventClass - リスナーが返されるクラス
      戻り値:
      引数クラスのリスナー