|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
コンポーネントのインスタンスをS2コンテナ上でどのように管理するのかを定義します。
インスタンス定義の種類には、以下のものがあります。
singleton(default)prototypeapplicationrequestsessionouterS2Containerの外で生成し、 インジェクションだけを行ないます。
アスペクト、コンストラクタ・インジェクションは適用できません。インスタンス定義の指定方法には、以下のものがあります。
<component>のinstance属性で指定します。@Componentのinstance値で指定します。singletonを指定したことになります。
application、 request、 sessionを使う場合は、
S2Container.init()を行なう前にExternalContextをS2コンテナに設定する必要があります。
Webコンテナ用にはHttpServletExternalContextが用意されています。
S2ContainerListener、
S2ContainerServletのいずれかとS2ContainerFilterをweb.xmlに設定すれば、
HttpServletExternalContextがS2コンテナに設定され、
application、 request、 sessionを使うことが出来るようになります。
| フィールドの概要 | |
static java.lang.String |
APPLICATION_NAME
インスタンス定義「 application」を表す定数です。 |
static java.lang.String |
OUTER_NAME
インスタンス定義「 outer」を表す定数です。 |
static java.lang.String |
PROTOTYPE_NAME
インスタンス定義「 prototype」を表す定数です。 |
static java.lang.String |
REQUEST_NAME
インスタンス定義「 request」を表す定数です。 |
static java.lang.String |
SESSION_NAME
インスタンス定義「 session」を表す定数です。 |
static java.lang.String |
SINGLETON_NAME
インスタンス定義「 singleton」を表す定数です。 |
| メソッドの概要 | |
ComponentDeployer |
createComponentDeployer(ComponentDef componentDef)
インスタンス定義に基づいた、コンポーネント定義 componentDefのComponentDeployerを返します。 |
java.lang.String |
getName()
インスタンス定義の文字列表現を返します。 |
| フィールドの詳細 |
public static final java.lang.String SINGLETON_NAME
singleton」を表す定数です。
public static final java.lang.String PROTOTYPE_NAME
prototype」を表す定数です。
public static final java.lang.String APPLICATION_NAME
application」を表す定数です。
public static final java.lang.String REQUEST_NAME
request」を表す定数です。
public static final java.lang.String SESSION_NAME
session」を表す定数です。
public static final java.lang.String OUTER_NAME
outer」を表す定数です。
| メソッドの詳細 |
public java.lang.String getName()
public ComponentDeployer createComponentDeployer(ComponentDef componentDef)
componentDefのComponentDeployerを返します。
componentDef - コンポーネント定義
ComponentDeployerオブジェクト
|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||