This class is a thread which can generate a series of random geographic
events. The events are generated as single-time events, with no data
attached. Different distributions and types of events are generated
depending upon the constructor used.
Create a RandomGeoFeed from a Geographic Filter. The geographic events
will be distributed radially around the center point of the shape or
shapes in the geographic filter, and cover the filter. This constructor
may be used to simulate hits around a particular region, or to test a
particular geographic filter.
filter - the filter to use to create the random feed
public void run()
Run method for the RandomGeoFeed. This method continuously generates
random geographic events, sleeping for a random period of time between
each event. The loop continues as long as the sleep time is greater than
zero. Other classes should not call this method directly, but instead
run in interface java.lang.Runnable
run in class java.lang.Thread
public void setMaxSleep(int sleepSeconds)
Set the maximum time to sleep between generating random events. If the
sleepSeconds are negative, the thread will terminate. The default sleep
time is 3 seconds.
sleepSeconds - the maximum sleep time, in seconds.
public static void main(java.lang.String args)
Run a random GeoEvent generator. The example program generates GeoEvents
centered on Washington DC, with a radius which covers Maryland and parts
of neighboring states. A sample GeoEventListener prints out the
coordinates of the events generated by the generator thread.