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

重构Service接口,参数增加ServiceContext #29

Merged
merged 7 commits into from
Mar 1, 2019
Merged

Conversation

zhihuili
Copy link
Owner

@zhihuili zhihuili commented Mar 1, 2019

调整Sevice process接口为process(Integer message, ServiceContext context)
增加ServiceContext参数,使用者可以利用context在不同Service之间传递数据。
context.put("hello", new World());
context.get("hello");

删除原HttpService接口,统一使用Service接口,原HttpService接口的web通过以下方式获得。
context.getWeb()

流程最后的service需要implements Compele,框架会清理context,否则会引起内存泄漏。

Service实现HttpComplete接口只会关闭web,实现Complete会同时关闭web和清除context。

@zhihuili
Copy link
Owner Author

zhihuili commented Mar 1, 2019

@lasting-yang @lingxiezfy please review the pr.

@zhihuili zhihuili merged commit acc0d0b into master Mar 1, 2019
@zhihuili zhihuili deleted the servicecontext branch March 1, 2019 04:49
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.

1 participant