public class BDIComponentResultListener<E>
extends java.lang.Object
implements jadex.commons.future.IResultListener<E>, jadex.commons.future.IUndoneResultListener<E>
Modifier and Type | Field and Description |
---|---|
protected jadex.bridge.IInternalAccess |
agent
The interpreter.
|
protected jadex.commons.future.IResultListener<E> |
listener
The result listener.
|
protected RPlan |
rplan
The plan.
|
protected boolean |
undone
The undone flag.
|
Constructor and Description |
---|
BDIComponentResultListener(jadex.commons.future.IResultListener<E> listener,
jadex.bridge.IInternalAccess agent)
Create a new component result listener.
|
Modifier and Type | Method and Description |
---|---|
void |
commandAvailable(java.lang.Object command)
Called when a command is available.
|
protected void |
doNotify(java.lang.Exception ex,
E result) |
void |
exceptionOccurred(java.lang.Exception exception)
Called when an exception occurred.
|
void |
exceptionOccurredIfUndone(java.lang.Exception exception)
Called when an exception occurred.
|
boolean |
isUndone()
Get the undone.
|
void |
resultAvailable(E result)
Called when the result is available.
|
void |
resultAvailableIfUndone(E result)
Called when the result is available.
|
protected jadex.commons.future.IResultListener<E> listener
protected jadex.bridge.IInternalAccess agent
protected RPlan rplan
protected boolean undone
public BDIComponentResultListener(jadex.commons.future.IResultListener<E> listener, jadex.bridge.IInternalAccess agent)
listener
- The listener.adapter
- The adapter.public void resultAvailable(E result)
resultAvailable
in interface jadex.commons.future.IFunctionalResultListener<E>
result
- The result.public void exceptionOccurred(java.lang.Exception exception)
exceptionOccurred
in interface jadex.commons.future.IFunctionalExceptionListener
exception
- The exception.public void commandAvailable(java.lang.Object command)
protected void doNotify(java.lang.Exception ex, E result)
public void resultAvailableIfUndone(E result)
resultAvailableIfUndone
in interface jadex.commons.future.IUndoneResultListener<E>
result
- The result.public void exceptionOccurredIfUndone(java.lang.Exception exception)
exceptionOccurredIfUndone
in interface jadex.commons.future.IUndoneResultListener<E>
exception
- The exception.public boolean isUndone()