|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.ex_337.xmpp.fwork.XMPPService
The based code for an XMPP service. Implementations of this class are loaded via the servlet.
| Field Summary | |
protected org.jivesoftware.smack.filter.PacketFilter |
filter
The packet filter used to decide whether or not to call the processPacket() method on this class. |
protected ServletContext |
sc
The servlet context that contains the servlet that loaded this XMPPService. |
protected org.jivesoftware.smack.XMPPConnection |
xmppConnection
The XMPPConnection from which packets are received. |
| Constructor Summary | |
XMPPService()
The default constructor. |
|
| Method Summary | |
void |
close()
Closes the XMPPConnection. |
void |
destroy()
A method called before close(). |
String |
getInitParameter(String name)
Returns an initialisation parameter. |
Iterator |
getInitParameterNames()
|
int |
getIntInitParameter(String name)
Helper method. |
String[] |
getListInitParameter(String name)
Helper method. |
void |
init()
A method called before open(). |
void |
log(String message)
Logs the given message to the logger. |
void |
log(String message,
Throwable throwable)
Logs a message and the error to the logger. |
void |
open()
Adds this service as a PacketListener to the given connection, using the 'filter' PacketFilter. |
abstract void |
processPacket(org.jivesoftware.smack.packet.Packet packet)
The method called by the XMPPConnection when a packet is received, and passes the given PacketFilter. |
void |
setInitParameter(String name,
String value)
Sets an initialisation parameter. |
void |
setServletContext(ServletContext sc)
|
void |
setXMPPConnection(org.jivesoftware.smack.XMPPConnection xmppConnection)
|
void |
stop()
Removes this service as from the XMPPConnection. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected org.jivesoftware.smack.filter.PacketFilter filter
protected org.jivesoftware.smack.XMPPConnection xmppConnection
protected ServletContext sc
| Constructor Detail |
public XMPPService()
| Method Detail |
public void close()
public final void open()
public final void stop()
public final void log(String message)
message - the message.
public final void log(String message,
Throwable throwable)
message - the messagethrowable - the errorpublic final void setXMPPConnection(org.jivesoftware.smack.XMPPConnection xmppConnection)
xmppConnection - The XMPP connection to set.public final void setServletContext(ServletContext sc)
sc - the servlet context for this service.
public final void setInitParameter(String name,
String value)
name - the parameter namevalue - the parameter valuepublic String getInitParameter(String name)
name - the parameter name.
public int getIntInitParameter(String name)
name - the parameter name
NumberFormatException - if the parameter specified cannot be parsed into an integer.public String[] getListInitParameter(String name)
name - the parameter name.
public Iterator getInitParameterNames()
public void init()
public void destroy()
public abstract void processPacket(org.jivesoftware.smack.packet.Packet packet)
processPacket in interface org.jivesoftware.smack.PacketListenerpacket - the packet.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||