org.seasar.framework.container.cooldeploy
クラス CoolComponentAutoRegister

java.lang.Object
  拡張org.seasar.framework.container.cooldeploy.CoolComponentAutoRegister
すべての実装インタフェース:
ClassTraversal.ClassHandler

public class CoolComponentAutoRegister
extends Object
implements ClassTraversal.ClassHandler

NamingConventionに一致するコンポーネントを自動登録するクラスです。

作成者:
higa

入れ子クラスの概要
protected  class CoolComponentAutoRegister.CodeSourceFileStrategy
          OC4J固有のcode-source:プロトコルで表現されるURLをサポートするストラテジです。
protected  class CoolComponentAutoRegister.FileSystemStrategy
          ファイルシステム用の CoolComponentAutoRegister.Strategyです。
protected  class CoolComponentAutoRegister.JarFileStrategy
          jarファイル用の CoolComponentAutoRegister.Strategyです。
protected static interface CoolComponentAutoRegister.Strategy
          プロトコルに応じた自動登録を行なうストラテジです。
protected  class CoolComponentAutoRegister.ZipFileStrategy
          WebLogic固有のzip:プロトコルで表現されるURLをサポートするストラテジです。
 
フィールドの概要
static String container_BINDING
          Bindingアノテーションの定義です。
static String INIT_METHOD
          InitMethodアノテーションの定義です。
 
コンストラクタの概要
CoolComponentAutoRegister()
          CoolComponentAutoRegisterを作成します。
 
メソッドの概要
protected  void addStrategy(String protocol, CoolComponentAutoRegister.Strategy strategy)
          CoolComponentAutoRegister.Strategyを追加します。
protected  ComponentDef createComponentDef(Class componentClass)
          ComponentDefを作成します。
 S2Container getContainer()
          S2Containerを返します。
 ComponentCreator[] getCreators()
          ComponentCreatorの配列を返します。
 NamingConvention getNamingConvention()
          NamingConventionを返します。
 Map getStrategies()
          登録されているストラテジを返します。
protected  CoolComponentAutoRegister.Strategy getStrategy(String protocol)
          CoolComponentAutoRegister.Strategy を返します。
 void processClass(String packageName, String shortClassName)
          クラスを処理します。
 void registerAll()
          自動登録を行います。
 void setContainer(S2Container container)
          S2Containerを設定します。
 void setCreators(ComponentCreator[] creators)
          ComponentCreatorの配列を設定します。
 void setNamingConvention(NamingConvention namingConvention)
          NamingConventionを設定します。
protected  void webSphereClassLoaderFix()
          Jarファイルからコンポーネントの登録を行います。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

INIT_METHOD

public static final String INIT_METHOD
InitMethodアノテーションの定義です。

関連項目:
定数フィールド値

container_BINDING

public static final String container_BINDING
Bindingアノテーションの定義です。

関連項目:
定数フィールド値
コンストラクタの詳細

CoolComponentAutoRegister

public CoolComponentAutoRegister()
CoolComponentAutoRegisterを作成します。

メソッドの詳細

getContainer

public S2Container getContainer()
S2Containerを返します。

戻り値:
S2Container

setContainer

public void setContainer(S2Container container)
S2Containerを設定します。

パラメータ:
container -

getStrategies

public Map getStrategies()
登録されているストラテジを返します。

戻り値:
登録されているストラテジ

getStrategy

protected CoolComponentAutoRegister.Strategy getStrategy(String protocol)
CoolComponentAutoRegister.Strategy を返します。

パラメータ:
protocol -
戻り値:
CoolComponentAutoRegister.Strategy

addStrategy

protected void addStrategy(String protocol,
                           CoolComponentAutoRegister.Strategy strategy)
CoolComponentAutoRegister.Strategyを追加します。

パラメータ:
protocol -
strategy -

getCreators

public ComponentCreator[] getCreators()
ComponentCreatorの配列を返します。

戻り値:
ComponentCreatorの配列

setCreators

public void setCreators(ComponentCreator[] creators)
ComponentCreatorの配列を設定します。

パラメータ:
creators -

getNamingConvention

public NamingConvention getNamingConvention()
NamingConventionを返します。

戻り値:
NamingConvention

setNamingConvention

public void setNamingConvention(NamingConvention namingConvention)
NamingConventionを設定します。

パラメータ:
namingConvention -

registerAll

public void registerAll()
自動登録を行います。


webSphereClassLoaderFix

protected void webSphereClassLoaderFix()
Jarファイルからコンポーネントの登録を行います。

WebSphere のクラスローダーはJarファイル中のディレクトリエントリをClassLoader#getResource()で 返してくれないので、 S2のJarと同じ場所にあるJarファイルからコンポーネントの登録を行います。


processClass

public void processClass(String packageName,
                         String shortClassName)
インタフェース ClassTraversal.ClassHandler の記述:
クラスを処理します。

定義:
インタフェース ClassTraversal.ClassHandler 内の processClass
パラメータ:
packageName -
shortClassName -

createComponentDef

protected ComponentDef createComponentDef(Class componentClass)
ComponentDefを作成します。

パラメータ:
componentClass -
戻り値:
ComponentDef


Copyright ? 2004-2008 The Seasar Foundation. All Rights Reserved.