com.univocity.api.engine
Interface EngineLifecycleContext


public interface EngineLifecycleContext

The EngineLifecycleContext is provided by uniVocity through EngineLifecycleInterceptor, which is bound to a specific DataIntegrationEngine by the user through DataIntegrationEngine.addInterceptor(EngineLifecycleInterceptor).

It provides information specific to the current activity being executed by uniVocity. While the DataIntegrationEngine is active, it provides access to the EngineExecutionContext where functions and variables can be accessed. When executing a data mapping cycle, the MappingCycleContext will be available to provide controls over the cycle. Finally, when an entity mapping is executed, the EntityMappingContext will be available to provide controls and information over the individual mapping.

Note: attempts to obtain inactive contextual information from this object will produce an IllegalStateException

Author:
uniVocity Software Pty Ltd - dev@univocity.com
See Also:
EngineLifecycleInterceptor, EngineExecutionContext, MappingCycleContext, EntityMappingContext

Method Summary
 int getCurrentCycle()
          This method returns the number of the current cycle being executed (uniVocity counts each cycle incrementally, including the ones that failed) If no cycle is active it this method will return the number of the last executed cycle.
 EntityMappingContext getCurrentEntityMapping()
          Returns a contextual object that provides controls over an active entity mapping in the DataIntegrationEngine.
 MappingCycleContext getCurrentMappingCycleContext()
          Returns a contextual object that provides controls over an active data mapping cycle in the DataIntegrationEngine.
 String getEngineName()
          Returns the name associated with the DataIntegrationEngine
 EngineExecutionContext getExecutionContext()
          Returns a contextual object that provides access to some elements of the DataIntegrationEngine, such as functions and variables.
 

Method Detail

getEngineName

String getEngineName()
Returns the name associated with the DataIntegrationEngine

Returns:
the data integration engine name.

getExecutionContext

EngineExecutionContext getExecutionContext()
Returns a contextual object that provides access to some elements of the DataIntegrationEngine, such as functions and variables.

Returns:
an object that provides contextual information and controls over the DataIntegrationEngine.

Note: An IllegalStateException if this method is called when the engine is stopped.


getCurrentMappingCycleContext

MappingCycleContext getCurrentMappingCycleContext()
Returns a contextual object that provides controls over an active data mapping cycle in the DataIntegrationEngine.

Returns:
an object that provides controls over an active data mapping cycle in the DataIntegrationEngine.

Note: An IllegalStateException if this method is called when data mapping cycle is not in execution.


getCurrentEntityMapping

EntityMappingContext getCurrentEntityMapping()
Returns a contextual object that provides controls over an active entity mapping in the DataIntegrationEngine.

Returns:
an object that provides controls over an active entity mapping in the DataIntegrationEngine.

Note: An IllegalStateException if this method is called when an entity mapping is not in execution.


getCurrentCycle

int getCurrentCycle()
This method returns the number of the current cycle being executed (uniVocity counts each cycle incrementally, including the ones that failed) If no cycle is active it this method will return the number of the last executed cycle.

Returns:
the number of the most recent active cycle.


Copyright © 2015 uniVocity Software Pty Ltd. All rights reserved.