To create server side extensions for SFS 2X several libraries must be added to the project build path. The main archive files required are sfs2x.jar and sfs2x-core.jar. If logging features are needed log4j-1.2.15.jar, slf4j-api-1.5.10.jar and slf4j-log4j12.jar should also be added as external jars. All files are located under the {install-dir}/SFS2X/lib folder.
When writing java files you'll need to include various import statements such as:
import com.smartfoxserver.v2.extensions.SFSExtension;
import com.smartfoxserver.v2.entities.*;
import com.smartfoxserver.v2.core.*;
and the like. Also add "extends SFSExtension" to the declaration of classes that will call the API methods and classes.
http://docs2x.smartfoxserver.com/AdvancedTopics/server-side-extensions
No comments:
Post a Comment