Home | History | Annotate | Download | only in smackx

Lines Matching refs:Connection

37  * Handles chat state for all chats on a particular Connection. This class manages both the
41 * NOTE: {@link org.jivesoftware.smackx.ChatStateManager#getInstance(org.jivesoftware.smack.Connection)}
42 * needs to be called in order for the listeners to be registered appropriately with the connection.
51 private static final Map<Connection, ChatStateManager> managers =
52 new WeakHashMap<Connection, ChatStateManager>();
58 * Returns the ChatStateManager related to the Connection and it will create one if it does
61 * @param connection the connection to return the ChatStateManager
62 * @return the ChatStateManager related the the connection.
64 public static ChatStateManager getInstance(final Connection connection) {
65 if(connection == null) {
69 ChatStateManager manager = managers.get(connection);
71 manager = new ChatStateManager(connection);
73 managers.put(connection, manager);
80 private final Connection connection;
92 private ChatStateManager(Connection connection) {
93 this.connection = connection;
97 connection.getChatManager().addOutgoingMessageInterceptor(outgoingInterceptor,
99 connection.getChatManager().addChatListener(incomingInterceptor);
101 ServiceDiscoveryManager.getInstanceFor(connection)
137 return connection.equals(that.connection);
142 return connection.hashCode();
166 Chat chat = connection.getChatManager().getThreadChat(message.getThread());