Java 类org.jivesoftware.smackx.ChatStateManager 实例源码

项目:spark-svn-mirror    文件:ChatRoomImpl.java   
private void sendChatState(ChatState state) {
    Connection connection = SparkManager.getConnection();
    boolean connected = connection.isConnected();
if (connected) {
    Chat chat = connection.getChatManager().createChat(getParticipantJID(), null);
    try {
        ChatStateManager.getInstance(connection).setCurrentState(state, chat);
        lastNotificationSent = state;
    } catch (XMPPException e) {
        Log.error("Cannot send " + state + " chat notification");
    }
}
  }