|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sofya.ed.structural.processors.AbstractProcessingStrategy sofya.ed.structural.processors.AbstractJUnitProcessingStrategy
public abstract class AbstractJUnitProcessingStrategy
Base class for strategies to receive and process probes for a JUnit event dispatcher.
Field Summary | |
---|---|
protected java.lang.Exception |
err
Stores the exception that stopped probe processing, if any. |
Fields inherited from class sofya.ed.structural.processors.AbstractProcessingStrategy |
---|
instMode, sbjout, stderr, stdout |
Constructor Summary | |
---|---|
protected |
AbstractJUnitProcessingStrategy()
|
Method Summary | |
---|---|
void |
checkError()
Checks whether any exceptions have been raised during processing, and rethrows the exception for handling if so. |
java.util.List |
configure(java.util.List parameters)
Configures this component from command line parameters. |
boolean |
isReady()
Reports whether this component is ready for the event dispatcher to begin dispatching events. |
void |
release()
Notifies this component that its current lifecycle has expired and that it should commit any stored state and release resources. |
void |
reset()
Notifies this component to clear its configuration and reset any internal state. |
void |
setInstrumentationMode(JUnitEventDispatcher.InstrumentationMode instMode)
Notifies the processor of the instrumentation mode detected in the subject. |
Methods inherited from class sofya.ed.structural.processors.AbstractProcessingStrategy |
---|
register |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface sofya.ed.structural.JUnitProcessingStrategy |
---|
endTest, getObjectType, newTest, processData, setMethodObjectCount, setup |
Methods inherited from interface sofya.ed.structural.ActiveComponent |
---|
register |
Field Detail |
---|
protected java.lang.Exception err
Constructor Detail |
---|
protected AbstractJUnitProcessingStrategy()
Method Detail |
---|
public java.util.List configure(java.util.List parameters)
ActiveComponent
Configures this component from command line parameters.
This method provides a component the opportunity to define and process command line parameters required to configure itself. Components participate in a processing chain, initiated in Sofya-provided event dispatchers by calling this method on the processing strategy. The processing strategies provided by Sofya in turn invoke this method on any listeners implementing this interface.
configure
in interface ActiveComponent
parameters
- A list of command line tokens that have not yet
been processed by any previous components.
public void reset()
ActiveComponent
Notifies this component to clear its configuration and reset any internal state.
Calls to this method are chained similary to the ActiveComponent.configure(java.util.List)
method. This method is invoked by the event dispatcher prior to
reconfiguration. Normally it should be used to clear any configuration
state to avoid using stale values.
reset
in interface ActiveComponent
public boolean isReady()
ActiveComponent
Reports whether this component is ready for the event dispatcher to begin dispatching events.
Calls to this method are chained similarly to the ActiveComponent.configure(java.util.List)
method. The event dispatcher will fail with an error if a client
invokes ProgramEventDispatcher.startDispatcher()
when any
attached component returns false
from this method.
isReady
in interface ActiveComponent
true
if this component is ready for the event
dispatcher to begin dispatching events, false
otherwise.public void release()
ActiveComponent
Notifies this component that its current lifecycle has expired and that it should commit any stored state and release resources.
Calls to this method are chained similary to the ActiveComponent.configure(java.util.List)
method. This method is invoked directly by a client of the event
dispatcher. Normally, it should be used to release any resources that
were required to persist over multiple runs of the event dispatcher.
release
in interface ActiveComponent
public void setInstrumentationMode(JUnitEventDispatcher.InstrumentationMode instMode)
JUnitProcessingStrategy
setInstrumentationMode
in interface JUnitProcessingStrategy
instMode
- A callback object to be used to retrieve the
instrumentation mode detected by the JUnit event dispatcher.public void checkError() throws java.lang.Exception
JUnitProcessingStrategy
checkError
in interface JUnitProcessingStrategy
java.lang.Exception
- For any exception that was raised and stored.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |