class SimpleTopology extends AbstractTopology {

    public void run() {
    	if (this.getEntranceProcessingItems() == null)
    		throw new IllegalStateException("You need to set entrance PI before running the topology.");
    	if (this.getEntranceProcessingItems().size() != 1)
    		throw new IllegalStateException("SimpleTopology supports 1 entrance PI only. Number of entrance PIs is "+this.getEntranceProcessingItems().size());
    	
    	SimpleEntranceProcessingItem entrancePi = (SimpleEntranceProcessingItem) this.getEntranceProcessingItems().toArray()[0];
    	entrancePi.getProcessor().onCreate(0); // id=0 as it is not used in simple mode
        entrancePi.startSendingEvents();
    }

      SimpleTopology(String name);

}