|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
PlugInは、
アプリケーション起動やアプリケーション終了イベントについて通知する必要がある、
特定モジュールのリソースまたはサービスのための設定用ラッパーです。
(この起動・終了イベントは、
ActionServletインスタンスに応じ、
コンテナがinitメソッドやdestroyメソッドを呼ぶ時に一致します。)
アプリケーションライフサイクルを実行するためのActionServletサブクラスを全く必要とすること無しに、
PlugInオブジェクトはstruts-config.xmlファイルの中で設定することができます。
A PlugIn is a configuration wrapper for a
module-specific resource or service that needs to be notified about
application startup and application shutdown events (corresponding to when
the container calls init and destroy on the
corresponding {@link ActionServlet} instance). PlugIn objects can be
configured in the struts-config.xml file, without the need
to subclass {@link ActionServlet} simply to perform application lifecycle
activities.
このインタフェースの実装は、
ActionServletによって使われるため引数のないコンストラクタを持たねばなりません。
設定は、
標準のJavaBeansプロパティのセッターメソッドを用意することにより行うことができます。
これは、init()メソッドが呼ばれる前に、
全てのセッターメソッドが呼ばれるためです。
Implementations of this interface must supply a zero-argument constructor
for use by {@link ActionServlet}. Configuration can be accomplished by
providing standard JavaBeans property setter methods, which will all have
been called before the init() method is invoked.
このインタフェースは、 Actionのサブクラスを含む全てのクラスに適用可能です。
This interface can be applied to any class, including an Action subclass
| メソッドの概要 | |
void |
destroy()
モジュールが終了する通知を受け取ります。 |
void |
init(ActionServlet servlet,
ModuleConfig config)
モジュールが起動する通知を受け取ります。 |
| メソッドの詳細 |
public void destroy()
モジュールが終了する通知を受け取ります。
Receive notification that our owning module is being shut down.
public void init(ActionServlet servlet,
ModuleConfig config)
throws javax.servlet.ServletException
モジュールが起動する通知を受け取ります。
Receive notification that the specified module is being started up.
servlet - このウェッブアプリケーションの全てのモジュールを処理するActionServlet
config - このプラグインに関連付けられたモジュールのModuleConfig
javax.servlet.ServletException - このPlugInの初期化が成功できなかった場合
PlugIn cannot
be successfully initialized
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||