|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.ex_337.xmpp.fwork.XMPPService
net.ex_337.xmpp.fwork.BaseGradientService
This class extends XMPPService to add some of the functionality expected to be required when creating Gradient services. Specifically, sessions are supported, and document request processing is included.
| Field Summary | |
protected Map |
sessions
The map of all sessions, keyed by remote JID. |
| Fields inherited from class net.ex_337.xmpp.fwork.XMPPService |
filter, sc, xmppConnection |
| Constructor Summary | |
BaseGradientService()
The default constuctor. |
|
| Method Summary | |
GradientSession |
getSession(String remoteJID)
|
Map |
getSessions()
|
protected GradientSession |
newSession()
Creates a new session. |
protected void |
processDocRequestIQ(DocRequestIQ docRequest,
String remoteJID)
Process a document request IQ. |
abstract Element |
processDocumentRequest(String remoteJID,
String path,
Map parameters)
Should be overridden. |
protected void |
processIncomingMessage(Message message,
String remoteJID)
Processes an incoming message. |
void |
processPacket(org.jivesoftware.smack.packet.Packet packet)
The implementation of XMPPService.processPacket that routes the packets to their correct sessions. |
protected void |
processPresence(Presence presence,
String remoteJID)
Processes a presence packet. |
protected void |
processRPCStyleIQ(IQ iq,
String remoteJID)
Processes a normal, i.e. |
void |
sendStanza(String path,
GradientSession session,
String threadID,
Element element)
|
void |
sendStanza(String path,
GradientSession session,
String threadID,
List elements)
|
| Methods inherited from class net.ex_337.xmpp.fwork.XMPPService |
close, destroy, getInitParameter, getInitParameterNames, getIntInitParameter, getListInitParameter, init, log, log, open, setInitParameter, setServletContext, setXMPPConnection, stop |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Map sessions
| Constructor Detail |
public BaseGradientService()
| Method Detail |
public void sendStanza(String path,
GradientSession session,
String threadID,
Element element)
path - the path, if any, to target with this event.session - the session, if any, to target with this event.threadID - the user vieport ID, if any, to target with this event.element - the element to send.
public void sendStanza(String path,
GradientSession session,
String threadID,
List elements)
path - the path, if any, to target with this event.session - the session, if any, to target with this event.threadID - the user viewport ID, if any, to target with this event.elements - the elements to send.public GradientSession getSession(String remoteJID)
remoteJID - the JID of the session to get.
public Map getSessions()
public void processPacket(org.jivesoftware.smack.packet.Packet packet)
processPacket in interface org.jivesoftware.smack.PacketListenerprocessPacket in class XMPPServicepacket - the packet.
protected void processPresence(Presence presence,
String remoteJID)
presence - the presence packet.remoteJID - the sender.
protected void processRPCStyleIQ(IQ iq,
String remoteJID)
iq - the IQ packetremoteJID - the sender
protected void processIncomingMessage(Message message,
String remoteJID)
message - the messageremoteJID - the remote JID
protected void processDocRequestIQ(DocRequestIQ docRequest,
String remoteJID)
docRequest - the document request.remoteJID - the sender.
public abstract Element processDocumentRequest(String remoteJID,
String path,
Map parameters)
remoteJID - the document requesterpath - the path of the requestparameters - the paramters. Keyed with strings, Values are strings or elements.
protected GradientSession newSession()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||