im-server-sdk

EaseMob IM Server SDK

License

License

GroupId

GroupId

com.github.easemob
ArtifactId

ArtifactId

im-server-sdk
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

im-server-sdk
EaseMob IM Server SDK
Project URL

Project URL

https://github.com/easemob/easemob-im-server-sdk
Source Code Management

Source Code Management

https://github.com/easemob/easemob-im-server-sdk

Download im-server-sdk

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.easemob/im-server-sdk/ -->
<dependency>
    <groupId>com.github.easemob</groupId>
    <artifactId>im-server-sdk</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.easemob/im-server-sdk/
implementation 'com.github.easemob:im-server-sdk:1.0.0'
// https://jarcasting.com/artifacts/com.github.easemob/im-server-sdk/
implementation ("com.github.easemob:im-server-sdk:1.0.0")
'com.github.easemob:im-server-sdk:jar:1.0.0'
<dependency org="com.github.easemob" name="im-server-sdk" rev="1.0.0">
  <artifact name="im-server-sdk" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.easemob', module='im-server-sdk', version='1.0.0')
)
libraryDependencies += "com.github.easemob" % "im-server-sdk" % "1.0.0"
[com.github.easemob/im-server-sdk "1.0.0"]

Dependencies

compile (8)

Group / Artifact Type Version
com.fasterxml.jackson.core : jackson-annotations jar 2.11.3
com.fasterxml.jackson.core : jackson-databind jar 2.11.3
junit : junit jar 4.12
io.projectreactor : reactor-core jar
io.projectreactor.netty : reactor-netty-core jar
io.projectreactor.netty : reactor-netty-http jar
org.projectlombok : lombok jar 1.18.6
com.github.ben-manes.caffeine : caffeine jar 2.6.2

test (2)

Group / Artifact Type Version
io.projectreactor : reactor-test jar
org.mockito : mockito-core jar 3.6.28

Project Modules

There are no modules declared in this project.

Easemob IM Java SDK

This is the official Easemob IM Java SDK repository.

Easemob provides instant messaging APIs for your applications.

This project provides a facade for our RESTful API so that you can focus on the business logic.

This project is currently under development.

Register your app

You will need an appkey and credentials to use this SDK. Get them from the Easemob Console.

Install the SDK

For Maven, add following dependency in your pom.xml:

<dependency>
	<groupId>com.easemob.im</groupId>
	<artifactId>im-sdk</artifactId>
	<version>0.0.1</version>
</dependency>

Configure the SDK

	EMService service = new EMService(
		EMProperties.builder()
			.withBaseUri("https://a1.easemob.com")
			.withAppkey("some-org-id#your-awesome-app")
			.withClientId("the-client-id")
			.withClientSecret("the-client-secret").build());

🎉 The SDK is configured, you may start to use it now.

To use the SDK

The EMService provides asynchronous APIs, for example to register user, and send a welcome message to him, you can:

	EMService service;
	service.registerUser("bob", "VeryStrongPassword")
		.then(service.sendText("Welcome, bob").toUser("bob"))
		.subscribe();

Note subscribe() will return immediately, if you want to block until complete or timeout, you may:

	EMService service;
	service.registerUser("bob", "VeryStrongPassword")
		.then(service.sendText("Welcome, bob").toUser("bob"))
		.block(Duration.ofSeconds(3));

References

Wiki TBD.

Javadoc TBD.

com.github.easemob

环信

环信

Versions

Version
1.0.0