public interface Actor extends StoppableDispatch<MethodInvocation>, ThreadSafe
An Actor dispatches method calls to a target object in a thread-safe manner. Methods are called either by
calling Dispatch.dispatch(Object) on the actor, or using the proxy object
returned by getProxy(Class). Methods are delivered to the target object in the order they are called on the
actor, but are delivered to the target object by a single thread at a time. In this way, the target object does not need
to perform any synchronisation.
An actor uses one of two modes to deliver method calls to the target object:
All implementations of this interface must be thread-safe.
<T> T getProxy(Class<T> type)
type - the type for the proxy.void stop()
throws DispatchException
stop in interface Stoppablestop in interface StoppableDispatch<MethodInvocation>DispatchException - When there were any failures dispatching method calls to the target object.Copyright © 2013. All rights reserved