org.seasar.remoting.axis.deployer
クラス AxisDeployer

java.lang.Object
  拡張org.seasar.remoting.axis.deployer.AxisDeployer
すべての実装インタフェース:
org.seasar.remoting.common.deployer.Deployer

public class AxisDeployer
extends java.lang.Object
implements org.seasar.remoting.common.deployer.Deployer

diconファイル中に記述されたコンポーネントをAxisにデプロイします。

作成者:
koichik

フィールドの概要
protected  org.seasar.framework.container.S2Container container
           
protected  java.lang.ThreadLocal context
           
protected  ItemDeployer handlerDeployer
           
protected static java.util.regex.Pattern META_NAME_PATTERN
          <meta> 要素の name 属性に指定される名前を取得するための正規表現です。
protected  ItemDeployer serviceDeployer
           
protected  javax.servlet.ServletContext servletContext
           
protected  ItemDeployer wsddDeployer
           
 
コンストラクタの概要
AxisDeployer()
           
 
メソッドの概要
 void deploy()
          コンテナに登録されているサービスやハンドラをデプロイします。
protected  void forEach(org.seasar.framework.container.S2Container container)
          コンテナの階層をたどって全てのコンテナとコンポーネント定義を走査します。
protected  org.apache.axis.deployment.wsdd.WSDDDeployment getDeployment(org.seasar.framework.container.S2Container container)
          WSDDデプロイメントを返します。
protected  org.apache.axis.AxisEngine getEngine()
          Axisエンジンを返します。
protected  org.apache.axis.AxisEngine getEngine(org.seasar.framework.container.S2Container container)
          Axisエンジンを返します。
protected  java.lang.String getLocalName(org.seasar.framework.container.MetaDef metaDef)
          メタデータの名前がS2Axisで使用する接頭辞で始まっていれば、接頭辞の後ろのローカル名を返します。
protected  org.seasar.framework.container.MetaDef getMetaDef(org.seasar.framework.container.MetaDefAware metaDefSupport, java.lang.String localName)
          S2Container または ComponentDef が名前 "axis-localName<meta> 要素を持っていれば、その MetaDef を返します。
protected  org.seasar.framework.container.MetaDef[] getMetaDefs(org.seasar.framework.container.MetaDefAware metaDefSupport, java.lang.String localName)
          S2Container または ComponentDef が名前 "axis-localName<meta> 要素を持っていれば、その MetaDef を全て返します。
protected  void process(org.seasar.framework.container.ComponentDef componentDef)
          コンポーネント定義にS2Axisのメタデータ <meta name="axis-service"> または <meta name="axis-handler"> が指定されていれば、そのコンポーネントをサービスまたはハンドラとしてAxisにデプロイします。
protected  void process(org.seasar.framework.container.S2Container container)
          S2コンテナにS2Axisのメタデータ <meta name="axis-deploy"> が指定されていれば、そのWSDDをAxisにデプロイします。
 void setContainer(org.seasar.framework.container.S2Container container)
          S2コンテナを設定します。
 void setServletContext(javax.servlet.ServletContext servletContext)
          サーブレットコンテキストを設定します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

META_NAME_PATTERN

protected static final java.util.regex.Pattern META_NAME_PATTERN
<meta> 要素の name 属性に指定される名前を取得するための正規表現です。
S2Axis-V1.0.0-RC2以降は接頭辞 axis- の後にローカル名が続きます。
S2Axis-V1.0.0-RC1以前との互換性のため、接頭辞 s2-axis: も使えるようにしています。


container

protected org.seasar.framework.container.S2Container container

servletContext

protected javax.servlet.ServletContext servletContext

serviceDeployer

protected ItemDeployer serviceDeployer

handlerDeployer

protected ItemDeployer handlerDeployer

wsddDeployer

protected ItemDeployer wsddDeployer

context

protected java.lang.ThreadLocal context
コンストラクタの詳細

AxisDeployer

public AxisDeployer()
メソッドの詳細

setContainer

public void setContainer(org.seasar.framework.container.S2Container container)
S2コンテナを設定します。

パラメータ:
container - S2コンテナ

setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)
サーブレットコンテキストを設定します。

パラメータ:
servletContext - サーブレットコンテキスト

deploy

public void deploy()
コンテナに登録されているサービスやハンドラをデプロイします。

定義:
インタフェース org.seasar.remoting.common.deployer.Deployer 内の deploy

forEach

protected void forEach(org.seasar.framework.container.S2Container container)
コンテナの階層をたどって全てのコンテナとコンポーネント定義を走査します。
走査する順序は次の通りです。
  1. 子のコンテナを再起的に
  2. コンテナ自身(<components>直下の<meta>要素)
  3. コンポーネント(<component>の下の<meta>要素)

パラメータ:
container - 起点となるコンテナ

process

protected void process(org.seasar.framework.container.S2Container container)
S2コンテナにS2Axisのメタデータ <meta name="axis-deploy"> が指定されていれば、そのWSDDをAxisにデプロイします。

パラメータ:
container - S2コンテナ

process

protected void process(org.seasar.framework.container.ComponentDef componentDef)
コンポーネント定義にS2Axisのメタデータ <meta name="axis-service"> または <meta name="axis-handler"> が指定されていれば、そのコンポーネントをサービスまたはハンドラとしてAxisにデプロイします。

パラメータ:
componentDef - コンポーネント定義

getDeployment

protected org.apache.axis.deployment.wsdd.WSDDDeployment getDeployment(org.seasar.framework.container.S2Container container)
WSDDデプロイメントを返します。

パラメータ:
container - コンテナ
戻り値:
WSDDデプロイメント

getEngine

protected org.apache.axis.AxisEngine getEngine()
Axisエンジンを返します。
デフォルトの S2 コンテナから Axis エンジンを探して返します。

戻り値:
Axisエンジン

getEngine

protected org.apache.axis.AxisEngine getEngine(org.seasar.framework.container.S2Container container)
Axisエンジンを返します。
Axisエンジンは、コンテナに名前 axis-engine を持つ <meta> 要素が指定されていれば、その内容文字列から次のように決定されます。
未定義の場合
"default" が指定されたものとしてAxisエンジンを決定します。
"default"
コンテナにサーブレットコンテキストが設定されていれば "default-server" 、そうでなければ "default-client" が指定されたものとしてAxisエンジンを決定します。
"default-client"
コンテナから javax.xml.rpc.Service を実装したコンポーネントを取得し、そのエンジンを使用します。
"default-server"
サーブレットコンテキストに設定されているAxisエンジンを使用します。
最初に S2AxisConstants.AXIS_SERVLETS2AxisConstants.ATTR_AXIS_ENGINEを連結した文字列をキーとして サーブレットコンテキストからAxisエンジンを取得します。
見つからなかった場合は{S2AxisConstants#ATTR_AXIS_ENGINE}を キーとしてサーブレットコンテキストから取得したAxisエンジンを取得します。
"servlet:" で始まる文字列
"servlet:" の後ろの文字列をキーとしてサーブレットコンテキストから 取得したAxisエンジンを使用します。
"s2:" で始まる文字列
"s2:" の後ろの文字列をキーとしてS2コンテナから 取得したコンポーネントをAxisエンジンを使用します。
その他
キーとしてS2コンテナから取得したコンポーネントをAxisエンジンとして使用します。

パラメータ:
container - コンテナ
戻り値:
Axisエンジン

getMetaDef

protected org.seasar.framework.container.MetaDef getMetaDef(org.seasar.framework.container.MetaDefAware metaDefSupport,
                                                            java.lang.String localName)
S2Container または ComponentDef が名前 "axis-localName<meta> 要素を持っていれば、その MetaDef を返します。
S2Container または ComponentDef に該当する メタデータが複数定義されている場合は最初に見つかったメタデータを返します。

パラメータ:
metaDefSupport - S2Container または ComponentDef
localName - 接頭辞 axis- に続くメタデータの名前
戻り値:
指定された名前を持つ MetaDef 。存在しない場合は null

getMetaDefs

protected org.seasar.framework.container.MetaDef[] getMetaDefs(org.seasar.framework.container.MetaDefAware metaDefSupport,
                                                               java.lang.String localName)
S2Container または ComponentDef が名前 "axis-localName<meta> 要素を持っていれば、その MetaDef を全て返します。

パラメータ:
metaDefSupport - S2Container または ComponentDef
localName - 接頭辞 axis- に続くメタデータの名前
戻り値:
指定された名前を持つ MetaDef の配列

getLocalName

protected java.lang.String getLocalName(org.seasar.framework.container.MetaDef metaDef)
メタデータの名前がS2Axisで使用する接頭辞で始まっていれば、接頭辞の後ろのローカル名を返します。

パラメータ:
metaDef - メタデータ定義
戻り値:
ローカル名


Copyright © 2005-2006 The Seasar Foundation. All Rights Reserved.