{"id":19921352,"url":"https://github.com/mpusher/mpush-client-java","last_synced_at":"2025-04-10T01:16:07.462Z","repository":{"id":57721636,"uuid":"57261649","full_name":"mpusher/mpush-client-java","owner":"mpusher","description":"mpush java client","archived":false,"fork":false,"pushed_at":"2020-10-02T13:35:46.000Z","size":218,"stargazers_count":135,"open_issues_count":5,"forks_count":171,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-10T01:16:01.389Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mpusher.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}},"created_at":"2016-04-28T01:48:58.000Z","updated_at":"2024-12-24T00:28:24.000Z","dependencies_parsed_at":"2022-09-26T21:50:21.324Z","dependency_job_id":null,"html_url":"https://github.com/mpusher/mpush-client-java","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/mpusher%2Fmpush-client-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpusher%2Fmpush-client-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpusher%2Fmpush-client-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpusher%2Fmpush-client-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpusher","download_url":"https://codeload.github.com/mpusher/mpush-client-java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137891,"owners_count":21053775,"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":"2024-11-12T22:07:20.744Z","updated_at":"2025-04-10T01:16:07.445Z","avatar_url":"https://github.com/mpusher.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 介绍\n#### mpush-client-java是一个纯java实现的一个MPUS客户端，不依赖其他任何第三方框架。\n\n## 用途\n#### 主要用于android sdk底层通信，该工程本身不包含任何android相关代码。\n\n## 当前版本\n\n```groovy\ncompile 'com.github.mpusher:mpush-client-java:0.0.2'\n```\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.mpusher\u003c/groupId\u003e\n    \u003cartifactId\u003empush-client-java\u003c/artifactId\u003e\n    \u003cversion\u003e0.0.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## 源码测试\n\n参见 [`com.mpush.client.MPushClientTest.java`](https://github.com/mpusher/mpush-client-java/blob/master/src/test/java/com/mpush/client/MPushClientTest.java)\n```java\npublic class MPushClientTest {\n    private static final String publicKey = \"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCghPCWCobG8nTD24juwSVataW7iViRxcTkey/B792VZEhuHjQvA3cAJgx2Lv8GnX8NIoShZtoCg3Cx6ecs+VEPD2fBcg2L4JK7xldGpOJ3ONEAyVsLOttXZtNXvyDZRijiErQALMTorcgi79M5uVX9/jMv2Ggb2XAeZhlLD28fHwIDAQAB\";//公钥对应服务端的私钥\n    private static final String allocServer = \"http://127.0.0.1:9999/\";//用于获取MPUSH server的ip:port, 用于负载均衡\n\n    public static void main(String[] args) throws Exception {\n        Client client = ClientConfig\n                .build()\n                .setPublicKey(publicKey)\n                .setAllotServer(allocServer)\n                .setDeviceId(\"1111111111\")\n                .setOsName(\"Android\")\n                .setOsVersion(\"6.0\")\n                .setClientVersion(\"2.0\")\n                .setUserId(\"doctor43test\")\n                .setSessionStorageDir(MPushClientTest.class.getResource(\"/\").getFile())\n                .setLogger(new DefaultLogger())\n                .setLogEnabled(true)\n                .setEnableHttpProxy(false)\n                .setClientListener(new L())\n                .create();\n        client.start();\n\n        LockSupport.park();\n    }\n```\n#### 说明:\n\nallocServer的实现参照[AllocServer.java](https://github.com/mpusher/alloc/blob/master/src/main/java/com/shinemo/mpush/alloc/AllocServer.java)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpusher%2Fmpush-client-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpusher%2Fmpush-client-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpusher%2Fmpush-client-java/lists"}