{"id":15966655,"url":"https://github.com/gchauvet/satellite","last_synced_at":"2026-04-09T16:34:50.129Z","repository":{"id":57736450,"uuid":"82309562","full_name":"gchauvet/satellite","owner":"gchauvet","description":"Satellite Toolkit","archived":false,"fork":false,"pushed_at":"2018-03-21T11:13:40.000Z","size":1784,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T23:17:17.902Z","etag":null,"topics":["background-process","daemon","java","linux","service","windows"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gchauvet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-17T15:19:17.000Z","updated_at":"2018-03-21T11:13:42.000Z","dependencies_parsed_at":"2022-08-24T14:57:18.526Z","dependency_job_id":null,"html_url":"https://github.com/gchauvet/satellite","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gchauvet%2Fsatellite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gchauvet%2Fsatellite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gchauvet%2Fsatellite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gchauvet%2Fsatellite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gchauvet","download_url":"https://codeload.github.com/gchauvet/satellite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247184133,"owners_count":20897721,"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":["background-process","daemon","java","linux","service","windows"],"created_at":"2024-10-07T18:02:52.118Z","updated_at":"2026-04-09T16:34:45.093Z","avatar_url":"https://github.com/gchauvet.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/gchauvet/satellite/blob/master/satellite.png\"/\u003e\n\u003c/p\u003e\n\n# Satellite Toolkit\nSatellite is a set of utilities and Java support classes for running Java applications as server processes.\nCommonly known as 'daemon' processes in Unix terminology, on Windows they are called 'services'.\n\n[![Build Status](https://travis-ci.org/gchauvet/satellite.png)](https://travis-ci.org/gchauvet/satellite)\n[![Coverage Status](https://coveralls.io/repos/github/gchauvet/satellite/badge.svg?branch=master)](https://coveralls.io/github/gchauvet/satellite?branch=master)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.zatarox.satellite/satellite-api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.zatarox.satellite/satellite-api)\n\n## Requirements\nCompilation process is performed under Linux. Cross-compilation fanboy :-)\n\n* Gradle 4.4.x\n* Java Development Kit \u003e= 7\n* Clang 5.x\n* mingw-w64-x86-64-dev (gcc 5.x)\n* libc6-dev-i386\n\n## Satellite in action\nWriting an independent OS background process become pretty simple. The first step is to implement a java interface who manage background process behaviors. The second step require `Phobos` or `Deimos` depending if you are under Windows or Linux. The Daemon behavior has been designed as the same manner as Windows service. Under Windows, only certain service state transitions are valid. The following diagram shows the valid transitions (credits to Microsoft) :\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://i-msdn.sec.s-msft.com/dynimg/IC498931.png\"/\u003e\n\u003c/p\u003e\n\n### Dependency\nIn your project, add the Satellite API dependency (Maven POM):\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.zatarox.satellite\u003c/groupId\u003e\n    \u003cartifactId\u003esatellite-api\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0-SNAPSHOT\u003c/version\u003e\n    \u003cscope\u003eprovided\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\n### Core of the background process\nThis is the facade of your service. Attention : calls on these methods are synchronous.\n\n```java\nimport io.zatarox.satellite.*;\n\npublic final class FooBackgroundProcess implements BackgroundProcess {\n\n    @Override\n    public void initialize(BackgroundContext dc) throws BackgroundException, Exception {\n        System.err.println(\"Initialized\");\n    }\n\n    @Override\n    public void resume() throws Exception {\n        System.err.println(\"Started...\");\n    }\n\n    @Override\n    public void pause() throws Exception {\n        System.err.println(\"Stopped !\");\n    }\n\n    @Override\n    public void shutdown() {\n        System.err.println(\"Destroyed\");\n    }\n}\n```\n\n### Main jar assembly\n\nFinally, add a manifest entry in your main jar (and dependency jars OFC).\n```xml\n\u003cplugin\u003e\n  \u003cartifactId\u003emaven-jar-plugin\u003c/artifactId\u003e\n    \u003cversion\u003e3.0.2\u003c/version\u003e\n        \u003cconfiguration\u003e\n        \u003carchive\u003e\n            \u003cindex\u003etrue\u003c/index\u003e\n            \u003cmanifestEntries\u003e\n                \u003cBackground-Process-Class\u003eio.zatarox.satellite.FooBackgroundProcess\u003c/Background-Process-Class\u003e\n            \u003c/manifestEntries\u003e\n        \u003c/archive\u003e\n    \u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n\n### Sample\nTo a look to the sample project submodule to see how to get binary frontends from Gradle\n\n## Inspiration\nThis project is based on Apache Commons Daemon.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgchauvet%2Fsatellite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgchauvet%2Fsatellite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgchauvet%2Fsatellite/lists"}