com.codemonster.surinam.controller
Class UnbindContractAction

java.lang.Object
  extended by com.codemonster.surinam.controller.AbstractOperationAction
      extended by com.codemonster.surinam.controller.AbstractContractOperationAction
          extended by com.codemonster.surinam.controller.UnbindContractAction
All Implemented Interfaces:
Action

public class UnbindContractAction
extends AbstractContractOperationAction

This is an Implementation Action object which registers an implementation and binds it to one or more Contracts.

See Also:
Contract

Constructor Summary
UnbindContractAction()
           
 
Method Summary
 void apply(ServiceBlock serviceBlock)
          This is where we unbind the implementation from the Service Contract.
 
Methods inherited from class com.codemonster.surinam.controller.AbstractContractOperationAction
getContractName, setContractName
 
Methods inherited from class com.codemonster.surinam.controller.AbstractOperationAction
getName, getRequiredServices, injectServices
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnbindContractAction

public UnbindContractAction()
Method Detail

apply

public void apply(ServiceBlock serviceBlock)
This is where we unbind the implementation from the Service Contract.

This is where the subclass will implement its action code.

This is the only callback that subclasses will need to provide implementations for; you take the ServiceBlock and do what you will.

This is the primary execution point for all ServiceBlock actions. Not all operations will throw all of these exceptions but we wanted a unified interface for these actions to allow the code to handle a broad ranged of actions and still be able to respond in a fine-grained manner.

Note that if you aren't interested in fine-grained exceptions, all Surinam exceptions extend SurinamException, so you could just trap that along with the Java exceptions separately. Or catching Exception should do the trick.

Specified by:
apply in interface Action
Specified by:
apply in class AbstractContractOperationAction
Parameters:
serviceBlock - The ServiceBlock that the actions will be given access to.


Copyright © 2010. All Rights Reserved.