The EnxRoom.destroy() method allows the Moderator to conclude an ongoing session.

Method: public void destroy() – No Parameter required.

Callbacks:

  • onAckDestroy – Acknowledgment to the Moderator when the session is destroyed.
  • onRoomDisconnected - Notification to all users in the Room when the session is destroyed.
room.destroy();

// Moderator is acknowledged that session is destroyed
public void onAckDestroy(JSONObject jsonObject) {
	// Handle JSONObject
}

Error Codes & Exceptions

CodeDescription
5116Unauthorized Access. When a user with participant role invokes destroy().