HANDLED - the type of the handled object.public interface GCUBEIHandler<HANDLED>
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| Modifier and Type | Method and Description |
|---|---|
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)
|
void |
undo()
Reverts the actions of the handler.
|
void |
unsubscribe(Monitor monitor,
Topic... topics)
|
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.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 - the monitor.topics - (optional) the topics. If omitted, the monitor is subscribed to Topic.LifetimeTopic.void unsubscribe(Monitor monitor, Topic... 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()
Copyright © 2015. All Rights Reserved.