{"id":15069799,"url":"https://github.com/ep2p/row-client","last_synced_at":"2026-01-03T05:02:15.915Z","repository":{"id":57731982,"uuid":"281100429","full_name":"ep2p/row-client","owner":"ep2p","description":"Java client for ROW","archived":false,"fork":false,"pushed_at":"2021-07-01T05:22:59.000Z","size":160,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T19:48:30.422Z","etag":null,"topics":["java","java-client","websocket"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ep2p.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":"2020-07-20T11:40:58.000Z","updated_at":"2021-07-01T05:23:02.000Z","dependencies_parsed_at":"2022-09-26T22:10:39.534Z","dependency_job_id":null,"html_url":"https://github.com/ep2p/row-client","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ep2p%2Frow-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ep2p%2Frow-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ep2p%2Frow-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ep2p%2Frow-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ep2p","download_url":"https://codeload.github.com/ep2p/row-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243837998,"owners_count":20355968,"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":["java","java-client","websocket"],"created_at":"2024-09-25T01:44:46.518Z","updated_at":"2026-01-03T05:02:15.818Z","avatar_url":"https://github.com/ep2p.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# java-row-client\n[![](https://jitpack.io/v/idioglossia/java-row-client.svg)](https://jitpack.io/#idioglossia/java-row-client)\n\nJava client for ROW (Rest Over Websocket)\n\n---\n\n## Setup\n\ntodo\n\n## Usage\n\nCreate RowClient using `RowWebsocketClient` and pass configuration object.\n\n```java\nRowClient rowClient = new TyrusRowWebsocketClient(RowClientConfig.builder()\n    .address(\"ws://localhost:8080/ws\")\n    .build());\n```\n\nCall `open()` method on client to start the connection:\n\n```java\nrowClient.open();\n```\n\nCreate a request:\n\n```java\nRowRequest\u003cBODYTYPE, QUERYTYPE\u003e request = RowRequest.\u003cBODYTYPE, QUERYTYPE\u003ebuilder()\n            .address(\"/address\")\n            .method(RowRequest.RowMethod.GET)\n            .body(...)\n            .query(...)\n            .headers(...)\n            .build();\n```\n\nSend request and pass response handler:\n\n```java\nrowClient.sendRequest(request, new ResponseCallback\u003cSampleDto\u003e() {\n        @Override\n        public void onResponse(RowResponse\u003cBODYTYPE\u003e rowResponse) {\n            System.out.println(rowResponse);\n        }\n\n        @Override\n        public void onError(Throwable throwable) {\n            throwable.printStackTrace();\n        }\n    });\n```\n\nIf your request is subscribing to a channel, pass SubscriptionListener too:\n\n```java\nrowClient.subscribe(request, new ResponseCallback\u003cSampleDto\u003e() {\n        @Override\n        public void onResponse(RowResponse\u003cSampleDto\u003e rowResponse) {\n            //request response\n            System.out.println(rowResponse);\n            System.out.println(rowResponse.getSubscription());\n        }\n\n        @Override\n        public void onError(Throwable throwable) {\n            throwable.printStackTrace();\n        }\n    }, new SubscriptionListener\u003cSampleDto\u003e() {\n        @Override\n        public void onMessage(Subscription subscription, PublishedMessage\u003cSampleDto\u003e sampleDto) {\n            //subscription listener\n            System.out.println(sampleDto);\n            System.out.println(subscription);\n        }\n    });\n```\n\nCheck `RowClientConfig` for more config parameters. For example you can pass handshake headers through configuration:\n\n```java\nRowClient rowClient = new RowWebsocketClient(RowClientConfig.builder()\n    .address(\"ws://localhost:8080/ws\")\n    .handshakeHeadersProvider(new HandshakeHeadersProvider() {\n        @Override\n        public Map\u003cString, List\u003cString\u003e\u003e getHeaders() {\n            Map\u003cString, List\u003cString\u003e\u003e headers = new HashMap\u003c\u003e();\n            headers.put(\"X-Auth-Token\", Collections.singletonList(\"adminToken\"));\n            return headers;\n        }\n    })\n    .build());\n```\n\nYou can make changes to websocket configuration by passing `WebsocketConfig` to `RowClientConfig`. Also, its possible to alter `SSLEngineConfigurator`. Follow [this documentation](https://eclipse-ee4j.github.io/tyrus-project.github.io/documentation/latest/index/tyrus-proprietary-config.html#d0e1129).\n\nThen on server side the websocket can be validated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fep2p%2Frow-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fep2p%2Frow-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fep2p%2Frow-client/lists"}