- java.lang.Object
-
- jdk.jshell.execution.DirectExecutionControl
-
- jdk.jshell.execution.RemoteExecutionControl
-
- すべての実装されたインタフェース:
AutoCloseable
,ExecutionControl
public class RemoteExecutionControl extends DirectExecutionControl implements ExecutionControl
リモート・エージェントは実行プロセス(メインのJShellプロセスとは別に)で実行されます。 このエージェントはメインのJShellプロセスからソケット上にコードをロードし、コードを実行し、その他のmisc、外部プロセスによって制御されるストップ・サポートを追加するDirectExecutionControl
の特殊化。JdiDefaultExecutionControl
で動作するように設計されています。- 導入されたバージョン:
- 9
-
-
ネストされたクラスのサマリー
-
インタフェース jdk.jshell.spi.ExecutionControlから継承したネストされたクラス/インタフェース
ExecutionControl.ClassBytecodes, ExecutionControl.ClassInstallException, ExecutionControl.EngineTerminationException, ExecutionControl.ExecutionControlException, ExecutionControl.InternalException, ExecutionControl.NotImplementedException, ExecutionControl.ResolutionException, ExecutionControl.RunException, ExecutionControl.StoppedException, ExecutionControl.UserException
-
-
コンストラクタのサマリー
コンストラクタ コンストラクタ 説明 RemoteExecutionControl()
デフォルトのクラス・ローディングを使用してインスタンスを作成します。RemoteExecutionControl(LoaderDelegate loaderDelegate)
指定されたデリゲートにローダー操作を委譲するインスタンスを作成します。
-
メソッドのサマリー
すべてのメソッド 静的メソッド インスタンス・メソッド 具象メソッド 修飾子と型 メソッド 説明 protected void
clientCodeEnter()
ユーザー・コードへのエントリをマークします。protected void
clientCodeLeave()
ユーザー・コードから出発します。protected String
invoke(Method doitMethod)
パラメータを指定しない静的メソッド"doit-method"を呼び出します。static void
main(String[] args)
エージェントを起動し、コマンドライン引数で指定されたソケットを介してJShellコアに接続します。void
redefine(ExecutionControl.ClassBytecodes[] cbcs)
リモート・エンドでの処理の再定義は、再定義されたクラスの登録のみですvoid
stop()
実行中の呼び出しを中断します。protected String
throwConvertedInvocationException(Throwable cause)
ユーザー・コードの受信例外をExecutionControl.ExecutionControlException
のサブ型のインスタンスに変換し、変換された例外をスローします。protected String
throwConvertedOtherException(Throwable ex)
エージェント・コード内の受信例外をExecutionControl.ExecutionControlException
のサブ型のインスタンスに変換し、変換された例外をスローします。String
varValue(String className, String varName)
変数の値を返します。-
class jdk.jshell.execution.DirectExecutionControlから継承したメソッド
addToClasspath, classesRedefined, close, extensionCommand, findClass, invoke, load, valueString
-
interface jdk.jshell.spi.ExecutionControlから継承したメソッド
addToClasspath, close, extensionCommand, generate, generate, invoke, load
-
-
-
-
コンストラクタの詳細
-
RemoteExecutionControl
public RemoteExecutionControl(LoaderDelegate loaderDelegate)
指定されたデリゲートにローダー操作を委譲するインスタンスを作成します。- パラメータ:
loaderDelegate
- デリゲートがロード・クラスを処理
-
RemoteExecutionControl
public RemoteExecutionControl()
デフォルトのクラス・ローディングを使用してインスタンスを作成します。
-
-
メソッドの詳細
-
main
public static void main(String[] args) throws Exception
エージェントを起動し、コマンドライン引数で指定されたソケットを介してJShellコアに接続します。- パラメータ:
args
- 標準のコマンドライン引数、期待値はソケット番号だけの引数です- 例外:
Exception
- 予想外の例外
-
redefine
public void redefine(ExecutionControl.ClassBytecodes[] cbcs) throws ExecutionControl.ClassInstallException, ExecutionControl.NotImplementedException, ExecutionControl.EngineTerminationException
リモート・エンドでの処理の再定義は、再定義されたクラスの登録のみです- 定義:
- インタフェース
ExecutionControl
内のredefine
- オーバーライド:
- クラス
DirectExecutionControl
のredefine
- パラメータ:
cbcs
- 再定義するクラス名とバイトコード- 例外:
ExecutionControl.ClassInstallException
- クラスを再定義する際に例外が発生しました。一部またはすべてが再定義されませんでしたExecutionControl.NotImplementedException
- 実装されていない場合ExecutionControl.EngineTerminationException
- 実行エンジンが終了しました
-
stop
public void stop() throws ExecutionControl.EngineTerminationException, ExecutionControl.InternalException
クラスからコピーされた説明:DirectExecutionControl
実行中の呼び出しを中断します。サポートされていません。
- 定義:
- インタフェース
ExecutionControl
内のstop
- オーバーライド:
- クラス
DirectExecutionControl
のstop
- 例外:
ExecutionControl.EngineTerminationException
- 実行エンジンが終了しましたExecutionControl.InternalException
- 内部問題が発生しました
-
invoke
protected String invoke(Method doitMethod) throws Exception
クラスからコピーされた説明:DirectExecutionControl
パラメータを指定しない静的メソッド"doit-method"を呼び出します。 このクラスのDirectExecutionControl.invoke(java.lang.String, java.lang.String)
はこれを呼び出して呼び出します。- オーバーライド:
- クラス
DirectExecutionControl
のinvoke
- パラメータ:
doitMethod
- 呼び出すメソッド- 戻り値:
- 値またはnull
- 例外:
Exception
-Method.invoke(Object, Object...)
または任意のExecutionControl.ExecutionControlException
によってパススルーにスローされた例外。
-
varValue
public String varValue(String className, String varName) throws ExecutionControl.RunException, ExecutionControl.EngineTerminationException, ExecutionControl.InternalException
インタフェースからコピーされた説明:ExecutionControl
変数の値を返します。- 定義:
- インタフェース
ExecutionControl
内のvarValue
- オーバーライド:
- クラス
DirectExecutionControl
のvarValue
- パラメータ:
className
- 変数のラッパー・クラスの名前varName
- 変数の名前- 戻り値:
- 変数の値
- 例外:
ExecutionControl.UserException
- 値の書式設定によってユーザー例外が発生しましたExecutionControl.ResolutionException
- 値をフォーマットすると、未解決のスニペットを直接的または間接的に呼び出そうとしましたExecutionControl.StoppedException
- 値の書式設定がExecutionControl.stop()
によって取消された場合ExecutionControl.EngineTerminationException
- 実行エンジンが終了しましたExecutionControl.InternalException
- 内部問題が発生しましたExecutionControl.RunException
-
throwConvertedInvocationException
protected String throwConvertedInvocationException(Throwable cause) throws ExecutionControl.RunException, ExecutionControl.InternalException
クラスからコピーされた説明:DirectExecutionControl
ユーザー・コードの受信例外をExecutionControl.ExecutionControlException
のサブ型のインスタンスに変換し、変換された例外をスローします。- オーバーライド:
- クラス
DirectExecutionControl
のthrowConvertedInvocationException
- パラメータ:
cause
- 変換する例外- 戻り値:
- いつも通りに戻ることはありません
- 例外:
ExecutionControl.RunException
- 通常の例外発生の場合ExecutionControl.InternalException
- 内部問題
-
throwConvertedOtherException
protected String throwConvertedOtherException(Throwable ex) throws ExecutionControl.RunException, ExecutionControl.InternalException
クラスからコピーされた説明:DirectExecutionControl
エージェント・コード内の受信例外をExecutionControl.ExecutionControlException
のサブ型のインスタンスに変換し、変換された例外をスローします。- オーバーライド:
- クラス
DirectExecutionControl
のthrowConvertedOtherException
- パラメータ:
ex
- 変換する例外- 戻り値:
- いつも通りに戻ることはありません
- 例外:
ExecutionControl.RunException
- 通常の例外発生の場合ExecutionControl.InternalException
- 内部問題
-
clientCodeEnter
protected void clientCodeEnter()
クラスからコピーされた説明:DirectExecutionControl
ユーザー・コードへのエントリをマークします。- オーバーライド:
- クラス
DirectExecutionControl
のclientCodeEnter
-
clientCodeLeave
protected void clientCodeLeave() throws ExecutionControl.InternalException
クラスからコピーされた説明:DirectExecutionControl
ユーザー・コードから出発します。- オーバーライド:
- クラス
DirectExecutionControl
のclientCodeLeave
- 例外:
ExecutionControl.InternalException
- 予期しない失敗事例で
-
-