|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.im.IMService
public final class IMService
Represents the various IM Services for which we show presence in the forums. Contains various helper methods to interact with the services.
Field Summary | |
---|---|
static IMService |
AIM
Represents the AOL IM Service, and can create urls which provide presence information for its users. |
static IMService |
XMPP
Represents the currently configured XMPP server. |
Method Summary | |
---|---|
boolean |
canShowPresence(User user)
Returns true if the supplied User has entered user id information
for the IM Service this instance represents and if forums is configured
to publish presence for the IM service this instance represents. |
static void |
closeXMPPConnection()
Closes the XMPPConnection held by forums to publish server status (configured chat
rooms, current occupancy, etc.) |
static java.util.Iterator |
getChatRoomInfo(int maxRooms)
Returns an Iterator of RoomInfo instances
describing the current chat room activity on the XMPP server. |
java.lang.String |
getChatURI(User user)
Returns a uri which when clicked, can launch a chat client (say.. |
static int |
getNumChatRooms()
Returns the number of chat rooms available on the xmpp server. |
java.lang.String |
getPresenceURL(User user,
User requestor)
Returns the http url which will return a presence image. |
java.lang.String |
getServiceName()
Returns the name of the IM Service (Yahoo, XMPP, etc.). |
static void |
initializeXMPPConnection()
Creates a connection (and logs into) to the XMPP server as specified by the current values of ForumsChatSettings . |
static IMService |
serviceForName(java.lang.String serviceName)
Returns an IMService instance for the supplied service name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final IMService XMPP
public static final IMService AIM
Method Detail |
---|
public static void initializeXMPPConnection() throws org.jivesoftware.smack.XMPPException
ForumsChatSettings
. The connection is used to publish information about the chat server
(chat rooms, occupantcy, etc.)
org.jivesoftware.smack.XMPPException
- if connection or login fails.public static void closeXMPPConnection()
XMPPConnection
held by forums to publish server status (configured chat
rooms, current occupancy, etc.)
public static java.util.Iterator getChatRoomInfo(int maxRooms)
Iterator
of RoomInfo
instances
describing the current chat room activity on the XMPP server. If forums is not configured
to connect to an XMPP server, or if initializeXMPPConnection()
has not been called,
an empty Iterator is returned.
maxRooms
- the maximum number of chat rooms to return in the result. Values <= 0 return
an unlimited number of results.
Iterator
of RoomInfo
instances.public static int getNumChatRooms()
initializeXMPPConnection()
has not
been called.
public static IMService serviceForName(java.lang.String serviceName)
IMService
instance for the supplied service name.
If the supplied name doesn't match that of any of the enum instances, null
is returned.
serviceName
- the name of the IMService
to return
IMService
instancepublic java.lang.String getServiceName()
public java.lang.String getPresenceURL(User user, User requestor)
canShowPresence(com.jivesoftware.base.User)
return false.
user
- The user whose presence will be publishedrequestor
- The user who is asking for presence information
public boolean canShowPresence(User user)
User
has entered user id information
for the IM Service this instance represents and if forums is configured
to publish presence for the IM service this instance represents.
user
- the user to test.
public java.lang.String getChatURI(User user)
user
- the User
whose user id will be in the uri.
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |