org.seasar.jca.deploy.impl
クラス AbstractResourceAdapterDeployer

java.lang.Object
  上位を拡張 org.seasar.jca.deploy.impl.AbstractDeployer<ResourceAdapter>
      上位を拡張 org.seasar.jca.deploy.impl.AbstractResourceAdapterDeployer
すべての実装されたインタフェース:
ResourceAdapterDeployer
直系の既知のサブクラス:
FsResourceAdapterDeployer, RarResourceAdapterDeployer

public abstract class AbstractResourceAdapterDeployer
extends AbstractDeployer<ResourceAdapter>
implements ResourceAdapterDeployer

リソースアダプタをデプロイする抽象クラスです.

作成者:
koichik

入れ子のクラスの概要
static class AbstractResourceAdapterDeployer.JarFileFilter
          拡張子が.jarのファイルを選択するFilenameFilterです.
 
フィールドの概要
protected  BootstrapContext bc
          ブートストラップ・コンテキスト
protected static String META_INF_RA_XML
          ra.xmlファイルのパス名
protected  String path
          RARファイルのパス
protected  ResourceAdapter ra
          リソースアダプタ
protected  ResourceAdapterConfig raConfig
          リソースアダプタのコンフィグレーション
 
クラス org.seasar.jca.deploy.impl.AbstractDeployer から継承されたフィールド
cl, configProperties, LINE_SEPARATOR, PARAMETER_TYPE
 
コンストラクタの概要
protected AbstractResourceAdapterDeployer()
          インスタンスを構築します.
protected AbstractResourceAdapterDeployer(int numThreads)
          デフォルトのブートストラップコンテキストでインスタンスを構築します.
 
メソッドの概要
protected  ClassLoader createClassLoader()
          設定されたJarファイルをクラスパスとして持つクラスローダを作成します.
protected  ResourceAdapter createResourceAdapter()
          リソースアダプタを作成してプロパティを設定します.
protected  SaxHandlerParser createSaxHandlerParser()
          SAXハンドラ・パーザを作成します.
 BootstrapContext getBootstrapContext()
          ブートストラップコンテキストを返します.
protected abstract  InputStream getDeploymentDescripterAsInputStream()
          デプロイメント・ディスクリプタを読み込むためのバイトストリームを返します.
protected abstract  File[] getJarFiles()
          リソースアダプタが持つJarファイルの配列を返します.
 String getPath()
          リソースアダプタのパスを返します.
 ResourceAdapter getResourceAdapter()
          リソースアダプタを返します.
 ResourceAdapterConfig getResourceAdapterConfig()
          リソースアダプタの構成を返します.
protected  void loadDeploymentDescripter()
          デプロイメント・ディスクリプタを読み込みます.
protected  void loggingConnectionDefinition(StringBuilder buf, OutboundAdapterConfig outboundConfig)
          outboundなアダプタ構成のデプロイ情報をログ出力する文字列を作成します.
protected  void loggingDeployedMessage()
          リソースアダプタをデプロイした情報をログに出力します.
protected  void loggingOutboundResourceAdapter(StringBuilder buf)
          outboundなリソースアダプタのデプロイ情報をログ出力する文字列を作成します.
 void setBootstrapContext(BootstrapContext bc)
          ブートストラップ・コンテキストを設定します.
 void setPath(String path)
          リソースアダプタのパスを設定します.
 void start()
          リソースアダプタをデプロイします.
 void stop()
          リソースアダプタをアンデプロイします.
protected  URL[] toURL(File[] jars)
          ファイルの配列をURLの配列に変換して返します.
 
クラス org.seasar.jca.deploy.impl.AbstractDeployer から継承されたメソッド
applyProperties, applyProperty, getClassLoader, loggingConfigProperties, setClassLoader, setProperty, setProperty, setProperty
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
インタフェース org.seasar.jca.deploy.ResourceAdapterDeployer から継承されたメソッド
getClassLoader
 

フィールドの詳細

META_INF_RA_XML

protected static final String META_INF_RA_XML
ra.xmlファイルのパス名

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

bc

protected BootstrapContext bc
ブートストラップ・コンテキスト


path

protected String path
RARファイルのパス


ra

protected ResourceAdapter ra
リソースアダプタ


raConfig

protected ResourceAdapterConfig raConfig
リソースアダプタのコンフィグレーション

コンストラクタの詳細

AbstractResourceAdapterDeployer

protected AbstractResourceAdapterDeployer()
インスタンスを構築します.

このコンストラクタで生成したインスタンスは, setBootstrapContext(javax.resource.spi.BootstrapContext)で ブートストラップコンテキストを設定しなくてはなりません.


AbstractResourceAdapterDeployer

protected AbstractResourceAdapterDeployer(int numThreads)
デフォルトのブートストラップコンテキストでインスタンスを構築します.

パラメータ:
numThreads - スレッドプールのスレッド数
メソッドの詳細

setBootstrapContext

public void setBootstrapContext(BootstrapContext bc)
ブートストラップ・コンテキストを設定します.

パラメータ:
bc - ブートストラップ・コンテキスト

start

public void start()
           throws ResourceException,
                  IOException
インタフェース ResourceAdapterDeployer の記述:
リソースアダプタをデプロイします.

定義:
インタフェース ResourceAdapterDeployer 内の start
例外:
ResourceException - リソースアダプタのデプロイに失敗した場合にスローされます
IOException - リソースアダプタのデプロイ中に入出力エラーが発生した場合にスローされます
関連項目:
ResourceAdapter.start(BootstrapContext)

stop

public void stop()
インタフェース ResourceAdapterDeployer の記述:
リソースアダプタをアンデプロイします.

定義:
インタフェース ResourceAdapterDeployer 内の stop

createResourceAdapter

protected ResourceAdapter createResourceAdapter()
リソースアダプタを作成してプロパティを設定します.

戻り値:
リソースアダプタ

loadDeploymentDescripter

protected void loadDeploymentDescripter()
                                 throws ResourceException,
                                        IOException
デプロイメント・ディスクリプタを読み込みます.

例外:
ResourceException - デプロイメント・ディスクリプタの読み込み中にエラーが発生した場合
IOException - デプロイメント・ディスクリプタの読み込み中にエラーが発生した場合

createSaxHandlerParser

protected SaxHandlerParser createSaxHandlerParser()
SAXハンドラ・パーザを作成します.

戻り値:
SAXハンドラ・パーザ

createClassLoader

protected ClassLoader createClassLoader()
                                 throws ResourceException
設定されたJarファイルをクラスパスとして持つクラスローダを作成します.

戻り値:
クラスローダ
例外:
ResourceException - JarファイルのパスをURLで表現できなかった場合

toURL

protected URL[] toURL(File[] jars)
               throws MalformedURLException
ファイルの配列をURLの配列に変換して返します.

パラメータ:
jars - ファイルの配列
戻り値:
URLの配列
例外:
MalformedURLException - ファイルをURLで表現できなかった場合

getJarFiles

protected abstract File[] getJarFiles()
リソースアダプタが持つJarファイルの配列を返します.

戻り値:
Jarファイルの配列

getDeploymentDescripterAsInputStream

protected abstract InputStream getDeploymentDescripterAsInputStream()
                                                             throws ResourceException
デプロイメント・ディスクリプタを読み込むためのバイトストリームを返します.

戻り値:
デプロイメント・ディスクリプタを読み込むためのバイトストリーム
例外:
ResourceException - デプロイメント・ディスクリプタを読み込むためのバイトストリームを作成できなかった場合

loggingDeployedMessage

protected void loggingDeployedMessage()
リソースアダプタをデプロイした情報をログに出力します.


loggingOutboundResourceAdapter

protected void loggingOutboundResourceAdapter(StringBuilder buf)
outboundなリソースアダプタのデプロイ情報をログ出力する文字列を作成します.

パラメータ:
buf - ログ情報を作成するバッファ

loggingConnectionDefinition

protected void loggingConnectionDefinition(StringBuilder buf,
                                           OutboundAdapterConfig outboundConfig)
outboundなアダプタ構成のデプロイ情報をログ出力する文字列を作成します.

パラメータ:
buf - ログ情報を作成するバッファ
outboundConfig - outboundなアダプタ構成

getBootstrapContext

public BootstrapContext getBootstrapContext()
インタフェース ResourceAdapterDeployer の記述:
ブートストラップコンテキストを返します.

定義:
インタフェース ResourceAdapterDeployer 内の getBootstrapContext
戻り値:
ブートストラップコンテキスト

getPath

public String getPath()
リソースアダプタのパスを返します.

戻り値:
リソースアダプタのパス

setPath

public void setPath(String path)
リソースアダプタのパスを設定します.

パラメータ:
path - リソースアダプタのパス

getResourceAdapter

public ResourceAdapter getResourceAdapter()
インタフェース ResourceAdapterDeployer の記述:
リソースアダプタを返します.

定義:
インタフェース ResourceAdapterDeployer 内の getResourceAdapter
戻り値:
リソースアダプタ

getResourceAdapterConfig

public ResourceAdapterConfig getResourceAdapterConfig()
インタフェース ResourceAdapterDeployer の記述:
リソースアダプタの構成を返します.

定義:
インタフェース ResourceAdapterDeployer 内の getResourceAdapterConfig
戻り値:
リソースアダプタの構成


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