public void dispatch( DeploymentEvent event )
{
Iterator itr = deploymentListeners.iterator();
while (itr.hasNext())
{
DeploymentEventListener listener = (DeploymentEventListener) itr.next();
try
{
if (event.getEventType().equals(DeploymentEvent.EVENT_TYPE_DEPLOY))
{
listener.invokeDeploy(event);
}
else if (event.getEventType().equals(DeploymentEvent.EVENT_TYPE_UNDEPLOY))
{
listener.invokeUndeploy(event);
}
else if (event.getEventType().equals(DeploymentEvent.EVENT_TYPE_REDEPLOY))
{
listener.invokeRedeploy(event);
}
if (event.getStatus() < 0)
{
event.setStatus(DeploymentEvent.STATUS_OKAY);