{"id":23370345,"url":"https://github.com/infumia/agones4j","last_synced_at":"2025-04-10T16:20:59.648Z","repository":{"id":42160572,"uuid":"510602957","full_name":"Infumia/agones4j","owner":"Infumia","description":"Java wrapper for Agones client SDK.","archived":false,"fork":false,"pushed_at":"2025-04-08T13:54:10.000Z","size":500,"stargazers_count":23,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T14:41:06.436Z","etag":null,"topics":["agones","grpc","java"],"latest_commit_sha":null,"homepage":"","language":"Java","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/Infumia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-05T05:47:32.000Z","updated_at":"2025-04-08T13:54:13.000Z","dependencies_parsed_at":"2023-10-05T05:49:21.812Z","dependency_job_id":"db5eb987-82e3-409a-979b-bf0d441ed919","html_url":"https://github.com/Infumia/agones4j","commit_stats":{"total_commits":45,"total_committers":2,"mean_commits":22.5,"dds":0.4222222222222223,"last_synced_commit":"2c8ae52a58edf3bdee2614595c35d113fb2f845d"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Infumia%2Fagones4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Infumia%2Fagones4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Infumia%2Fagones4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Infumia%2Fagones4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Infumia","download_url":"https://codeload.github.com/Infumia/agones4j/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248252663,"owners_count":21072699,"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":["agones","grpc","java"],"created_at":"2024-12-21T15:36:42.476Z","updated_at":"2025-04-10T16:20:59.628Z","avatar_url":"https://github.com/Infumia.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# agones4j\n[![Maven Central Version](https://img.shields.io/maven-central/v/net.infumia/agones4j)](https://central.sonatype.com/artifact/net.infumia/agones4j/)\n## How to Use (Developers)\n### Code\n```groovy\nrepositories {\n  mavenCentral()\n}\n\ndependencies {\n    // Base module\n    implementation \"net.infumia:agones4j:VERSION\"\n    // Required, https://mvnrepository.com/artifact/io.grpc/grpc-stub/\n    implementation \"io.grpc:grpc-stub:1.64.0\"\n    implementation \"io.grpc:grpc-protobuf:1.64.0\"\n    // Required, https://github.com/grpc/grpc-java/blob/master/gradle/libs.versions.toml#L46/\n    implementation \"org.apache.tomcat:annotations-api:6.0.53\"\n}\n```\n```java\n  void agones() {\n    final ExecutorService gameServerWatcherExecutor =\n      Executors.newSingleThreadExecutor();\n    final ScheduledExecutorService healthCheckExecutor =\n      Executors.newSingleThreadScheduledExecutor();\n    final Agones agones = Agones.builder()\n      // Address specification.\n      // If not specified, localhost:9357 will be used.\n      // All the following methods are creating a ManagedChannel with 'usePlaintext'\n      // If you need to use SSL, you can use 'withChannel(ManagedChannel)' method.\n      .withAddress(\"localhost\", 9357)\n      .withAddress(\"localhost\") // 9357 \n      .withAddress(9357) // localhost\n      .withAddress() // localhost 9357\n      .withTarget(\"localhost:9357\")\n      .withTarget() // localhost:9357\n      .withChannel(ManagedChannelBuilder\n        .forAddress(\"localhost\", 9357)\n        .usePlaintext()\n        .build())\n      .withChannel() // localhost:9357\n      // Game server watcher executor specification.\n      .withGameServerWatcherExecutor(gameServerWatcherExecutor)\n      // Health checker executor specification.\n      // Check you game server's health check threshold and\n      // set the executor's delay and period accordingly.\n      .withHealthCheck(\n        /* delay */Duration.ofSeconds(1L),\n        /* period */Duration.ofSeconds(2L)\n      )\n      .withHealthCheckerExecutor(healthCheckExecutor)\n      .build();\n  // Health checking.\n  // Checks if the executor, delay and period are specified.\n  if (agones.canHealthCheck()) {\n    // Automatic health checking.\n    // Uses the health checker executor and the specified delay and period.\n    agones.startHealthChecking();\n  }\n  // Manual health checking.\n  final StreamObserver\u003cEmpty\u003e requester = agones.healthCheck();\n  // onNext needs to be called continuously to keep the game server healthy.\n  requester.onNext(Empty.getDefaultInstance());\n  // Stopping the health checking.\n  agones.stopHealthChecking();\n  // Game server watching.\n  // Checks if the executor is specified.\n  if (agones.canWatchGameServer()) {\n    agones.addGameServerWatcher(gameServer -\u003e\n      // This will be called when the game server is updated.\n      System.out.println(\"Game server updated: \" + gameServer));\n  }\n  agones.allocate();\n  agones.shutdown();\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfumia%2Fagones4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfumia%2Fagones4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfumia%2Fagones4j/lists"}