|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.ip2.ItemHandler ix.ip2.ForwardingHandler
public class ForwardingHandler
Generates HandlerActions to forward Issues or Activities to other agents.
Nested Class Summary | |
---|---|
(package private) class |
ForwardingHandler.ForwardingAction
Forwards an issue or activity to another agent. |
Field Summary | |
---|---|
protected java.lang.String |
action
|
protected IXAgent |
agent
|
protected boolean |
capabilityDefault
|
protected ContactManager |
contactManager
|
protected AgentRelationship |
rel
|
protected boolean |
reportBack
|
Fields inherited from class ix.ip2.ItemHandler |
---|
actionDescription |
Constructor Summary | |
---|---|
ForwardingHandler(IXAgent agent,
java.lang.String action,
AgentRelationship rel,
boolean reportBack)
|
Method Summary | |
---|---|
void |
addHandlerActions(AgendaItem item)
Called to add any HandlerAction s that this
handler regards as appropriate for the specified AgendaItem. |
void |
contactChange(ContactEvent e)
|
java.util.List |
getToAgents(AgendaItem item)
|
protected java.util.List |
getToNames(AgendaItem item)
|
void |
handle(AgendaItem item)
Called to perform the action implemented by this handler, if the selected HandlerAction so desires. |
ForwardingHandler.ForwardingAction |
makeForwardingAction(java.lang.String toName,
AgendaItem about)
|
void |
reviseHandlerActions(AgendaItem item,
java.lang.Object reason)
Called after something has happened that may require new HandlerActions to be added to an item. |
java.lang.String |
toString()
Returns a textual representation of this handler. |
Methods inherited from class ix.ip2.ItemHandler |
---|
appliesTo, getActionDescription, getSyntaxList, isAutomatic, makeHandler |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected IXAgent agent
protected java.lang.String action
protected AgentRelationship rel
protected boolean reportBack
protected boolean capabilityDefault
protected ContactManager contactManager
Constructor Detail |
---|
public ForwardingHandler(IXAgent agent, java.lang.String action, AgentRelationship rel, boolean reportBack)
Method Detail |
---|
public void addHandlerActions(AgendaItem item)
ItemHandler
HandlerAction
s that this
handler regards as appropriate for the specified AgendaItem.
This method is called only if both this handler's
ItemHandler.appliesTo(AgendaItem)
and the specified item's
AgendaItem.wantsActionsFrom(ItemHandler)
methods
return true.
The method provided by the ItemHandler class just adds
an action that calls this handler's ItemHandler.handle(AgendaItem)
method. This allows suitably simple handlers to avoid
working directly with HandlerActions.
Note that actions are added by calling an item's
AgendaItem.addAction(HandlerAction)
method.
addHandlerActions
in class ItemHandler
public ForwardingHandler.ForwardingAction makeForwardingAction(java.lang.String toName, AgendaItem about)
protected java.util.List getToNames(AgendaItem item)
public java.util.List getToAgents(AgendaItem item)
public void handle(AgendaItem item)
ItemHandler
handle
in class ItemHandler
ItemHandler.addHandlerActions(AgendaItem)
public void contactChange(ContactEvent e)
contactChange
in interface ContactListener
public void reviseHandlerActions(AgendaItem item, java.lang.Object reason)
ItemHandler
The reviseHandlerActions method is very similar to
the ItemHandler.addHandlerActions(AgendaItem)
method in
terms of its function and the applicability conditions
on when it is called. The main difference is that it
is called to look at AgendaItems that are not having
actions added for the first time and that may already
have an appropriate action, so that no new one needs
to be added.
Note that the usual way for an ItemHandler to get
HandlerActions removed is for it to call the controller's
checkActionValidity method. That results in calls to
HandlerAction.isStillValid()
methods.
reviseHandlerActions
in class ItemHandler
PanelController.reconsiderHandler(ItemHandler handler,
Object reason)
,
PanelController.checkActionValidity(ItemHandler handler,
Object reason)
public java.lang.String toString()
ItemHandler
toString
in class ItemHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |