faa.tg.filters
Class AcTypeFilter

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

public class AcTypeFilter
extends AbstractFilter

 AcTypeFilter is an AbstractFilter; it listens for Filterable objects,
 checks to see if the events are instances of HasAcType (they have an
 associated aircraft type), and sends the events with a matching aircraft
 type to the listeners that are registered for that aircraft type. Events
 that do not have aircraft types associated with them are handled according 
 to how the AbstractFilter passThrough option is set.
 
See the source: AcTypeFilter.java

Version:
$Id: AcTypeFilter.java,v 3.2 2006/11/06 12:49:41 danaw Exp $
Author:
Dana N. Whicker, FAA/ACT-510, Tue May 23 2000
See Also:
HasAcType, AbstractFilter.setPassThrough(boolean), Serialized Form

Field Summary
private  java.lang.String acTypes
           
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
AcTypeFilter()
          Constructs a class that filters objects associated with any aircraft type.
AcTypeFilter(java.lang.String acTypesStr)
          Constructs a class that filters certain objects by aircraft; sets list of aircraft types to send to listeners.
 
Method Summary
 java.lang.String getAcTypes()
          Returns aircraft types that will be sent to listeners.
 void handleObject(Filterable evt)
          Receives Filterables and sends the ones with the correct aircraft type to the listeners.
static void main(java.lang.String[] argv)
          Main method for testing
 void setAcTypes(java.lang.String acTypesStr)
          Sets the aircraft types that will be sent 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

acTypes

private java.lang.String acTypes
Constructor Detail

AcTypeFilter

public AcTypeFilter()
Constructs a class that filters objects associated with any aircraft type.


AcTypeFilter

public AcTypeFilter(java.lang.String acTypesStr)
Constructs a class that filters certain objects by aircraft; sets list of aircraft types to send to listeners.

Parameters:
acTypesStr - The list of ac types to send to listeners.
Method Detail

getAcTypes

public java.lang.String getAcTypes()
Returns aircraft types that will be sent to listeners.

Returns:
Returns aircraft types that will be sent to listeners.

setAcTypes

public void setAcTypes(java.lang.String acTypesStr)
Sets the aircraft types that will be sent to listeners.

Parameters:
acTypesStr - The aircraft types that will be sent to listeners.

handleObject

public void handleObject(Filterable evt)
Receives Filterables and sends the ones with the correct aircraft type to the listeners. Events not implementing the HasAcType 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