{"id":27966520,"url":"https://github.com/techery/job-executor","last_synced_at":"2025-05-07T20:19:15.696Z","repository":{"id":75020337,"uuid":"45391040","full_name":"techery/job-executor","owner":"techery","description":null,"archived":false,"fork":false,"pushed_at":"2015-11-10T18:14:35.000Z","size":212,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-08-06T02:14:59.029Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/techery.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-02T11:40:17.000Z","updated_at":"2023-08-06T02:14:59.029Z","dependencies_parsed_at":"2023-03-11T18:22:33.060Z","dependency_job_id":null,"html_url":"https://github.com/techery/job-executor","commit_stats":null,"previous_names":[],"tags_count":2,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techery%2Fjob-executor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techery%2Fjob-executor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techery%2Fjob-executor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techery%2Fjob-executor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techery","download_url":"https://codeload.github.com/techery/job-executor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252949340,"owners_count":21830177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-07T20:19:15.037Z","updated_at":"2025-05-07T20:19:15.668Z","avatar_url":"https://github.com/techery.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Job-executor \nJob-Executor is pretty simple library based on javaRX, which helps you to create code cleaner and leaner using reactive programmer paradigm. \n# What's this for?\nIt allows you to represent the sequence of actions as a single job, which executes in a job executors without having to write a lot of code unlike in common javaRx stream.\nYou can combine job executor whatever you want! Especially it's useful for multistep validation process. So just use your imagination)). And for easy debugging, the result of processing data is output on a console.\n# How to use?\n```groovy\n\n    emailValidator = new Job1Executor\u003c\u003e(new Func1\u003cString, Observable\u003cBoolean\u003e\u003e() {\n        @Override\n        public Observable\u003cBoolean\u003e call(String email) {\n            return Observable.just(!TextUtils.isEmpty(email));\n        }\n    });\n\n    passwordValidator = new Job1Executor\u003c\u003e(new Func1\u003cString, Observable\u003cBoolean\u003e\u003e() {\n        @Override\n        public Observable\u003cBoolean\u003e call(String password) {\n            boolean passwordValid = s != null \u0026\u0026 s.length() \u003e 4;\n            return Observable.just(passwordValid);\n        }\n    });\n\n    userInfoValidator = new Job2Executor\u003c\u003e(new Func2\u003cString, String, Observable\u003cBoolean\u003e\u003e() {\n        @Override\n        public Observable\u003cBoolean\u003e call(String email, String password) {\n            return Observable.combineLatest(emailValidator.createPlainJobWith(email), passwordValidator.createPlainJobWith(password),\n                    new Func2\u003cBoolean, Boolean, Boolean\u003e() {\n                        @Override\n                        public Boolean call(Boolean emailValid, Boolean passwordValid) {\n                            return emailValid \u0026\u0026 passwordValid;\n                        }\n                    });\n        }\n    });\n        \n    ....\n\n    api = new Api();\n    validators = new Validators();\n    \n    ....\n\n    void attemptLogin(String email, String password){\n       validators.userInfoValidator.createPlainJobWith(email, password)\n                .filter(new Func1\u003cBoolean, Boolean\u003e() {\n                    @Override\n                    public Boolean call(Boolean aBoolean) {\n                        return aBoolean;\n                    }\n                }).subscribe(new Action1\u003cBoolean\u003e() {\n                    @Override\n                    public void call(Boolean aBoolean) {\n                        Log.e(\"Login\", \"true\");\n                        api.login();\n                    }\n        });\n    }\n    \n```\nOr with Java8\n    \n```groovy\n\n    emailValidator = new Job1Executor\u003c\u003e(email -\u003e Observable.just(!TextUtils.isEmpty(email)));\n    \n    passwordValidator = new Job1Executor(password -\u003e {\n        boolean passwordValid = password != null \u0026\u0026 password.length() \u003e 4;\n        return Observable.just(passwordValid);\n    });\n    \n    userInfoValidator = new Job2Executor((email, password) -\u003e{\n        return Observable.combineLatest(emailValidator.createPlainJobWith(email), \n                                        passwordValidator.createPlainJobWith(password),\n                                        (emailValid, passwordValid) -\u003e emailValid \u0026\u0026 passwordValid);\n        \n    ....\n \n     api = new Api();\n     validators = new Validators();\n     \n     ....\n \n     void attemptLogin(String email, String password){\n        validators.userInfoValidator.createPlainJobWith(email, password)\n                        .filter(valid -\u003e valid)\n                        .subscribe(valid -\u003e api.login());\n     }\n     \n```   \n    \n# Installation\nUse jitpack.io\n\n```groovy\nbuildscript {\n    repositories {\n        jcenter()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:1.1.3'\n        classpath 'com.github.dcendents:android-maven-plugin:1.2'\n    }\n}\n...\napply plugin: 'com.android.application'\napply plugin: 'com.neenbedankt.android-apt'\n...\nrepositories {\n    jcenter()\n    maven { url \"https://jitpack.io\" }\n}\n\ndependencies {\n    compile 'com.github.techery:job-executor:0.1.1'\n    ...\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechery%2Fjob-executor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechery%2Fjob-executor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechery%2Fjob-executor/lists"}