Nebulae MutiUser Server NEBULAE MUTIUSER SERVER HELP: SERVER SIDE SCRIPTING  
 

Tabuleiro Nebulae MultiUser Server version 1.1 introduced a powerful new feature: Java server side scripting. This opened Nebulae for deep customization, allowing the developer to extend the server in almost any way. Server side scripts can implement connection to databases, web servers, mail programs and almost any piece of software that can be accessed by a java application.

Server side scripts are an advanced feature in Nebulae. A good understanding of the Java language is absolutely required, and developers need access to a Java development environment in order to test and compile their server side script classes. Server side scripts are actually compiled Java .class files, mapped to Nebulae movies using the scriptmap.cfg file.

 

Scriptmap.cfg file configuration

 

A server side script class is loaded by Nebulae when a movie is created on the server and it matches the name of a movie configured in the scriptmap table. Each server side script is a compiled Java Class that extends the ServerSideScript class, defined in the Nebulae server side scripting API. The methods inherited from the ServerSideScript class allow the script to be called by Nebulae when a message with the subject "system.script.*" is received by the server. ServerSideScripts also implement the ServerUser interface, so they can join movies and groups and send messages as if they were an user connected to the Nebulae server.

The Nebulae server side scripting API is documented in javadoc format. Classes are provided for conversion between Java types and native Lingo values (LValues), and to encapsulate the Shockwave MultiUser Server message protocol. An effort has been made to provide interfaces that match the Server Object Model defined by Macromedia for SMUS 3. Java developers should probably start by examining the ServerObject, ServerMovie, ServerGroup and ServerUser interfaces.

Nebulae scripting API also exposes interfaces to the ServerUserDatabase and SQLGateway objects used by the server, so scripts can interact directly with databases and return results to connected users as native Lingo types, represented by LValues in the Nebulae API. Almost all aspects of the server can be accessed by a ServerSideScript class, including every movie, group or user connected.

The best way to learn the Nebulae Server Side Scripting API is to download some sample code and study the documentation provided. The technotes area at xtras.tabuleiro.com contains more information about server side scripting with Nebulae, including sample server side scripts that you can study, modify and use in your server.

DISCLAIMER: Tabuleiro technical support will be able to assist you with questions specific to the Nebulae API and overall design of the interfaces, but we can not write or debug Java code specifically for you. Please consult the SUPPORT POLICIES page at out web site for more information about our standard support policies.