net.officefloor.frame.impl.spi.team
Class PassiveTeam

java.lang.Object
  extended by net.officefloor.frame.impl.spi.team.PassiveTeam
All Implemented Interfaces:
Team

public class PassiveTeam
extends Object
implements Team

Passive Team which uses the invoking Thread to execute the Job.

Note that using this team will block the invoking Thread until the Job is complete.

Author:
Daniel Sagenschneider

Nested Class Summary
protected  class PassiveTeam.PassiveJobContext
          Passive JobContext.
 
Constructor Summary
PassiveTeam()
           
 
Method Summary
 void assignJob(Job task, TeamIdentifier assignerTeam)
          Assigns a Job to be executed by this Team.
 void startWorking()
          Indicates for the Team to start working.
 void stopWorking()
           Indicates for the Team to stop working.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PassiveTeam

public PassiveTeam()
Method Detail

startWorking

public void startWorking()
Description copied from interface: Team
Indicates for the Team to start working.

Specified by:
startWorking in interface Team

assignJob

public void assignJob(Job task,
                      TeamIdentifier assignerTeam)
Description copied from interface: Team
Assigns a Job to be executed by this Team.

Specified by:
assignJob in interface Team
Parameters:
task - Job.
assignerTeam - TeamIdentifier of the Team assigning the Job to this Team.

stopWorking

public void stopWorking()
Description copied from interface: Team

Indicates for the Team to stop working.

This method should block and only return control when the Team has stopped working and is no longer assigned Job instances to complete.

Specified by:
stopWorking in interface Team


Copyright © 2005-2013. All Rights Reserved.