|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsophware.home.io.HomeEventHandler
public abstract class HomeEventHandler
The HomeEventHandler handles home events
| Constructor Summary | |
|---|---|
HomeEventHandler()
|
|
| Method Summary | |
|---|---|
static HomeEventHandler |
getEventHandler(java.lang.Class<? extends HomeEvent> c)
Gets the event handler for this event |
boolean |
isActive()
Check if this handler is active |
void |
setActive(boolean active)
Sets the active state of this handler |
static void |
setAllActive(boolean active)
Sets active state for all event handlers |
static void |
setEventHandler(java.lang.Class<? extends HomeEvent> c,
HomeEventHandler handler)
Sets the event handler for this event |
abstract void |
update(HomeEvent event,
Home home)
Apply this event to a Home |
abstract void |
update(HomeEvent event,
Home home,
HomeDevice device)
Apply this event to a HomeDevice |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HomeEventHandler()
| Method Detail |
|---|
public static HomeEventHandler getEventHandler(java.lang.Class<? extends HomeEvent> c)
c - the HomeEvent class
public static void setEventHandler(java.lang.Class<? extends HomeEvent> c,
HomeEventHandler handler)
c - the HomeEvent classhandler - the HomeEventHandlerpublic static void setAllActive(boolean active)
active - the active state
public abstract void update(HomeEvent event,
Home home)
Home
event - the HomeEventhome - the Home
public abstract void update(HomeEvent event,
Home home,
HomeDevice device)
HomeDevice
event - the HomeEventhome - the Homedevice - the HomeDevicepublic boolean isActive()
Active handlers will query devices for certain event types however a network only wants one active handler processing events. Handlers are active by default.
public void setActive(boolean active)
Active handlers will query devices for certain event types however a network only wants one active handler processing events. Handlers are active by default.
active - the active status
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||