/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package TCM_MPI.SenderClasses;
import TCM_MPI.CLS.CONST;
import TCM_MPI.SenderClasses.Arrays.ProcessSenderByte;
import TCM_MPI.SenderClasses.Arrays.ProcessSenderChar;
import TCM_MPI.SenderClasses.Arrays.ProcessSenderDouble;
import TCM_MPI.SenderClasses.Arrays.ProcessSenderInteger;
import TCM_MPI.SenderClasses.Files.ProcessSenderFile;
/**
*
* @author dev
*/
public class ProcessSender implements Runnable{
private ItemsProcess _PROC;
public ProcessSender(ItemsProcess ITEM){
this._PROC = ITEM;
}
@Override
public void run() {
Runnable abst = null;
if(this._PROC._TYPE_ID == CONST.ID_TYPE_BYTE){
abst = new ProcessSenderByte(this._PROC);
}else if(this._PROC._TYPE_ID == CONST.ID_TYPE_INTEGER){
abst = new ProcessSenderInteger(this._PROC);
}else if(this._PROC._TYPE_ID == CONST.ID_TYPE_CHAR){
abst = new ProcessSenderChar(this._PROC);
}else if(this._PROC._TYPE_ID == CONST.ID_TYPE_DOUBLE){
abst = new ProcessSenderDouble(this._PROC);
}else if(this._PROC._TYPE_ID == CONST.ID_TYPE_FILE){
abst = new ProcessSenderFile(this._PROC);
}
abst.run();
}
}