首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > 短跑框架是依赖获取,上下文变量,并支持组件开发。

短跑框架是依赖获取,上下文变量,并支持组件开发。

资 源 简 介

The Dash Framework enables Java components to be developed with clear and documentable external dependencies on configuration, component wiring, and runtime context. Dash Obtain DashObtain: Provides lazy, thread-safe acquisition of fields with the @Obtain annotation. Like dependency injection, but more declarative. Example @Obtain use (without error handling...): ``` public class Forwarder implements MessageListener { @Obtain MessageProducer forwardTo; public void onMessage(Message message) { forwardTo.send(message); } } ``` Dash Context DashContext: Provides "safe" global variables: a public static @Context field can be exposed in a thread-safe, thread-local, and execution scoped manner. An example is authenticated User. Contextual and execution scoped access to the current principal user is easy to show: ``` public class Authentication { @Context static Principal pri
VIP VIP
0.186748s