faa.tg.filters
Class AcidFilter

java.lang.Object
  extended by faa.tg.filters.AbstractFilter
      extended by faa.tg.filters.AcidFilter
All Implemented Interfaces:
Filter, FilterableListener, java.io.Serializable, java.util.EventListener

public class AcidFilter
extends AbstractFilter

 AcidFilter listens for Filterable objects, checks to see if the events
 are instances of HasAcid or HasBeaconCode and sends the events with a
 matching aircraft ID or beacon code to listeners.
 If DraStore is active and has received an AircraftState for the aircraft,
 then listeners do not need to specify both the aircraft ID to get events
 that implement only HasAcid, and the beacon code to get events that
 implement only HasBeaconCode: specifying either will get Filterables
 implementing one or both interfaces. 

Events that do not have aircraft IDs associated with them are handled according to how the AbstractFilter passThrough option is set.

See the source: AcidFilter.java

Version:
$Id: AcidFilter.java,v 3.4 2008/07/15 19:58:10 lykensj Exp $
Author:
Dana N. Whicker, FAA/ACT-510, Tue May 23 2000
See Also:
HasAcid, AbstractFilter.setPassThrough(boolean), Serialized Form

Field Summary
private  java.lang.String acSearchStr
           
private  java.lang.String acWildSearchStr
           
static java.lang.String CVS_VERSION_ID
          The CVS Version ID
(package private) static long serialVersionUID
           
 
Fields inherited from class faa.tg.filters.AbstractFilter
DEFAULT_PASS_THROUGH, listeners, passThrough
 
Constructor Summary
AcidFilter()
          Constructs a class that filters Filterable objects by aircraft.
AcidFilter(Acid singleAcid)
          Constructs a class that filters objects associated with an aircraft by ACID or beacon code; specifies an ACID.
AcidFilter(boolean passThrough)
          Constructs a class that filters objects associated with an aircraft by ACID or beacon code; sets the passThrough indicator.
AcidFilter(java.lang.String acSearchStr)
          Constructs a class that filters objects associated with an aircraft by ACID or beacon code; specifies the ACID/beacon code search string to be used.
 
Method Summary
 java.lang.String getAcSearchStr()
          Returns String of ACIDs/beacon codes of aircraft to send to listeners.
 void handleObject(Filterable evt)
          Receives Filterables and sends the ones with the correct aircraft ID to the listeners.
static void main(java.lang.String[] argv)
          Main method for testing
 void setAcSearchStr(java.lang.String acSearchStr)
          Sets String containing ACIDs and/or beacon codes to send to listeners.
 
Methods inherited from class faa.tg.filters.AbstractFilter
addFilterableListener, fire, getPassThrough, removeFilterableListener, setPassThrough, substituteFileVariables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

CVS_VERSION_ID

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

See Also:
Constant Field Values

acSearchStr

private java.lang.String acSearchStr

acWildSearchStr

private java.lang.String acWildSearchStr
Constructor Detail

AcidFilter

public AcidFilter()
Constructs a class that filters Filterable objects by aircraft.


AcidFilter

public AcidFilter(boolean passThrough)
Constructs a class that filters objects associated with an aircraft by ACID or beacon code; sets the passThrough indicator.

Parameters:
passThrough - Boolean indicating if to send objects without Acids.

AcidFilter

public AcidFilter(Acid singleAcid)
Constructs a class that filters objects associated with an aircraft by ACID or beacon code; specifies an ACID.

Parameters:
singleAcid - Single Acid to notify listeners of.

AcidFilter

public AcidFilter(java.lang.String acSearchStr)
Constructs a class that filters objects associated with an aircraft by ACID or beacon code; specifies the ACID/beacon code search string to be used.

Parameters:
acSearchStr - List of ACIDs or beacon codes to notify listeners of.
Method Detail

getAcSearchStr

public java.lang.String getAcSearchStr()
Returns String of ACIDs/beacon codes of aircraft to send to listeners.

Returns:
Returns list of ACIDs/beacon codes to send to listeners.

setAcSearchStr

public void setAcSearchStr(java.lang.String acSearchStr)
Sets String containing ACIDs and/or beacon codes to send to listeners.

Parameters:
acSearchStr - The requested list of aircraft to send to listeners.

handleObject

public void handleObject(Filterable evt)
Receives Filterables and sends the ones with the correct aircraft ID to the listeners. Events not implementing the HasAcid interface will only be sent if the passThrough option is set.

Specified by:
handleObject in interface FilterableListener
Specified by:
handleObject in class AbstractFilter
Parameters:
evt - The Filterable object.
See Also:
AbstractFilter.setPassThrough(boolean)

main

public static void main(java.lang.String[] argv)
Main method for testing