|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.ex_337.xmpp.fwork.GradientSession
Represents an XMPP session. Created on first document request, destroyed when the client goes offline.
| Field Summary | |
protected String |
remoteJID
The remote JID of the client that owns this session. |
protected BaseGradientService |
service
The service this session was created from |
protected Map |
threadIDs
A map of thread IDs. |
protected org.jivesoftware.smack.XMPPConnection |
xmppConnection
The XMPPConnection this session was loaded from. |
| Constructor Summary | |
GradientSession()
The default constructor. |
|
| Method Summary | |
void |
addThread(String threadID,
String path)
The method called by BaseGradientService when a new thread is created. |
void |
closeThreads()
Closes all threads for this session. |
void |
destroy()
Blank method for cleaning up code. |
String |
getPath(String threadID)
Returns the path of the document with this thread ID. |
String |
getRemoteJID()
|
void |
init()
Blank method to override for initialisation code. |
Element |
processIQ(IQ.Type type,
String threadID,
Element element)
Called when the client sends an IQ to the server. |
void |
processMessage(String threadID,
List elements)
The method called when a client document sends a message to the server. |
void |
removeThread(String threadID)
The method called by BaseGradientService when a thread is removed. |
Element |
sendIQ(IQ.Type type,
String threadID,
Element element)
Sends an IQ to the JID behind htis session |
void |
sendMessage(String threadID,
List elements)
Sends a message to the client. |
void |
setRemoteJID(String newRemoteJID)
Sets the remote JID. |
void |
setService(BaseGradientService service)
Sets the service that created this application. |
void |
setXMPPConnection(org.jivesoftware.smack.XMPPConnection newXMPPConnection)
Sets the XMPP connection to use when responding to Packets passed to this session |
protected void |
threadAdded(String threadID,
String path)
Blank method to override if you want to know when a thread is added. |
protected void |
threadRemoved(String threadID,
String path)
Blank method to override if you want to know when a thread is removed. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected String remoteJID
protected Map threadIDs
protected org.jivesoftware.smack.XMPPConnection xmppConnection
protected BaseGradientService service
| Constructor Detail |
public GradientSession()
| Method Detail |
public void setRemoteJID(String newRemoteJID)
newRemoteJID - the new JID.public void setXMPPConnection(org.jivesoftware.smack.XMPPConnection newXMPPConnection)
newXMPPConnection - the XMPP Connection.public void setService(BaseGradientService service)
service - the service.public String getRemoteJID()
public Element sendIQ(IQ.Type type,
String threadID,
Element element)
type - the IQ typethreadID - the thread ID of the document that needs to respond to this IQ.element - the IQ element
public void sendMessage(String threadID,
List elements)
threadID - The thread ID of the document that should receive this thread.elements - the elemnts to send.
public final void addThread(String threadID,
String path)
threadID - the new threadpath - the new pathpublic final void removeThread(String threadID)
threadID - the thread.public String getPath(String threadID)
threadID - the thread ID
public Element processIQ(IQ.Type type,
String threadID,
Element element)
type - the IQ typethreadID - the thread ID of the document that sent the IQelement - the element recieved
public void processMessage(String threadID,
List elements)
threadID - the thread ID of the document that send the messageelements - the elements of the message.
protected void threadAdded(String threadID,
String path)
threadID - the new threadpath - the new path
protected void threadRemoved(String threadID,
String path)
threadID - the threadpath - the pathpublic void init()
public void destroy()
public final void closeThreads()
public String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||