New model ResourceState

- added new class ResourceState
- added method getResourcesState
It's better to use dependencies injection for such tasks. e.g.:

    @Autowired
    private TaskManager taskManager;