def cleanUp(self): ''' Overriden from baseclass. ''' BaseSimulator.cleanUp(self) self.event_dispatcher.destroy() #possible for developers to configure cleanUp method #for the simulated component. _execute(self._get_name(), "cleanUp", [self], getCompLocalNS(self._get_name())) ComponentLifecycle.cleanUp(self) removeComponent(self._get_name())
def cleanUp(self): ''' Overriden from baseclass. ''' BaseSimulator.cleanUp(self) self.event_dispatcher.destroy() #possible for developers to configure cleanUp method #for the simulated component. _execute(self._get_name(), "cleanUp", [self], getCompLocalNS(self._get_name())) ComponentLifecycle.cleanUp(self) removeComponent(self._get_name())
def __init__(self): ACSComponent.__init__(self) ComponentLifecycle.__init__(self) ContainerServices.__init__(self)
# # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA # # @(#) $Id: acspyTestComponentLifecycle.py,v 1.2 2004/04/21 22:36:36 dfugate Exp $ ############################################################################### ''' Tests the component lifecycle. ''' from Acspy.Servants.ComponentLifecycle import ComponentLifecycle ############################################################################### if __name__ == "__main__": print "Creating ComponentLifecycle" h = ComponentLifecycle() print "Invoking initialize" h.initialize() print "Invoking execute" h.execute() print "Invoking cleanUp" h.cleanUp() print "Invoking aboutToAbort" h.aboutToAbort() print "Goodbye"
# # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA # # @(#) $Id: acspyTestComponentLifecycle.py,v 1.2 2004/04/21 22:36:36 dfugate Exp $ ############################################################################### ''' Tests the component lifecycle. ''' from Acspy.Servants.ComponentLifecycle import ComponentLifecycle ############################################################################### if __name__=="__main__": print "Creating ComponentLifecycle" h = ComponentLifecycle() print "Invoking initialize" h.initialize() print "Invoking execute" h.execute() print "Invoking cleanUp" h.cleanUp() print "Invoking aboutToAbort" h.aboutToAbort() print "Goodbye"
def __init__(self): ACSComponent.__init__(self) ComponentLifecycle.__init__(self) ContainerServices.__init__(self)