public class CarbonManager extends 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(Message msg)
Deprecated.
|
void |
enableCarbons()
Helper method to enable carbons.
|
boolean |
getCarbonsEnabled()
Check if carbons are enabled on this connection.
|
static CarbonManager |
getInstanceFor(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.
|
connectionpublic static CarbonManager getInstanceFor(XMPPConnection connection)
connection - the connection object.public boolean isSupportedByServer() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException
SmackException.NotConnectedExceptionXMPPException.XMPPErrorExceptionSmackException.NoResponseExceptionpublic void sendCarbonsEnabled(boolean new_state) throws SmackException.NotConnectedException
new_state - whether carbons should be enabled or disabledSmackException.NotConnectedExceptionpublic void setCarbonsEnabled(boolean new_state) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException
new_state - whether carbons should be enabled or disabledXMPPException.XMPPErrorExceptionSmackException.NoResponseExceptionSmackException.NotConnectedExceptionpublic void enableCarbons() throws XMPPException, SmackException
XMPPExceptionSmackException - if there was no response from the server.public void disableCarbons() throws XMPPException, SmackException
XMPPExceptionSmackException - if there was no response from the server.public boolean getCarbonsEnabled()
@Deprecated public static void disableCarbons(Message msg)
CarbonExtension.Private.addTo(Message)msg - Message object to mark private