|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectorg.seasar.remoting.rmi.server.Main
S2RMIを利用したアプリケーションをサーバプロセスとして起動するブートストラップを提供するクラスです。
このクラスはS2RMI-Serverの提供する実行可能JarにおいてMain-Classに設定されることにより、 S2RMIサーバプロセスのエントリポイントとなります。
S2RMI-Serverはこのクラス自身を含むS2RMI-ServerのJarファイルと同じ位置にあるJarファイルをクラスパスに追加します。
S2RMI-Serverを起動する際にコマンドライン引数として以下の指定を行うことができます。
--classpath
classpaths--dicon diconfile
app.dicon
になります。
フィールドの概要 | |
protected static String |
BOOTSTRAP_CLASS_FILE_NAME
|
protected static String |
DEFAULT_DICON_FILE
|
protected static String |
DESTROY_METHOD
|
protected static String |
INITIALIZER_CLASS
|
protected static String |
INITIALIZER_METHOD
|
protected Object |
s2container
|
protected static String |
SET_CONFIG_PATH_METHOD
|
protected static boolean |
waiting
|
コンストラクタの概要 | |
Main()
|
メソッドの概要 | |
protected void |
addPath(List urls,
File path)
クラスパスを表すURLの配列にパスを追加します。 |
protected Object |
createS2Container(String dicon)
S2コンテナを構築します。 |
protected String |
getArg(String name,
String[] args)
コマンドライン引数から指定されたキーに対応する値を返します。 |
protected File |
getBootstrapJarFile()
このクラスを含んでいるS2RMI-ServerのJarファイルを返します。 |
protected String |
getClasspath(String[] args)
コマンドライン引数で指定された追加のクラスパスを返します。 |
protected String |
getDicon(String[] args)
コマンドライン引数で指定されたdiconファイルのパス名を返します。 |
protected File[] |
getJarFiles(File dir)
指定されたディレクトリ直下にあるJarファイルの配列を返します。 |
protected boolean |
isJar(File pathname)
ファイルがJarなら true を返します。 |
static boolean |
isWaiting()
S2RMI-Serverプロセスのメインスレッドが待機中の場合は true を返します。 |
static void |
main(String[] args)
S2JMS-Serverプロセスを開始します。 |
protected void |
run(String[] args)
S2RMI-Serverプロセスを開始し、待機します。 |
protected void |
setupClasspath(String[] pathStrings)
クラスパスを構築します。 |
static void |
stop()
S2RMI-Serverプロセスを停止します。 |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
protected static final String DEFAULT_DICON_FILE
protected static final String INITIALIZER_CLASS
protected static final String SET_CONFIG_PATH_METHOD
protected static final String INITIALIZER_METHOD
protected static final String DESTROY_METHOD
protected static final String BOOTSTRAP_CLASS_FILE_NAME
protected static boolean waiting
protected Object s2container
コンストラクタの詳細 |
public Main()
メソッドの詳細 |
public static void main(String[] args)
args
- コマンドライン引数public static void stop()
public static boolean isWaiting()
true
を返します。
true
protected void run(String[] args) throws Exception
args
- コマンドライン引数
Exception
- S2RMI-Serverプロセスの初期化中に例外が発生した場合にスローされますprotected Object createS2Container(String dicon) throws Exception
dicon
- ルートとなるdiconファイルのパス名
Exception
- S2RMI-Serverプロセスの初期化中に例外が発生した場合にスローされますprotected String getDicon(String[] args) throws IllegalArgumentException
コマンドライン引数でパスが指定されなかった場合はデフォルトのapp.dicon
を返します。
args
- コマンドライン引数
IllegalArgumentException
- コマンドライン引数が不正の場合にスローされますprotected String getClasspath(String[] args) throws IllegalArgumentException
コマンドライン引数で追加のクラスパスが指定されなかった場合はデフォルトの.
を返します。
args
- コマンドライン引数
IllegalArgumentException
- コマンドライン引数が不正の場合にスローされますprotected String getArg(String name, String[] args)
name
- コマンドライン引数の名前args
- コマンドライン引数
protected void setupClasspath(String[] pathStrings) throws IOException
pathStrings
- クラスパス文字列
IOException
- IO処理中に例外が発生した場合にスローされますprotected File getBootstrapJarFile()
protected void addPath(List urls, File path) throws IOException
パスがディレクトリの場合で、そのディレクトリ直下にJarファイルが存在する場合はそれらJarファイル全てがクラスパスに追加されます。 パスがディレクトリの場合で、そのディレクトリ直下にJarファイルが存在しない場合はそのディレクトリ自身が暮らすパスに追加されます。 パスがファイルの場合はそのファイルがクラスパスに追加されます。
urls
- クラスパスを表すURLの配列path
- ディレクトリまたはファイルを表すパス
IOException
- IO処理中に例外が発生した場合にスローされますprotected File[] getJarFiles(File dir)
dir
- ディレクトリ
protected boolean isJar(File pathname)
true
を返します。
pathname
- ファイル
true
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |