com.iternum.swlink
Interface Activator

All Known Implementing Classes:
AbstractActivator

public interface Activator

The activator is a class that is used to activate a Link. Using an Activator, the activation of the Link is factored out of the Link. There is a bidirectional relationship between Link and Activator. The activator needs to know the link because it has to activate it. The link needs to know the activator, because it needs to propagate changes of its source object to the activator, that in turn deregisters and listeners and resource it might hold on the source. Note that any Activator should have a default constructor and should support the paramtrization methods outlined in this interface in order to be used with various convenience methods available in Swlink.

Author:
Karl Banke

Method Summary
 void close()
          Closes this Activator and releases all resources.
 java.lang.Object getSource()
           
 void setActivatable(Activatable pActivatable)
          Sets the Activatable that this activator will fire.
 void setActivatorParam(java.util.Map pParam)
          Sets the activator filter params.
 void setSource(java.lang.Object pSource)
          Sets the activation source.
 

Method Detail

getSource

public java.lang.Object getSource()
Returns:
An Object representing the source of this Activator.

setSource

public void setSource(java.lang.Object pSource)
Sets the activation source. Deregisters any old source with this trigger, if one exists and registers the new source. If the passsed object is an EndpointProxy register with the endpoint proxy instead

Parameters:
pSource - The activation source

setActivatorParam

public void setActivatorParam(java.util.Map pParam)
Sets the activator filter params. The params can be used to configure the activator. For example, for a property change activator, a typical param would be the String propertyName.

Parameters:
pParam - An Object that paramterizes this Activator

setActivatable

public void setActivatable(Activatable pActivatable)
Sets the Activatable that this activator will fire.

Parameters:
pActivatable - The Activatable to activate

close

public void close()
Closes this Activator and releases all resources.