Command对象可能是有状态的,也可能是无状态的。
所以只要你坚持并发编程的最简单规则——无状态服务和不变对象,将你的服务绑定到任何生产者或消费者上都会轻而易举。
So as long as you stick to the simplest rules of concurrent programming - stateless services and immutable objects, it will be a breeze to wire your services to any producer or consumer.
对于无状态服务对象很理想。
应用推荐