A pooled actor allowing for an alternative structure of the message handling code. In general DynamicDispatchActor repeatedly scans for messages and dispatches arrived messages to one of the onMessage(message) methods defined on the actor.
final class MyActor extends DynamicDispatchActor {* void onMessage(String message) {* println 'Received string' }* void onMessage(Integer message) {* println 'Received integer' }* void onMessage(Object message) {* println 'Received object' }* void onMessage(NullObject nullMessage) {* println 'Received null' }*}
Method when {...} provides an alternative way to define message handlers
@author Vaclav Pech, Alex Tkachman, Dierk KoenigDate: Jun 26, 2009