/*
  This method waits for the specified container is shutdown. This container may be for aggreators, storages, senders or sender channel adapters.
*/
func waitForContainerShutdown(container lib_gc_container.IGenericContainer) error {
	for {
		if err := container.Shutdown(); err != nil {
			return err
		} else {
			break
		}
	}
	return nil
}
/*
  This method waits for the specified container starts. This container may be for aggreators, storages, senders or sender channel adapters.
*/
func waitForContainerStarts(container lib_gc_container.IGenericContainer) error {
	for {
		if err := container.Start(); err != nil {
			if !strings.Contains(err.Error(), "005-003") {
				return err
			}
		} else {
			break
		}
	}
	return nil
}