faa.tg.departure.server
Class DepartureObjectMgr

java.lang.Object
  extended by java.lang.Thread
      extended by faa.tg.departure.server.DepartureObjectMgr
All Implemented Interfaces:
DepartureEventListener, UpdateDepartureListener, UpdateStartTimeListener, DepartureObjectInputListener, EndOfEpochListener, ExecutiveEventListener<ExecutiveEvent>, java.lang.Runnable, java.util.EventListener

public class DepartureObjectMgr
extends java.lang.Thread
implements EndOfEpochListener, DepartureObjectInputListener, UpdateStartTimeListener, UpdateDepartureListener, ExecutiveEventListener<ExecutiveEvent>, DepartureEventListener

  This class defines DepartureObjectMgr which takes care of processing and 
  responding to objects sent from Departure client service.
  

Version:
$Id: DepartureObjectMgr.java,v 3.7 2008/06/05 19:17:40 lykensj Exp $
Author:
Sam Fullerton, ACT-510 See the source: DepartureObjectMgr.java

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
static java.lang.String CVS_VERSION_ID
          The CVS Version ID
private  ThreadSafeQueue tsq
           
private  DepartureObjectWriter writer
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
DepartureObjectMgr(java.io.ObjectOutputStream oos, DepartureObjectInputInterface doii, java.util.List<Fix> fixList)
          Constructor
 
Method Summary
 void handleDepartureEvent(AbstractDepartureEvent theEvent)
          Required in order to implement DepartureEventListener
 void handleDepartureObject(DepartureObject dptObj)
          requried by DepartureObjectInputInterface
 void handleEndOfEpochEvent(EndOfEpochEvent eoeEvt)
          Required in order to implement EndOfEpochListener interface
 void handleExecutiveEvent(ExecutiveEvent execEvt)
          Required in order to implement ExecutiveEventListener interface
 void handleFlightAdded(DepartureFlight dptFlight)
          Required in order to implement UpdateDepartureListener interface
 void handleFlightRemoved(DepartureFlight dptFlight)
          Required in order to implement UpdateDepartureListener interface
 void handleUpdateStartTimeEvent(UpdateStartTimeEvent eoeEvt)
          Required in order to implement UpdateStartTimeListener interface
private  void processObject(DepartureObject dptObj)
          process object and reacts accordingly
 void run()
          runs thread
private  void sendAircraft()
          send all the aircraft that the departure manager knows
private  void sendHeldDepartureObejcts()
          sends all the departureObjects which have gate holds
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CVS_VERSION_ID

public static final java.lang.String CVS_VERSION_ID
The CVS Version ID

See Also:
Constant Field Values

tsq

private ThreadSafeQueue tsq

writer

private DepartureObjectWriter writer
Constructor Detail

DepartureObjectMgr

public DepartureObjectMgr(java.io.ObjectOutputStream oos,
                          DepartureObjectInputInterface doii,
                          java.util.List<Fix> fixList)
Constructor

Parameters:
oos - - The ObjectOutputStream to use to send objects to the Departure client
doii - - The DepartureObjectInputInterface
Method Detail

sendAircraft

private void sendAircraft()
send all the aircraft that the departure manager knows


sendHeldDepartureObejcts

private void sendHeldDepartureObejcts()
sends all the departureObjects which have gate holds


handleDepartureObject

public void handleDepartureObject(DepartureObject dptObj)
requried by DepartureObjectInputInterface

Specified by:
handleDepartureObject in interface DepartureObjectInputListener
Parameters:
dptObj - - the DepartureObject to deal with

run

public void run()
runs thread

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

processObject

private void processObject(DepartureObject dptObj)
process object and reacts accordingly

Parameters:
dptObj - - The DepartureObject to process

handleEndOfEpochEvent

public void handleEndOfEpochEvent(EndOfEpochEvent eoeEvt)
Required in order to implement EndOfEpochListener interface

Specified by:
handleEndOfEpochEvent in interface EndOfEpochListener
Parameters:
eoeEvt - The EndOfEpochEvent to respond to
See Also:
for more info, for more info

handleUpdateStartTimeEvent

public void handleUpdateStartTimeEvent(UpdateStartTimeEvent eoeEvt)
Required in order to implement UpdateStartTimeListener interface

Specified by:
handleUpdateStartTimeEvent in interface UpdateStartTimeListener
Parameters:
eoeEvt - The UpdateStartTimeEvent to respond to

handleFlightAdded

public void handleFlightAdded(DepartureFlight dptFlight)
Required in order to implement UpdateDepartureListener interface

Specified by:
handleFlightAdded in interface UpdateDepartureListener
Parameters:
eoeEvt - The DepartureFlight to added to the client

handleFlightRemoved

public void handleFlightRemoved(DepartureFlight dptFlight)
Required in order to implement UpdateDepartureListener interface

Specified by:
handleFlightRemoved in interface UpdateDepartureListener
Parameters:
eoeEvt - The DepartureFlight to removed to the client

handleExecutiveEvent

public void handleExecutiveEvent(ExecutiveEvent execEvt)
Required in order to implement ExecutiveEventListener interface

Specified by:
handleExecutiveEvent in interface ExecutiveEventListener<ExecutiveEvent>
Parameters:
execEvt - - The executive event to respond to

handleDepartureEvent

public void handleDepartureEvent(AbstractDepartureEvent theEvent)
Required in order to implement DepartureEventListener

Specified by:
handleDepartureEvent in interface DepartureEventListener
Parameters:
theEvent - - the AbstractDepartureEvent to respond to