Database Reference
In-Depth Information
* is active.
*/
public void run()
{
if (v_EvtRep == null){
throw new
RuntimeException("EventTypeRepository is not set");
}
// Get the event v_EvTypee from the repository by
using
// the event v_EvTypee name specified as a property
of
// this adapter in the EPN assembly file.
v_eventType =
v_EvtRep.getEventType(v_eventTypeName);
if (v_eventType == null){
throw new RuntimeException("EventType(" +
v_eventType + ") is not found.");
}
/**
* Actual Adapters implementation:
*
* 1. Create an object and assign to it
* an event v_EvTypee instance generated
* from event data retrieved by the
* reader
*
* 2. Send the newly created event v_EvTypee
instance
* to a downstream stage that is
* listening to this adapter.
*/
}
}
}
The presented code snippet demonstrates the injection of a dependency into the Adapter
class using the setEventTypeRepository method, implanting the event type defini-
tion that is specified in the adapter's configuration.
Search WWH ::




Custom Search