Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integrate platform Java SDK into space-gateway #4

Merged
merged 14 commits into from
Oct 19, 2023

Conversation

ren2003u
Copy link

create a single class to instantiate sdk client and call client's method in registry user method.

}
}

public UserRegistryResult registerUser(String requestId, UserRegistryInfo userRegistryInfo, String boxRegKey) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里注册用户可以直接把 obtainBoxRegKey 也一起请求,这样调用的时候 只调用 registerUser 就可以了

@@ -89,10 +99,12 @@ public PlatformInfo setPlatform(String ssplatformUrl){
**/
@Logged
@Transactional
public UserRegistryResult registryUser(String requestId, UserRegistryInfo userRegistryInfo, Boolean platformRegistry) {
public UserRegistryResult registryUser(String requestId, UserRegistryInfo userRegistryInfo, Boolean platformRegistry) throws Exception {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里抛出的一场可以 try catch 捕获下 打印错误日志 然后 throw new ServiceOperationException()

this.client = new Client(host, null);
}

public String obtainBoxRegKey(String requestId) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

boxRegKey 的 申请可以 设置一个缓存时间 三分钟或五分钟,小于平台侧设置的有效时间就可以,没必要每次申请

@ren2003u ren2003u changed the title modify registry user method. integrate platform Java SDK into space-gateway Sep 27, 2023
@wzzc-dev wzzc-dev self-assigned this Oct 18, 2023
@wzzc-dev wzzc-dev merged commit cbc5dbf into ao-space:apply-sdk-java Oct 19, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants