{
IMessage message = (IMessage)sender.readData();
if ( IData.class.isAssignableFrom(message.getClass()))
{
IData data = (IData)message;
IResultSolver resultSolve = this.solvers.solve(data);
if ( DataResultSolver.class.isAssignableFrom(resultSolve.getClass()))
{
DataResult result = ((DataResultSolver)resultSolve).getResult();
result.setNodeId(this.id);
writeResult(result);
}
if ( DataTaskSolver.class.isAssignableFrom(resultSolve.getClass()))
{
DataTaskSolver tasks = (DataTaskSolver)resultSolve;
DataTask task = (DataTask)data;
createPoll(tasks.countTasks(), task.getTaskId(), task.getNodeId(), task.getNumOfMessage(), tasks.getListTask());
}