Class RetireContractAction

  extended by com.codemonster.surinam.controller.AbstractOperationAction
      extended by com.codemonster.surinam.controller.AbstractContractOperationAction
          extended by com.codemonster.surinam.controller.RetireContractAction
All Implemented Interfaces:

public class RetireContractAction
extends AbstractContractOperationAction

This is an Action object which retires a Contract from service. Doing so will remove it from both the Service Directory and the Blueprint Manager. This all happens while unbinding, removing and releasing any service implementation that might exist.

Note that the difference between retiring a Contract, as opposed to an EntryPoint, relates more to design, planning and deployment strategies that have no practical bearing inside of a Service Block; they are the same.

See Also:

Constructor Summary
Method Summary
 void apply(ServiceBlock serviceBlock)
          This is where we retire 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


public RetireContractAction()
Method Detail


public final void apply(ServiceBlock serviceBlock)
This is where we retire 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
serviceBlock - The ServiceBlock that the actions will be given access to.

Copyright © 2010. All Rights Reserved.