public class Observing extends Object
Modifier and Type | Method and Description |
---|---|
protected static String |
add(Region reg,
ObserverCallBack obs,
ObserveEvent.Type type,
Object target) |
protected static void |
addEvent(ObserveEvent evt) |
protected static void |
addRunningObserver(Region r) |
static void |
cleanUp()
stop and remove all observers and their registered events
|
static void |
clearEvents()
the event list is purged
|
static ObserveEvent |
getEvent(String name)
retrieves and removes the requested event
|
static ObserveEvent[] |
getEvents()
return all events (they are preserved)
|
static ObserveEvent[] |
getEvents(Region reg)
return the events for that region
events are removed from the list |
protected static boolean |
getStopOnFirstEvent() |
static boolean |
hasEvent(String name)
are their any happened events for the observer having this name?
|
static boolean |
hasEvents()
are their any happened events
|
static boolean |
hasEvents(Region reg)
are their any happened events for this region?
|
static void |
remove(Region reg)
stop and remove all observers registered for this region from the list
events for those observers are removed as well |
static void |
remove(String name)
remove the observer from the list, a region observer will be stopped
events for that observer are removed as well |
protected static void |
removeRunningObserver(Region r) |
void |
setActive(String name)
set the observer with the given name active (checked while observing)
|
protected static void |
setActive(String name,
boolean state) |
void |
setInactive(String name)
set the observer with the given name inactive (not checked while observing)
|
static void |
setStopOnFirstEvent()
tell the next starting observer, to stop on the first event
|
public static void setStopOnFirstEvent()
protected static boolean getStopOnFirstEvent()
protected static void addRunningObserver(Region r)
protected static void removeRunningObserver(Region r)
protected static String add(Region reg, ObserverCallBack obs, ObserveEvent.Type type, Object target)
public void setInactive(String name)
name
- public void setActive(String name)
name
- protected static void setActive(String name, boolean state)
public static void remove(String name)
name
- name of observerpublic static void remove(Region reg)
reg
- public static void cleanUp()
public static boolean hasEvents()
public static boolean hasEvents(Region reg)
reg
- public static boolean hasEvent(String name)
name
- protected static void addEvent(ObserveEvent evt)
public static ObserveEvent[] getEvents(Region reg)
reg
- public static ObserveEvent[] getEvents()
public static ObserveEvent getEvent(String name)
name
- of eventpublic static void clearEvents()