|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.codemonster.surinam.controller.BindImplementationAction
public class BindImplementationAction
This is an Implementation Action object which registers an implementation and binds it to one or more Contracts.
Contract
Constructor Summary | |
---|---|
BindImplementationAction()
|
Method Summary | |
---|---|
void |
apply(ServiceBlock serviceBlock)
This is the primary execution point for all ServiceBlock actions. |
String |
getName()
We want to be able to discern which operation is being performed by subclasses of this object. |
Iterator<ServiceToFieldInjectionPair> |
getRequiredServices()
Get a list of fully qualified Contracts that this action requires. |
void |
injectServices(ServiceBlock serviceBlock)
This callback method is used to inject the ServiceBlock that the action will have access to in order to perform its work. |
void |
setBinding(String binding)
|
void |
setImplementationBlueprint(ImplementationBlueprint implementationBlueprint)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BindImplementationAction()
Method Detail |
---|
public String getName()
getName
in interface Action
public Iterator<ServiceToFieldInjectionPair> getRequiredServices()
getRequiredServices
in interface Action
public void apply(ServiceBlock serviceBlock) throws MalformedURLException, ClassNotFoundException, IllegalAccessException, MissingAnnotationException, UnknownServiceException, MissingInterfaceException, DependencyInjectionException, InstantiationException, BindingDeclarationError
apply
in interface Action
serviceBlock
- The ServiceBlock that the actions will be given access to.
MalformedURLException
- Thrown if one of the classpath segments are malformed.
ClassNotFoundException
- Thrown if the FQ class cannot be found on the classpath.
IllegalAccessException
- If you do not have access or permission to execute this method.
MissingAnnotationException
- The class is missing a required annotation.
UnknownServiceException
- The Service Contract is unknown to the system.
MissingInterfaceException
- A required interface has not been extended.
DependencyInjectionException
- Attempts to inject resources as requested has failed.
InstantiationException
- The Service Block is not able to instantiate an instance of this class.
BindingDeclarationError
- Thrown if there is a binding failure.public void injectServices(ServiceBlock serviceBlock) throws ClassNotFoundException, DependencyInjectionException, IllegalAccessException
injectServices
in interface Action
serviceBlock
- The ServiceBlock that the actions will be given access to.
ClassNotFoundException
- Thrown if the class cannot be found; usually a classpath or packaging issue.
DependencyInjectionException
- Thrown if injection fails.
IllegalAccessException
- Thrown if there is a loader or hierarchy failure.public void setImplementationBlueprint(ImplementationBlueprint implementationBlueprint)
public void setBinding(String binding)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |