A - インストーラの引数の型E - インストールのタスクの列挙型P - インストールのタスクの引数の型public abstract class AbstractInstaller<A extends AbstractInstallerArgument,E extends Enum<E>,P extends Enum<P>> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected KPMDaemon |
daemon |
protected InstallProgress<P,AbstractInstaller<A,E,P>> |
progress |
protected SignalHandleManager |
signalHandler |
| Constructor and Description |
|---|
AbstractInstaller(@NotNull KPMDaemon daemon,
@NotNull SignalHandleManager signalHandler) |
| Modifier and Type | Method and Description |
|---|---|
<T extends Enum<T>> |
error(T reason)
インストールが失敗したときの後始末を行います。
|
<T extends Enum<T>,S extends Enum<S>> |
error(T reason,
S taskStatus)
インストールが失敗したときの後始末を行います。
|
protected abstract InstallResult<P> |
execute(A arguments)
インストーラを実行します。
このメソッドを直接呼び出すことは推奨されておらず、
run(AbstractInstallerArgument)を使用してください。 |
protected boolean |
isPluginIgnored(@NotNull String pluginName)
プラグインが無視リストに入っているかどうかを取得します。
|
protected void |
postSignal(@NotNull Signal signal)
シグナルを送信します。
|
InstallResult<P> |
run(A arguments)
インストーラを実行します。
このメソッドは、内部で
execute(AbstractInstallerArgument)を呼び出します。 |
protected boolean |
safeDelete(@NotNull File f)
ファイルを安全に削除します。
|
protected <AA extends TaskArgument,R extends TaskResult<?,?>,TT extends InstallTask<AA,R>> |
submitter(P taskState,
TT task)
タスクのSubmitterを取得します。
|
protected @NotNull InstallResult<P> |
success()
インストールが成功したときの後始末を行います。
|
protected @NotNull InstallResult<P> |
success(InstallResult<P> customResult)
インストールが失敗したときの後始末を引数を指定して行います。
|
protected final KPMDaemon daemon
protected final InstallProgress<P extends Enum<P>,AbstractInstaller<A extends AbstractInstallerArgument,E extends Enum<E>,P extends Enum<P>>> progress
protected final SignalHandleManager signalHandler
public AbstractInstaller(@NotNull
@NotNull KPMDaemon daemon,
@NotNull
@NotNull SignalHandleManager signalHandler)
throws IOException
IOExceptionprotected void postSignal(@NotNull
@NotNull Signal signal)
signal - シグナルprotected abstract InstallResult<P> execute(@NotNull A arguments) throws IOException, TaskFailedException
run(AbstractInstallerArgument)を使用してください。arguments - インストーラに渡す引数IOException - ファイルの読み書きに失敗した場合TaskFailedException - インストールの途中でタスクが失敗した場合run(AbstractInstallerArgument)public InstallResult<P> run(@NotNull A arguments)
execute(AbstractInstallerArgument)を呼び出します。arguments - インストーラに渡す引数execute(AbstractInstallerArgument)@NotNull protected @NotNull InstallResult<P> success()
@NotNull protected @NotNull InstallResult<P> success(InstallResult<P> customResult)
customResult - インストールの結果public <T extends Enum<T>> InstallFailedInstallResult<P,T,?> error(@NotNull T reason)
T - インストールのタスクの列挙型reason - 失敗の理由public <T extends Enum<T>,S extends Enum<S>> InstallFailedInstallResult<P,T,S> error(@Nullable T reason, @NotNull S taskStatus)
T - インストールのタスクの列挙型S - インストールのタスクの引数の型reason - 失敗の理由taskStatus - タスクの状態@NotNull protected <AA extends TaskArgument,R extends TaskResult<?,?>,TT extends InstallTask<AA,R>> @NotNull TaskChain<AA,P,R,R,TT> submitter(@NotNull P taskState, @NotNull TT task)
AA - タスクの引数の型R - タスクの戻り値の型TT - タスクの列挙型taskState - タスクの状態task - タスクprotected boolean isPluginIgnored(@NotNull
@NotNull String pluginName)
pluginName - プラグインの名前protected boolean safeDelete(@NotNull
@NotNull File f)
f - 削除するファイルCopyright © 2023. All rights reserved.