diff --git a/common/src/main/java/cn/wildfirechat/common/APIPath.java b/common/src/main/java/cn/wildfirechat/common/APIPath.java index 0a9ac1e1..e472e914 100644 --- a/common/src/main/java/cn/wildfirechat/common/APIPath.java +++ b/common/src/main/java/cn/wildfirechat/common/APIPath.java @@ -21,6 +21,7 @@ public interface APIPath { String Get_Domain = "/admin/domain/get"; String Destroy_Domain = "/admin/domain/destroy"; String List_Domain = "/admin/domain/list"; + String Ping_Domain = "/admin/domain/ping"; String Create_User = "/admin/user/create"; String Update_User = "/admin/user/update"; diff --git a/common/src/main/java/cn/wildfirechat/pojos/mesh/PojoDomainPingRequest.java b/common/src/main/java/cn/wildfirechat/pojos/mesh/PojoDomainPingRequest.java new file mode 100755 index 00000000..cb94f669 --- /dev/null +++ b/common/src/main/java/cn/wildfirechat/pojos/mesh/PojoDomainPingRequest.java @@ -0,0 +1,14 @@ +/* + * This file is part of the Wildfire Chat package. + * (c) Heavyrain2012 + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +package cn.wildfirechat.pojos.mesh; + + +public class PojoDomainPingRequest { + public String domainId; +} diff --git a/common/src/main/java/cn/wildfirechat/pojos/mesh/PojoDomainPingResponse.java b/common/src/main/java/cn/wildfirechat/pojos/mesh/PojoDomainPingResponse.java new file mode 100755 index 00000000..36be96d9 --- /dev/null +++ b/common/src/main/java/cn/wildfirechat/pojos/mesh/PojoDomainPingResponse.java @@ -0,0 +1,16 @@ +/* + * This file is part of the Wildfire Chat package. + * (c) Heavyrain2012 + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +package cn.wildfirechat.pojos.mesh; + + +public class PojoDomainPingResponse { + public boolean success; + public String errorMessage; + public String myDomainName; +} diff --git a/sdk/src/main/java/cn/wildfirechat/sdk/MeshAdmin.java b/sdk/src/main/java/cn/wildfirechat/sdk/MeshAdmin.java index 9177302e..51d6552f 100644 --- a/sdk/src/main/java/cn/wildfirechat/sdk/MeshAdmin.java +++ b/sdk/src/main/java/cn/wildfirechat/sdk/MeshAdmin.java @@ -227,4 +227,10 @@ public class MeshAdmin { return AdminHttpUtils.httpJsonPost(path, event, Void.class); } + public static IMResult pingDomain(String domainId) throws Exception { + String path = APIPath.Ping_Domain; + PojoDomainPingRequest request = new PojoDomainPingRequest(); + request.domainId = domainId; + return AdminHttpUtils.httpJsonPost(path, request, PojoDomainPingResponse.class); + } }