net.ex_337.xmpp.fwork.examples
Class SimpleGradientService
java.lang.Object
net.ex_337.xmpp.fwork.XMPPService
net.ex_337.xmpp.fwork.BaseGradientService
net.ex_337.xmpp.fwork.examples.SimpleGradientService
- All Implemented Interfaces:
- org.jivesoftware.smack.PacketListener
- public class SimpleGradientService
- extends BaseGradientService
A simple Gradient service that doesn't do much except log whatever lifecycle events
are inflicted upon it. Cruel XMPPServiceServiceManagerServlet! How thoughtlessly
you crush'd the life from my instances.
(Why yes, I do need a holiday.)
- Author:
- Ian
| Methods inherited from class net.ex_337.xmpp.fwork.XMPPService |
close, destroy, getInitParameter, getInitParameterNames, getIntInitParameter, getListInitParameter, 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 |
SimpleGradientService
public SimpleGradientService()
init
public void init()
- Initialisation code could go here. In this case
we're simply loading the SVG element for the document.
- Overrides:
init in class XMPPService
processDocumentRequest
public Element processDocumentRequest(String remoteJID,
String path,
Map parameters)
- Description copied from class:
BaseGradientService
- Should be overridden. Should return something based on XMPPUtils.newDocResponseElement().
- Specified by:
processDocumentRequest in class BaseGradientService
- Parameters:
remoteJID - the JID that requested this documentpath - the path that was requested. Ignored here.parameters - the request parameters. Ignored here.
- Returns:
- the index.svg document loaded above.
newSession
protected GradientSession newSession()
- In this case, the only thing we want to do
is log session lifecycle events, so it's easier
to extend GradientSession as an anonymous inner class.
- Overrides:
newSession in class BaseGradientService
- Returns:
- a new GradientSession.