|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.gotoandplay.smartfoxserver.extensions.AbstractExtension
public abstract class AbstractExtension
AbstractExtension is the parent class for all SmartFoxServer extensions
Field Summary | |
---|---|
it.gotoandplay.smartfoxserver.extensions.AdminExtension |
adminExtension
|
Constructor Summary | |
---|---|
AbstractExtension()
|
Method Summary | |
---|---|
void |
destroy()
|
java.lang.String |
getOwnerRoom()
Get the name of the room where the extension is attached to (if any) |
java.lang.String |
getOwnerZone()
Get the name of the zone where the extension is attached to |
void |
handleRequest(java.lang.String cmd,
org.json.JSONObject jso,
User u,
int fromRoom)
Basic implementation of interface method Needed to avoid breaking extensions of version 1.4.0 and previous which only handle XML or String requests |
void |
init()
|
boolean |
isActive()
Returns true if the extension is active |
net.n3.nanoxml.IXMLElement |
loadConfig(java.lang.String xmlFile)
|
void |
registerForEvents(java.lang.String zoneName,
java.lang.String roomName)
|
void |
sendResponse(ActionscriptObject ao,
int fromRoom,
User sender,
java.util.LinkedList recipients)
Send a response to one or more clients using XML format |
void |
sendResponse(org.json.JSONObject jso,
int fromRoom,
User sender,
java.util.LinkedList recipients)
Send a response to one or more clients using JSON format |
void |
sendResponse(java.lang.String[] params,
int fromRoom,
User sender,
java.util.LinkedList recipients)
Send a response to one or more clients using String format |
void |
setActive(boolean b)
|
void |
setOwner(java.lang.String zoneName,
java.lang.String roomName)
|
void |
trace(java.lang.String msg)
Trace the message remotely to admin tool and to the console |
void |
unRegister()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface it.gotoandplay.smartfoxserver.extensions.ISmartFoxExtension |
---|
handleRequest, handleRequest |
Methods inherited from interface it.gotoandplay.smartfoxserver.events.IEventListener |
---|
handleInternalEvent |
Field Detail |
---|
public it.gotoandplay.smartfoxserver.extensions.AdminExtension adminExtension
Constructor Detail |
---|
public AbstractExtension()
Method Detail |
---|
public void setOwner(java.lang.String zoneName, java.lang.String roomName)
setOwner
in interface it.gotoandplay.smartfoxserver.events.IEventListener
public java.lang.String getOwnerZone()
getOwnerZone
in interface it.gotoandplay.smartfoxserver.events.IEventListener
public java.lang.String getOwnerRoom()
getOwnerRoom
in interface it.gotoandplay.smartfoxserver.events.IEventListener
public void init()
init
in interface it.gotoandplay.smartfoxserver.extensions.ISmartFoxExtension
public void destroy()
destroy
in interface it.gotoandplay.smartfoxserver.extensions.ISmartFoxExtension
public boolean isActive()
isActive
in interface it.gotoandplay.smartfoxserver.extensions.ISmartFoxExtension
public void setActive(boolean b)
setActive
in interface it.gotoandplay.smartfoxserver.extensions.ISmartFoxExtension
public void registerForEvents(java.lang.String zoneName, java.lang.String roomName)
registerForEvents
in interface it.gotoandplay.smartfoxserver.extensions.ISmartFoxExtension
public void unRegister()
unRegister
in interface it.gotoandplay.smartfoxserver.extensions.ISmartFoxExtension
public void trace(java.lang.String msg)
msg
- the string message to tracepublic net.n3.nanoxml.IXMLElement loadConfig(java.lang.String xmlFile)
public void handleRequest(java.lang.String cmd, org.json.JSONObject jso, User u, int fromRoom)
handleRequest
in interface it.gotoandplay.smartfoxserver.extensions.ISmartFoxExtension
public void sendResponse(ActionscriptObject ao, int fromRoom, User sender, java.util.LinkedList recipients)
sendResponse
in interface it.gotoandplay.smartfoxserver.extensions.ISmartFoxExtension
ao
- the ActionscriptObject containing the data for the clientfromRoom
- the roomId (-1 for none)recipients
- a list of SocketChannelssender
- the User object of the sender (if null, the sender is the Server)public void sendResponse(java.lang.String[] params, int fromRoom, User sender, java.util.LinkedList recipients)
sendResponse
in interface it.gotoandplay.smartfoxserver.extensions.ISmartFoxExtension
params
- an array of String paramsfromRoom
- the roomId (-1 for none)recipients
- a list of SocketChannelssender
- the User object of the sender (if null, the sender is the Server)public void sendResponse(org.json.JSONObject jso, int fromRoom, User sender, java.util.LinkedList recipients)
sendResponse
in interface it.gotoandplay.smartfoxserver.extensions.ISmartFoxExtension
jso
- a JSONObjectfromRoom
- the roomId (-1 for none)recipients
- a list of SocketChannelssender
- the User object of the sender (if null, the sender is the Server)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |