generated from ELDependenci/Template-For-ELDependenci-Addon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ELDEpendenci/develop
- Loading branch information
Showing
21 changed files
with
159 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
eldependenci-rpc/src/main/java/org/eldependenci/rpc/annotation/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/** | ||
* 標註類 | ||
*/ | ||
package org.eldependenci.rpc.annotation; |
6 changes: 6 additions & 0 deletions
6
eldependenci-rpc/src/main/java/org/eldependenci/rpc/context/RPCError.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
package org.eldependenci.rpc.context; | ||
|
||
/** | ||
* 錯誤協定 | ||
* @param code 錯誤代碼 | ||
* @param message 錯誤訊息 | ||
* @param errors 錯誤追蹤 | ||
*/ | ||
public record RPCError(int code, String message, String[] errors) { | ||
} |
12 changes: 12 additions & 0 deletions
12
eldependenci-rpc/src/main/java/org/eldependenci/rpc/context/RPCException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
eldependenci-rpc/src/main/java/org/eldependenci/rpc/context/RPCResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
package org.eldependenci.rpc.context; | ||
|
||
/** | ||
* RPC 回傳內容協定 | ||
* @param id 追蹤 ID | ||
* @param success 回傳是否成功 | ||
* @param result 回傳結果, {@link RPCResult} 或 {@link RPCError} | ||
* @param <T> 回傳結果中的任一類型 | ||
*/ | ||
public record RPCResponse<T>(long id, boolean success, T result) { | ||
} |
6 changes: 6 additions & 0 deletions
6
eldependenci-rpc/src/main/java/org/eldependenci/rpc/context/RPCResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
package org.eldependenci.rpc.context; | ||
|
||
/** | ||
* RPC 標準回傳內容協定 | ||
* @param method 被使用方法名稱 | ||
* @param service 被使用服務名稱 | ||
* @param result 回傳結果 | ||
*/ | ||
public record RPCResult(String method, String service, Object result) { | ||
} |
8 changes: 8 additions & 0 deletions
8
eldependenci-rpc/src/main/java/org/eldependenci/rpc/context/RPCUnauthorizedException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
eldependenci-rpc/src/main/java/org/eldependenci/rpc/context/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/** | ||
* 協定型別類 | ||
*/ | ||
package org.eldependenci.rpc.context; |
3 changes: 3 additions & 0 deletions
3
eldependenci-rpc/src/main/java/org/eldependenci/rpc/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
/** | ||
* 主類 | ||
*/ | ||
package org.eldependenci.rpc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
eldependenci-rpc/src/main/java/org/eldependenci/rpc/protocol/RPCServiceable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
package org.eldependenci.rpc.protocol; | ||
|
||
/** | ||
* 用於 定義 新協定 (Protocol) 的 RPC 回應接口 | ||
*/ | ||
public interface RPCServiceable { | ||
|
||
/** | ||
* 啟動 Serve 服務 | ||
* @param handler 服務處理器 | ||
*/ | ||
void StartService(ServiceHandler handler); | ||
|
||
/** | ||
* 停止 Serve 服務 | ||
*/ | ||
void StopService(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
eldependenci-rpc/src/main/java/org/eldependenci/rpc/protocol/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/** | ||
* 通訊協定接口 | ||
*/ | ||
package org.eldependenci.rpc.protocol; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters