org.apache.hivemind.service
Interface Autowiring

All Known Implementing Classes:
AutowiringImpl

public interface Autowiring

Service that wires properties of object with services defined in the registry. Different strategies are available. The standard strategies are defined in AutowiringStrategy.

Author:
Achim Huegen

Method Summary
 java.lang.Object autowireProperties(java.lang.Object target)
          Autowires all writable properties of target.
 java.lang.Object autowireProperties(java.lang.Object target, java.lang.String[] propertyNames)
          Autowires the properties of target defined in propertyNames.
 java.lang.Object autowireProperties(java.lang.String strategy, java.lang.Object target)
          Autowires all writable properties of target using a certain strategy.
 java.lang.Object autowireProperties(java.lang.String strategy, java.lang.Object target, java.lang.String[] propertyNames)
          Autowires the properties of target defined in propertyNames using a certain strategy.
 

Method Detail

autowireProperties

java.lang.Object autowireProperties(java.lang.Object target,
                                    java.lang.String[] propertyNames)
Autowires the properties of target defined in propertyNames. All available strategies are tried until one strategy succeeds.

Parameters:
target - the target object whose properties should be wired
propertyNames - the properties to wire
Returns:
the wired target object

autowireProperties

java.lang.Object autowireProperties(java.lang.Object target)
Autowires all writable properties of target. All available strategies are tried until one strategy succeeds.

Parameters:
target - the target object whose properties should be wired
Returns:
the wired target object

autowireProperties

java.lang.Object autowireProperties(java.lang.String strategy,
                                    java.lang.Object target,
                                    java.lang.String[] propertyNames)
Autowires the properties of target defined in propertyNames using a certain strategy.

Parameters:
strategy - name of the strategy to be used. Standard strategies are defined in AutowiringStrategy
target - the target object whose properties should be wired
propertyNames - the properties to wire
Returns:
the wired target object

autowireProperties

java.lang.Object autowireProperties(java.lang.String strategy,
                                    java.lang.Object target)
Autowires all writable properties of target using a certain strategy.

Parameters:
strategy - name of the strategy to be used. Standard strategies are defined in AutowiringStrategy
target - the target object whose properties should be wired
Returns:
the wired target object


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.