50 lines
1.2 KiB
Java
50 lines
1.2 KiB
Java
package org.gcube.accounting.aggregator.plugin;
|
|
|
|
import java.util.Map;
|
|
|
|
import org.gcube.vremanagement.executor.plugin.Plugin;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
/**
|
|
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
|
*/
|
|
public class AccountingAggregatorPlugin extends Plugin<AccountingAggregatorPluginDeclaration> {
|
|
|
|
/**
|
|
* Logger
|
|
*/
|
|
private static Logger logger = LoggerFactory.getLogger(AccountingAggregatorPlugin.class);
|
|
|
|
/**
|
|
* @param runningPluginEvolution
|
|
*/
|
|
public AccountingAggregatorPlugin(AccountingAggregatorPluginDeclaration pluginDeclaration) {
|
|
super(pluginDeclaration);
|
|
}
|
|
|
|
/**{@inheritDoc}*/
|
|
@Override
|
|
public void launch(Map<String, Object> inputs) throws Exception {
|
|
logger.debug("Launching {}", this.getClass().getSimpleName());
|
|
|
|
if(inputs == null || inputs.isEmpty()){
|
|
logger.debug("{} inputs {}", this.getClass().getSimpleName(), inputs);
|
|
throw new Exception();
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
logger.debug("{} has finished", this.getClass().getSimpleName());
|
|
}
|
|
|
|
/**{@inheritDoc}*/
|
|
@Override
|
|
protected void onStop() throws Exception {
|
|
logger.debug("{} onStop() function", this.getClass().getSimpleName());
|
|
}
|
|
|
|
}
|