|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.gotoandplay.smartfoxserver.extensions.AbstractExtension
it.gotoandplay.smartfoxserver.extensions.examples.SimpleExtension
public class SimpleExtension
This is the most simple SmartFoxServer extension possible.
In a nutshell, every extension has to accomplish four different tasks:
| Field Summary |
|---|
| Fields inherited from class it.gotoandplay.smartfoxserver.extensions.AbstractExtension |
|---|
adminExtension |
| Constructor Summary | |
|---|---|
SimpleExtension()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Destroy the extension |
void |
handleInternalEvent(InternalEventObject ieo)
Handles an event dispateched by the Server |
void |
handleRequest(java.lang.String cmd,
ActionscriptObject ao,
User u,
int fromRoom)
Handle client requests sent in XML format. |
void |
handleRequest(java.lang.String cmd,
java.lang.String[] params,
User u,
int fromRoom)
Handle client requests sent in String format. |
void |
init()
Initialize the extension. |
| Methods inherited from class it.gotoandplay.smartfoxserver.extensions.AbstractExtension |
|---|
getOwnerRoom, getOwnerZone, handleInternalRequest, handleRequest, isActive, loadConfig, registerForEvents, sendResponse, sendResponse, sendResponse, sendResponse, setActive, setOwner, trace, unRegister |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleExtension()
| Method Detail |
|---|
public void init()
init in interface it.gotoandplay.smartfoxserver.extensions.ISmartFoxExtensioninit in class AbstractExtensionpublic void destroy()
destroy in interface it.gotoandplay.smartfoxserver.extensions.ISmartFoxExtensiondestroy in class AbstractExtension
public void handleRequest(java.lang.String cmd,
ActionscriptObject ao,
User u,
int fromRoom)
ao - the ActionscriptObject with the serialized data coming from the clientcmd - the cmd name invoked by the clientfromRoom - the id of the room where the user is inu - the User who sent the message
public void handleRequest(java.lang.String cmd,
java.lang.String[] params,
User u,
int fromRoom)
params - an array of data coming from the clientcmd - the cmd name invoked by the clientfromRoom - the id of the room where the user is inu - the User who sent the messagepublic void handleInternalEvent(InternalEventObject ieo)
ieo - the InternalEvent object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||