public final class IoTProvisioningManager extends Manager
Modifier and Type | Method and Description |
---|---|
boolean |
addBecameFriendListener(BecameFriendListener becameFriendListener) |
boolean |
addWasUnfriendedListener(WasUnfriendedListener wasUnfriendedListener) |
DomainBareJid |
findProvisioningServerComponent()
Try to find a provisioning server component.
|
Jid |
getConfiguredProvisioningServer() |
static IoTProvisioningManager |
getInstanceFor(XMPPConnection connection)
Get the manger instance responsible for the given connection.
|
boolean |
iAmFriendOf(BareJid otherJid) |
boolean |
isFriend(Jid provisioningServer,
BareJid friendInQuestion)
As the given provisioning server is the given JID is a friend.
|
boolean |
isMyFriend(Jid friendInQuestion) |
boolean |
removeBecameFriendListener(BecameFriendListener becameFriendListener) |
boolean |
removeWasUnfriendedListener(WasUnfriendedListener wasUnfriendedListener) |
void |
sendFriendshipRequest(BareJid bareJid) |
void |
sendFriendshipRequestIfRequired(BareJid jid) |
void |
setConfiguredProvisioningServer(Jid provisioningServer)
Set the configured provisioning server.
|
void |
unfriend(Jid friend) |
connection, getAuthenticatedConnectionOrThrow, schedule
public static IoTProvisioningManager getInstanceFor(XMPPConnection connection)
connection
- the XMPP connection.public void setConfiguredProvisioningServer(Jid provisioningServer)
null
as provisioningServer to use
automatic discovery of the provisioning server (the default behavior).provisioningServer
- public Jid getConfiguredProvisioningServer() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
public DomainBareJid findProvisioningServerComponent() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public boolean isFriend(Jid provisioningServer, BareJid friendInQuestion) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
provisioningServer
- the provisioning server to ask.friendInQuestion
- the JID to ask about.true
if the JID is a friend, false
otherwise.SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public boolean iAmFriendOf(BareJid otherJid)
public void sendFriendshipRequest(BareJid bareJid) throws SmackException.NotConnectedException, InterruptedException
public void sendFriendshipRequestIfRequired(BareJid jid) throws SmackException.NotConnectedException, InterruptedException
public boolean isMyFriend(Jid friendInQuestion)
public void unfriend(Jid friend) throws SmackException.NotConnectedException, InterruptedException
public boolean addBecameFriendListener(BecameFriendListener becameFriendListener)
public boolean removeBecameFriendListener(BecameFriendListener becameFriendListener)
public boolean addWasUnfriendedListener(WasUnfriendedListener wasUnfriendedListener)
public boolean removeWasUnfriendedListener(WasUnfriendedListener wasUnfriendedListener)