|
Jive API (3.0.13) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.community.xmpp.IMManager
@Transactional(readOnly=true,
propagation=SUPPORTS)
public class IMManagerManages connection to the Openfire RTC server. Jive SBS connects to Openfire as an external component, which allows it to monitor presence information, run commands, link authentication and user accounts, etc. And Openfires connects to Jive SBS using Webservices.
In order to connect to Openfire, Jive SBS must be configured with the external component address, port, and secret key. A multi-cast DNS service assists Jive SBS in discovering all Openfire servers on the local network.
The external component connection is made using the open XMPP protocol. However, Jive SBS relies on Ad-Hoc Commands that are specifically implemented in Openfire.
| Nested Class Summary | |
|---|---|
static class |
IMManager.ConcurrentConnectionCheckClusterTask
|
static class |
IMManager.ConcurrentPresenceInitCheckClusterTask
|
static class |
IMManager.LocalRestartTask
|
class |
IMManager.UserEventListener
|
| Constructor Summary | |
|---|---|
IMManager()
|
|
| Method Summary | |
|---|---|
void |
addXMPPListener(XMPPListener listener)
Adds an XMPP listener, which listens for connects and disconnects as well as presence updates. |
void |
changeSharedSecret(String secret)
Changes the shared secret and reset the component connection. |
void |
clusteringStarted()
|
void |
clusteringStopped()
|
void |
deleteIMHandlesForUser(User user)
|
void |
destroy()
Notifies the manager to release any resources that may be holding on too. |
String |
generateNonce()
Generates a new nonce. |
String |
getAdminConsoleInterface()
Returns the interface where OF's admin console is listening |
int |
getAdminConsolePort()
Returns the port where OF's admin console is listening |
int |
getAdminConsoleSecurePort()
Returns the secure port where OF's admin console is listening |
AuthenticationProvider |
getAuthenticationProvider()
|
ClearspaceComponent |
getClearspaceComponent()
|
String |
getHttpBindSecureUrl()
If the HTTP binding service is enabled on the RTC server, see isHttpBindEnabled(), this method will
return the secure URL on which it can be reached. |
String |
getHttpBindUnsecureUrl()
If the HTTP binding service is enabled on the RTC server, see isHttpBindEnabled(), this method will
return the unsecure URL on which it can be reached. |
String |
getHttpBindUrl()
If the HTTP binding service is enabled on the RTC server, see isHttpBindEnabled(), this method will
return the URL on which it can be reached. |
InterceptorManager |
getInterceptorManager()
|
IqDiscoHandler |
getIqDiscoHandler()
|
String |
getJavaScriptUrl()
|
org.xmpp.packet.JID |
getJIDForUser(User user)
|
String |
getNonce()
Returns a new nonce genereted in Openfire. |
org.xmpp.packet.Presence |
getPresence(org.xmpp.packet.JID xmppAddress)
Returns the presence info for a particular XMPP address, or null if is unavailable (offline) or if no presence information is available. |
org.xmpp.packet.Presence |
getPresence(User user)
Returns the presence info for a User, or null if is unavailable (offline) or if no presence
information is available. |
org.xmpp.packet.Presence |
getPresenceForResource(org.xmpp.packet.JID xmppAddress)
Returns the presence info for a particular XMPP address resource, or null if the resource is unavailable (offline) or if no presence information is available. |
Collection<org.xmpp.packet.Presence> |
getPresences(org.xmpp.packet.JID xmppAddress)
Returns a collection Presence information for all the user's current resources or null if the user is unavailable (offline) or if no presence information is available. |
ServerInformation |
getServerInformation()
Returns information about the XMPP server as well as some basic statistics. |
String |
getServerVersion()
Returns information about the XMPP server version. |
UserCommandManager |
getUserCommandManager()
|
User |
getUserForJID(org.xmpp.packet.JID jid)
|
void |
init()
|
boolean |
isChatEnabled(JiveContainer container)
Returns true if Chat functionality is enabled for a container. |
boolean |
isConnected()
Returns true if Jive SBS is connected as an external component to a Openfire server. |
boolean |
isEnabled()
Returns true if Jive SBS is setup as an external component to a Openfire server, or if there is an active task trying to make it. |
boolean |
isHttpBindEnabled()
Returns true if the HTTP binding service on the RTC server is currently enabled and false if it is not. |
boolean |
isValidNonce(String nonce)
Returns true if the nonce was generated usig generateNonce,
if this is the first check for that nonce and it was generated at least
one minute ago. |
boolean |
isWebservicesEnabled()
Returns true if web services are enabled and the Openfire user is authorized to use them. |
void |
removeXMPPListener(XMPPListener listener)
Removes an XMPP listener. |
void |
reset()
Restarts the external component connection to Openfire. |
void |
sendPacket(org.xmpp.packet.Packet packet)
Sends an XMPP packet to the Openfire server. |
void |
sendQuery(org.xmpp.packet.IQ packet,
org.jivesoftware.whack.IQResultListener iqResultListener)
|
void |
setAdminConsoleInterface(String adminConsoleInterface)
Set the interface where OF's admin console is listening |
void |
setAdminConsolePort(int adminConsolePort)
Set the port where OF's admin console is listening |
void |
setAdminConsoleSecurePort(int adminConsoleSecurePort)
Set the port where OF's admin console is listening |
void |
setAuthenticationProvider(AuthenticationProvider authProvider)
|
protected void |
setHttpBindEnabled(boolean enabled)
|
protected void |
setHttpBindSecureUrl(String url)
|
protected void |
setHttpBindUnsecureUrl(String url)
|
void |
setImSettingsDAO(IMSettingsDAO imSettingsDAO)
|
void |
setJIDNodeForUser(User user,
String node)
|
void |
setPermissionsManager(ExtendedPermissionsManager permissionsManager)
|
void |
setPresenceCache(
|
void |
setPrivateMessageManager(PrivateMessageManager privateMessageManager)
|
void |
setRegistry(EventListenerRegistry registry)
|
protected void |
setRelativeJavascriptUrl(String javaScriptUrl)
|
void |
setTaskEngine(TaskEngine taskEngine)
|
void |
setUserManager(UserManager userManager)
|
void |
setWsUtil(WSUtil wsUtil)
|
boolean |
testComponent(String host,
int port,
String secret,
String domain)
Tests an external component connection to the Openfire server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IMManager()
| Method Detail |
|---|
public void init()
public void destroy()
JiveManager
destroy in interface JiveManager
public boolean testComponent(String host,
int port,
String secret,
String domain)
host - the external component host.port - the external component portsecret - the shared secret for the component connection.domain - the XMPP server domain.
public void changeSharedSecret(String secret)
secret - The new secret.public void reset()
com.jivesoftware.community.xmpp.IMSettingsUtils class to configure
external component settings.
public void sendPacket(org.xmpp.packet.Packet packet)
isConnected() method before
trying to send a packet.
packet - the packet to send.
IllegalStateException - if not connected to the server.
public void sendQuery(org.xmpp.packet.IQ packet,
org.jivesoftware.whack.IQResultListener iqResultListener)
public boolean isEnabled()
public boolean isConnected()
public boolean isWebservicesEnabled()
public boolean isChatEnabled(JiveContainer container)
container - Container object that we will check for chat enabled status of.
@Transactional(readOnly=false,
propagation=REQUIRED)
public void setJIDNodeForUser(User user,
String node)
public User getUserForJID(org.xmpp.packet.JID jid)
public org.xmpp.packet.JID getJIDForUser(User user)
public void addXMPPListener(XMPPListener listener)
listener - the XMPP listener.public void removeXMPPListener(XMPPListener listener)
listener - an XMPP listener.public org.xmpp.packet.Presence getPresence(org.xmpp.packet.JID xmppAddress)
If the XMPP user has several presences (one for each resource), then the presence with the highest priority is returned. If several presence values have the same priority, the presence that is "most available" is returned.
xmppAddress - an XMPP address. If the address contains a resource, it will be ignored. To retrieve a
presence information for a particular resource, see getPresenceForResource(org.xmpp.packet.JID).
public org.xmpp.packet.Presence getPresence(User user)
User, or null if is unavailable (offline) or if no presence
information is available. getPresence(org.xmpp.packet.JID)
user - the user to test for presence.
public org.xmpp.packet.Presence getPresenceForResource(org.xmpp.packet.JID xmppAddress)
xmppAddress - a fully qualified XMPP ID, including a resource.
public Collection<org.xmpp.packet.Presence> getPresences(org.xmpp.packet.JID xmppAddress)
xmppAddress - an XMPP address (JID). It should be the bare address, e.g. jdoe@example.com, instead of
jdoe@example.com/Work.
public ClearspaceComponent getClearspaceComponent()
public UserCommandManager getUserCommandManager()
public ServerInformation getServerInformation()
public String getServerVersion()
getServerInformation(),
however, that method could return null for older versions of the server. This method exists as a standards way to
always get the version of the server.
public IqDiscoHandler getIqDiscoHandler()
protected void setHttpBindEnabled(boolean enabled)
public boolean isHttpBindEnabled()
protected void setHttpBindUnsecureUrl(String url)
public String getHttpBindUnsecureUrl()
isHttpBindEnabled(), this method will
return the unsecure URL on which it can be reached. If the service is not enabled, this method will return null.
protected void setHttpBindSecureUrl(String url)
public String getHttpBindSecureUrl()
isHttpBindEnabled(), this method will
return the secure URL on which it can be reached. If the service is not enabled, this method will return null.
public String getHttpBindUrl()
isHttpBindEnabled(), this method will
return the URL on which it can be reached. If the service is not enabled, this method will return null.
protected void setRelativeJavascriptUrl(String javaScriptUrl)
public String getJavaScriptUrl()
public InterceptorManager getInterceptorManager()
public String getAdminConsoleInterface()
public void setAdminConsoleInterface(String adminConsoleInterface)
adminConsoleInterface - the interface where OF's admin console is listeningpublic int getAdminConsolePort()
public void setAdminConsolePort(int adminConsolePort)
adminConsolePort - the interface where OF's admin console is listeningpublic int getAdminConsoleSecurePort()
public void setAdminConsoleSecurePort(int adminConsoleSecurePort)
adminConsoleSecurePort - the interface where OF's admin console is listening
@Transactional(readOnly=false,
propagation=REQUIRED)
public void deleteIMHandlesForUser(User user)
public void setImSettingsDAO(IMSettingsDAO imSettingsDAO)
public String generateNonce()
isValidNonce method will return
true when using nonces generated by this method.
public boolean isValidNonce(String nonce)
generateNonce,
if this is the first check for that nonce and it was generated at least
one minute ago.
nonce - the nonce to be checked
public String getNonce()
public void setRegistry(EventListenerRegistry registry)
public void clusteringStarted()
public void clusteringStopped()
public void setTaskEngine(TaskEngine taskEngine)
public void setUserManager(UserManager userManager)
public void setPermissionsManager(ExtendedPermissionsManager permissionsManager)
public void setAuthenticationProvider(AuthenticationProvider authProvider)
public void setPresenceCache(presenceCache)
public void setPrivateMessageManager(PrivateMessageManager privateMessageManager)
public AuthenticationProvider getAuthenticationProvider()
public void setWsUtil(WSUtil wsUtil)
|
Jive Product Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||