public interface InstanceDef
コンポーネントのインスタンスをS2コンテナ上でどのように管理するのかを定義します。
インスタンス定義の種類には、以下のものがあります。
singleton(default)prototypeapplicationrequestsessionouterLaContainerの外で生成し、 インジェクションだけを行ないます。
アスペクト、コンストラクタ・インジェクションは適用できません。インスタンス定義の指定方法には、以下のものがあります。
<component>のinstance属性で指定します。@Componentのinstance値で指定します。singletonを指定したことになります。
application、 request、 sessionを使う場合は、
LaContainer.init()を行なう前にExternalContextをS2コンテナに設定する必要があります。
| 修飾子とタイプ | フィールドと説明 |
|---|---|
static String |
APPLICATION_NAME
インスタンス定義「
application」を表す定数です。 |
static String |
OUTER_NAME
インスタンス定義「
outer」を表す定数です。 |
static String |
PROTOTYPE_NAME
インスタンス定義「
prototype」を表す定数です。 |
static String |
REQUEST_NAME
インスタンス定義「
request」を表す定数です。 |
static String |
SESSION_NAME
インスタンス定義「
session」を表す定数です。 |
static String |
SINGLETON_NAME
インスタンス定義「
singleton」を表す定数です。 |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
ComponentDeployer |
createComponentDeployer(ComponentDef componentDef)
インスタンス定義に基づいた、コンポーネント定義
componentDefのComponentDeployerを返します。 |
String |
getName()
インスタンス定義の文字列表現を返します。
|
String getName()
ComponentDeployer createComponentDeployer(ComponentDef componentDef)
componentDefのComponentDeployerを返します。componentDef - コンポーネント定義ComponentDeployerオブジェクトCopyright © 2015 The DBFlute Project. All rights reserved.