public class CarbonManager
extends org.jivesoftware.smack.Manager
CarbonExtension support, enabling and disabling
message carbons.
You should call enableCarbons() before sending your first undirected
presence.| Modifier and Type | Method and Description |
|---|---|
void |
disableCarbons()
Helper method to disable carbons.
|
static void |
disableCarbons(org.jivesoftware.smack.packet.Message msg)
Deprecated.
|
void |
enableCarbons()
Helper method to enable carbons.
|
boolean |
getCarbonsEnabled()
Check if carbons are enabled on this connection.
|
static CarbonManager |
getInstanceFor(org.jivesoftware.smack.XMPPConnection connection)
Obtain the CarbonManager responsible for a connection.
|
boolean |
isSupportedByServer()
Returns true if XMPP Carbons are supported by the server.
|
void |
sendCarbonsEnabled(boolean new_state)
Notify server to change the carbons state.
|
void |
setCarbonsEnabled(boolean new_state)
Notify server to change the carbons state.
|
public static CarbonManager getInstanceFor(org.jivesoftware.smack.XMPPConnection connection)
connection - the connection object.public boolean isSupportedByServer()
throws org.jivesoftware.smack.SmackException.NoResponseException,
org.jivesoftware.smack.XMPPException.XMPPErrorException,
org.jivesoftware.smack.SmackException.NotConnectedException
org.jivesoftware.smack.SmackException.NotConnectedExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionpublic void sendCarbonsEnabled(boolean new_state)
throws org.jivesoftware.smack.SmackException.NotConnectedException
new_state - whether carbons should be enabled or disabledorg.jivesoftware.smack.SmackException.NotConnectedExceptionpublic void setCarbonsEnabled(boolean new_state)
throws org.jivesoftware.smack.SmackException.NoResponseException,
org.jivesoftware.smack.XMPPException.XMPPErrorException,
org.jivesoftware.smack.SmackException.NotConnectedException
new_state - whether carbons should be enabled or disabledorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionpublic void enableCarbons()
throws org.jivesoftware.smack.XMPPException,
org.jivesoftware.smack.SmackException
org.jivesoftware.smack.XMPPExceptionorg.jivesoftware.smack.SmackException - if there was no response from the server.public void disableCarbons()
throws org.jivesoftware.smack.XMPPException,
org.jivesoftware.smack.SmackException
org.jivesoftware.smack.XMPPExceptionorg.jivesoftware.smack.SmackException - if there was no response from the server.public boolean getCarbonsEnabled()
@Deprecated public static void disableCarbons(org.jivesoftware.smack.packet.Message msg)
CarbonExtension.Private.addTo(Message)msg - Message object to mark private