com.newisys.ova
Class OVAEngine

java.lang.Object
  extended by com.newisys.ova.OVAEngine

public final class OVAEngine
extends Object

Class representing the underlying OVA engine. Contains methods for configuring and acting on the OVA engine. Also contains methods for adding callback listeners on OVA engine events.


Constructor Summary
OVAEngine(OVAInterface ovaIntf)
          Sole constructor.
 
Method Summary
 void addListener(OVAEngineEventType eventType, OVAEngineCallback handler)
          Adds a callback handler for the specified event type.
 void addListener(Set<OVAEngineEventType> eventTypeSet, OVAEngineCallback handler)
          Adds a callback handler for the specified Set of event types.
 void configure(OVAConfigSwitch configSwitch, boolean enable)
          Configures the OVAEngine, enabling or disabling certain functionality.
 void doAction(OVAEngineAction action)
          Perform the specified action on the OVAEngine.
 String getApiVersion()
          Returns the OVA API version string from the underlying OVA implementation.
 OVAAssert getAssert(String name)
          Returns the OVAAssert having the specified name.
 List<OVAAssert> getAsserts()
          Returns the list of OVAAsserts registered with this OVAEngine.
 void removeListener(OVAEngineEventType eventType, OVAEngineCallback handler)
          Removes the specified handler associated with the specified event type.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OVAEngine

public OVAEngine(OVAInterface ovaIntf)
Sole constructor. Creates an OVAEngine which is registered with the underlying OVA infrastructure.

Parameters:
ovaIntf - the OVAInterface to be used by this OVAEngine
Method Detail

getApiVersion

public String getApiVersion()
Returns the OVA API version string from the underlying OVA implementation.

Returns:
the OVA API version string

configure

public void configure(OVAConfigSwitch configSwitch,
                      boolean enable)
Configures the OVAEngine, enabling or disabling certain functionality.

Parameters:
configSwitch - the configuration switch to be set
enable - true if configSwitch should be enabled, false otherwise

doAction

public void doAction(OVAEngineAction action)
Perform the specified action on the OVAEngine.

Parameters:
action - the action to be performed on the OVAEngine

getAsserts

public List<OVAAssert> getAsserts()
Returns the list of OVAAsserts registered with this OVAEngine.

Returns:
a List of the OVAAsserts registered with this OVAEngine

getAssert

public OVAAssert getAssert(String name)
Returns the OVAAssert having the specified name.

Parameters:
name - the name of the requested assert
Returns:
the OVAAssert with the specified name, or null if no such OVAAssert is registered with this OVAEngine

addListener

public void addListener(OVAEngineEventType eventType,
                        OVAEngineCallback handler)
Adds a callback handler for the specified event type. This callback will be run whenever an event of the specified type occurs.

Parameters:
eventType - the event type which will trigger handler to be run
handler - the callback handler to be run when an event of eventType occurs.

addListener

public void addListener(Set<OVAEngineEventType> eventTypeSet,
                        OVAEngineCallback handler)
Adds a callback handler for the specified Set of event types. This callback will be run whenever an event of any of the specified types occurs.

Parameters:
eventTypeSet - the set of event types which will trigger handler to be run
handler - the callback handler to be run when an event matching any of the types in eventTypeSet occurs.

removeListener

public void removeListener(OVAEngineEventType eventType,
                           OVAEngineCallback handler)
Removes the specified handler associated with the specified event type. This handler will no longer be run when events of type eventType occur. However, if the handler is registered to be run when other types of events occur, it will still be run. Also, if multiple handlers are associated with the specified event type, they will not be affected by this call.

Parameters:
eventType - the event type from which to remove this handler
handler - the handler to remove