To be notified only when a task completes, set the typedEventListeners property of processEngineConfiguration to a Map with a key TASK_COMPLETED and value of List containing your class that implements org.activiti.engine.delegate.event.ActivitiEventListener. Your class's onEvent method will get called with an instance of org.activiti.engine.delegate.event.ActivitiEvent each time a task completes.
The ActivitiEvent has a getProcessDefinitionId that you can use to differentiate between different process definitions. To differentiate between tasks, cast ActivitiEvent to org.activiti.engine.delegate.event.impl.ActivitiEntityEventImpl. You can then get the task instance using the getEntity method of ActivitiEntityEventImpl (which, of course, you will need to cast). From the task instance you can use the task name or task definition key to differentiate between tasks.