Class ChatMarkersManager
- java.lang.Object
-
- org.jivesoftware.smack.Manager
-
- org.jivesoftware.smackx.chat_markers.ChatMarkersManager
-
public final class ChatMarkersManager extends Manager
Chat Markers Manager class (XEP-0333).- See Also:
- XEP-0333: Chat Markers
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
addIncomingChatMarkerMessageListener(ChatMarkersListener listener)
Register a ChatMarkersListener.static ChatMarkersManager
getInstanceFor(XMPPConnection connection)
Get the singleton instance of ChatMarkersManager.boolean
isSupportedByServer()
Deprecated.This method serves no purpose, as servers do not announce this feature.boolean
removeIncomingChatMarkerMessageListener(ChatMarkersListener listener)
Unregister a ChatMarkersListener.-
Methods inherited from class org.jivesoftware.smack.Manager
connection, getAuthenticatedConnectionOrThrow, schedule, schedule, scheduleBlocking
-
-
-
-
Method Detail
-
getInstanceFor
public static ChatMarkersManager getInstanceFor(XMPPConnection connection)
Get the singleton instance of ChatMarkersManager.- Parameters:
connection
- the connection used to get the ChatMarkersManager instance.- Returns:
- the instance of ChatMarkersManager
-
isSupportedByServer
@Deprecated public boolean isSupportedByServer() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
Deprecated.This method serves no purpose, as servers do not announce this feature.Returns true if Chat Markers is supported by the server.- Returns:
- true if Chat Markers is supported by the server.
- Throws:
SmackException.NotConnectedException
- if the connection is not connected.XMPPException.XMPPErrorException
- in case an error response was received.SmackException.NoResponseException
- if no response was received.java.lang.InterruptedException
- if the connection is interrupted.
-
addIncomingChatMarkerMessageListener
public boolean addIncomingChatMarkerMessageListener(ChatMarkersListener listener)
Register a ChatMarkersListener. That listener will be informed about new incoming markable messages.- Parameters:
listener
- ChatMarkersListener- Returns:
- true, if the listener was not registered before
-
removeIncomingChatMarkerMessageListener
public boolean removeIncomingChatMarkerMessageListener(ChatMarkersListener listener)
Unregister a ChatMarkersListener.- Parameters:
listener
- ChatMarkersListener- Returns:
- true, if the listener was registered before
-
-