|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
HANDLED - the type of the handled object.public interface GCUBEIHandler<HANDLED>
Characterises the behaviour of handlers, i.e. objects that model arbitrary tasks.
A handler:
getId(),getName(),setName(String));run());setLogger(GCUBELog));subscribe(Monitor, Topic...),unsubscribe(Monitor, Topic...)) ;
GCUBEScopeManagers and/or GCUBESecurityManagers
during its execution (cf. setScopeManager(GCUBEScopeManager),setSecurityManager(GCUBESecurityManager));
setHandled(Object), getHandled()).getBlackboard(),setBlackboard(Map),clearBlackboard().
GCUBEHandler| Method Summary | |
|---|---|
void |
clearBlackboard()
Clears the blackboard. |
Map<String,Object> |
getBlackboard()
Returns the blackboard. |
HANDLED |
getHandled()
Returns the handled object. |
String |
getId()
Returns the identifier of the handler. |
GCUBELog |
getLogger()
Returns the logger. |
String |
getName()
Returns the name of the handler, by default, the name of its class. |
GCUBEScopeManager |
getScopeManager()
Returns the scope manager of the handler. |
GCUBESecurityManager |
getSecurityManager()
Returns the security manager of the handler. |
void |
run()
Executes the task implemented by the handler. |
void |
setBlackboard(Map<String,Object> blackboard)
Sets the blackboard. |
void |
setHandled(HANDLED handled)
Sets the handled object. |
void |
setLogger(GCUBELog logger)
Sets the logger. |
void |
setName(String name)
Sets the name of the handler. |
void |
setScopeManager(GCUBEScopeManager manager)
Sets a scope manager for the handler. |
void |
setSecurityManager(GCUBESecurityManager manager)
Sets a security manager for the handler. |
void |
subscribe(Monitor monitor,
Topic... topics)
Subscribes a Monitor to one or more Topics. |
void |
undo()
Reverts the actions of the handler. |
void |
unsubscribe(Monitor monitor,
Topic... topics)
Unsubscribes a Monitor from one or more Topics. |
| Method Detail |
|---|
void setLogger(GCUBELog logger)
logger - the logger.GCUBELog getLogger()
void run()
throws Exception
Exception - if the execution of the task does not complete normally.HANDLED getHandled()
void setHandled(HANDLED handled)
handled - the handled object.Map<String,Object> getBlackboard()
void setBlackboard(Map<String,Object> blackboard)
blackboard - the blackboard.void clearBlackboard()
String getId()
String getName()
void setName(String name)
name - the name.
void subscribe(Monitor monitor,
Topic... topics)
Monitor to one or more Topics.
monitor - the monitor.topics - (optional) the topics. If omitted, the monitor is subscribed to Topic.LifetimeTopic.
void unsubscribe(Monitor monitor,
Topic... topics)
Monitor from one or more Topics.
monitor - the monitor.topics - (optional) the topics. If omitted, the monitor is subscribed to Topic.LifetimeTopic.void undo()
debug-logs the invocation.
If required, override as per handler semantics. For robustness, do not
assume the invocation occurs after the execution of the handler.
void setScopeManager(GCUBEScopeManager manager)
manager - the manager.GCUBEScopeManager getScopeManager()
void setSecurityManager(GCUBESecurityManager manager)
manager - the manager.GCUBESecurityManager getSecurityManager()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||