org.apache.struts.action
インタフェース PlugIn

既知の実装クラスの一覧:
DigestingPlugIn, ModuleConfigVerifier, TilesPlugin, ValidatorPlugIn

public interface PlugIn

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

導入されたバージョン:
Struts 1.1
バージョン:
$Revision: 1.5 $ $Date: 2005/02/11 03:27:20 $
翻訳者:
棚澤 昌幸
翻訳状況:
初稿(校正者募集中)

メソッドの概要
 void destroy()
          モジュールが終了する通知を受け取ります。
 void init(ActionServlet servlet, ModuleConfig config)
          モジュールが起動する通知を受け取ります。
 

メソッドの詳細

destroy

public void destroy()

モジュールが終了する通知を受け取ります。

Receive notification that our owning module is being shut down.


init

public void init(ActionServlet servlet,
                 ModuleConfig config)
          throws javax.servlet.ServletException

モジュールが起動する通知を受け取ります。

Receive notification that the specified module is being started up.

パラメータ:
servlet - このウェッブアプリケーションの全てのモジュールを処理するActionServlet
@param servlet ActionServlet that is managing all the modules in this web application
config - このプラグインに関連付けられたモジュールのModuleConfig
@param config ModuleConfig for the module with which this plug-in is associated
例外:
javax.servlet.ServletException - このPlugInの初期化が成功できなかった場合
@exception ServletException if this PlugIn cannot be successfully initialized


このドキュメントは、Ja-Jakartaにより訳されました。コメントがある場合は、report@jajakarta.orgまでお願いします。
Copyright (C) 2000-2004 - Apache Software Foundation