org.elkoserver.foundation.json
Interface SourceRetargeter


public interface SourceRetargeter

Interface for an object that can be a source of JSON messages on behalf of other objects. This provides a linkage between the object that actually pulls the message off of a network connection and the object that the message is represented to its receiver as being from. In other words, this interface gives the object that does the actual work of receiving a message the opportunity to substitute some object other than itself as the 'from' parameter to the message handler.

Compare and contrast with MessageRetargeter.


Method Summary
 Deliverer findEffectiveSource(DispatchTarget target)
          Designate an object that should be treated as the source of a message instead of this object.
 

Method Detail

findEffectiveSource

Deliverer findEffectiveSource(DispatchTarget target)
Designate an object that should be treated as the source of a message instead of this object.

Parameters:
target - The object to which the message is addressed.
Returns:
an object that should be presented to the message handler as the source of a message to 'target' in place of this object.