feat:多机证书导入功能
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package com.sunyard.task;
|
||||
|
||||
public class TaskOutcome<T> {
|
||||
private final TaskContext<T> context;
|
||||
private final T result;
|
||||
private final Throwable error;
|
||||
|
||||
public TaskOutcome(TaskContext<T> context, T result) {
|
||||
this.context = context;
|
||||
this.result = result;
|
||||
this.error = null;
|
||||
}
|
||||
|
||||
public TaskOutcome(TaskContext<T> context, Throwable error) {
|
||||
this.context = context;
|
||||
this.result = null;
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return error == null;
|
||||
}
|
||||
|
||||
public TaskContext<T> getContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
public T getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public Throwable getError() {
|
||||
return error;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user