|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.ejutr.ebob_observer.EBOBListener
public class EBOBListener
EBOBListener implements the ObjectBenchListener interface, such that it can attach to the object bench and receive notification whenever: 1. An object is added to the Bench. 2. An object is removed from the Bench. 3. A method within an object within the Bench is called. Then it notifies an EBOBActionLogger which actually stores what objects exists and which methods were called when. Implemented as a singleton, so that we can get to the listener from anywhere without it being static or tied to a particular parent object.
Method Summary | |
---|---|
void |
attach(boolean sendCurrentStatus)
Attaches this listener to the object bench. |
void |
detach()
Detaches this listener from the object bench. |
static EBOBListener |
getInstance()
Returns a handle to the listener. |
void |
methodCalled(edu.wpi.ebob.model.MethodInvokeInfo mii)
Triggers whenever a method is called. |
void |
objectAdded(edu.wpi.ebob.model.ObjectBenchEvent event)
Triggers when an object is added to the bench and the listener is active. |
void |
objectRemoved(edu.wpi.ebob.model.ObjectBenchEvent event)
Triggers whenever an object is removed from the bench. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static EBOBListener getInstance()
public void objectAdded(edu.wpi.ebob.model.ObjectBenchEvent event)
objectAdded
in interface edu.wpi.ebob.model.ObjectBenchListener
public void objectRemoved(edu.wpi.ebob.model.ObjectBenchEvent event)
objectRemoved
in interface edu.wpi.ebob.model.ObjectBenchListener
public void methodCalled(edu.wpi.ebob.model.MethodInvokeInfo mii)
methodCalled
in interface edu.wpi.ebob.model.ObjectBenchListener
public void attach(boolean sendCurrentStatus)
sendCurrentStatus
- set this to true if you want to be notified of all objects currently in the bench.public void detach()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |