This method is responsible for queuing up a task
to be performed. The given newListeners
will be fired according to the requested event type
. If the type
is not specified, it will default to {@link Task#DEFAULT_EVENT_TYPE} indicating that the givennewListeners
should be fired at the completion of the task.
Note: If the task
is already queued, it will NOT be performed twice. The newListeners
will be added to the already-queued task
.
@param task A unique string identifying a task to perform. This isimplementation specific to the TaskManager implementation.
@param type Optional String identifying the event name within thetask in which the given Listeners are associated. If no type is given, the listeners will be fired at the end of the task ( {@link Task#DEFAULT_EVENT_TYPE}).
@param newListeners The SystemEventListener to be associated with thistask and optional type if specified.