package de.hsadmin.core.qserv;

import java.io.Serializable;

import de.hsadmin.core.model.Transaction;

/**
 * A Processor encapsulates some code to be prepared by a client and to be
 * executed on a server.
 */
public interface Processor extends Serializable {

	/** 
	 * Executes the encapsulated code, optionally returning a result.
	 * @return
	 * @throws ProcessorException
	 */
	public abstract Object process() throws ProcessorException;
	
	public abstract void finalize(Transaction transaction, QueueTask task) throws ProcessorException;
	
}
