/* * Copyright 2004-2006 the Seasar Foundation and the Others. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.seasar.framework.container; /** * このインターフェースは、 コンポーネントを利用可能にするための機能を提供するコンポーネントデプロイヤを表します。 *
* このインターフェースを実装するクラスは、 {@link InstanceDef コンポーネントインスタンス定義}に応じて以下の機能を提供します。 *
* コンポーネントインスタンス定義と有効なメソッドの対応表を以下に示します。
コンポーネントインスタンス定義と有効なメソッドとの関係 | *|||||||
---|---|---|---|---|---|---|---|
{@link InstanceDef コンポーネントインスタンス定義} | *シングルトン * | プロトタイプ * | 外部コンテキスト * | 外部コンポーネント * | |||
{@link org.seasar.framework.container.deployer.InstanceSingletonDef singleton} * | {@link org.seasar.framework.container.deployer.InstancePrototypeDef prototype} * | {@link org.seasar.framework.container.deployer.InstanceApplicationDef application} * | {@link org.seasar.framework.container.deployer.InstanceSessionDef session} * | {@link org.seasar.framework.container.deployer.InstanceRequestDef request} * | {@link org.seasar.framework.container.deployer.InstanceOuterDef outer} * | ||
メソッド | *{@link #init()} | *{@link org.seasar.framework.container.deployer.SingletonComponentDeployer#init() ○} | *△ | *△ | *△ | *△ | *△ | *
{@link #deploy()} | *{@link org.seasar.framework.container.deployer.SingletonComponentDeployer#deploy() ○} | *{@link org.seasar.framework.container.deployer.PrototypeComponentDeployer#deploy() ○} | *{@link org.seasar.framework.container.deployer.ApplicationComponentDeployer#deploy() ○} | *{@link org.seasar.framework.container.deployer.SessionComponentDeployer#deploy() ○} | *{@link org.seasar.framework.container.deployer.RequestComponentDeployer#deploy() ○} | *× | *|
{@link #injectDependency(Object)} | *× | *× | *× | *× | *× | *{@link org.seasar.framework.container.deployer.OuterComponentDeployer#injectDependency(Object) ○} | *|
{@link #destroy()} | *{@link org.seasar.framework.container.deployer.SingletonComponentDeployer#destroy() ○} | *△ | *△ | *△ | *△ | *△ | *
outerComponent
に対し、 この{@link ComponentDeployer コンポーネントデプロイヤ}の{@link ComponentDef コンポーネント定義}に基づいて、
* S2コンテナ上のコンポーネントをインジェクションします。
*
* @param outerComponent
* 外部コンポーネント
*
* @see org.seasar.framework.container.deployer.OuterComponentDeployer#injectDependency(Object)
*/
public void injectDependency(Object outerComponent);
/**
* コンポーネントデプロイヤを初期化します。
*
* デプロイするコンポーネントの{@link InstanceDef コンポーネントインスタンス定義}がsingleton
の場合には、
* {@link AspectDef アスペクト}を適用したインスタンスの生成、 配備、 プロパティ設定の後に、
* {@link InitMethodDef initMethod}が呼ばれます。
*
* デプロイするコンポーネントの{@link InstanceDef コンポーネントインスタンス定義}がsingleton
の場合には、
* {@link DestroyMethodDef destoryMethod}が呼ばれます。
*