org.elkoserver.foundation.json
Interface MessageRetargeter

All Known Implementing Classes:
BasicObject, Context, Item, User

public interface MessageRetargeter

Interface for an object to redirect JSON messages targeted at it.

When the message dispatch mechanism attempts to deliver a message to an object, if the object implements this interface the server will instead call the findActualTarget() method and attempt to deliver the message to the object thus returned. This redirection can be applied recursively (i.e., the new target may itself implement this interface).

Compare and contrast with SourceRetargeter.


Method Summary
 DispatchTarget findActualTarget(Class type)
          Return the object that should actually receive a message in place of this object.
 

Method Detail

findActualTarget

DispatchTarget findActualTarget(Class type)
Return the object that should actually receive a message in place of this object.

Parameters:
type - The class for which the message might have been intended.
Returns:
an object that can handle messages for class 'type' on behalf of this object, or null if no such object exists.