Access Zone Level Extension from Room Level Extension

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Secretmapper
Posts: 7
Joined: 06 Nov 2013, 06:38

Access Zone Level Extension from Room Level Extension

Postby Secretmapper » 07 Nov 2013, 14:13

Hey guys!

So, I just started out with SFS. Love everything so far, except that the client API for AS3 is nuts for Flash Develop (LZMA compression).

Anyway, I want to have a room extension to handle the game, and a zone level extension to have in-memory database. Yeah, yeah, there are better options, [memcached, etc.] but right now this is just proof of concept. Thinking about it though since extensions are just jars/handlers, I guess this is not really possible, without writing an API.

Is there any good, easy way to this? Basically I just want to have shared data between my room extensions.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Access Zone Level Extension from Room Level Extension

Postby Bax » 08 Nov 2013, 09:12

On the Room Extension you have the getOwnerRoom() method to retrieve the Room it belongs to.
On the Room object you have the getZone() method to retrieve the Zone to which the Room belongs.
On the Zone object you have the getExtension() method to retrieve the Zone Extension.
Using this path you will be able to make the Room and Zone Extensions communicate.
Paolo Bax
The SmartFoxServer Team

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 35 guests