Java Connector

 Alinous-Core is written in Java programming language. So Alinous-Core can load Java Classes directly.

In this section, I'll show you how to make and use it. You can learn it from the sample porject of JavaConnector.

Learn JavaConnector with the sample project

 The Alinous-Core has a sample project to learn JavaConnector.

Architecture of Java Connector

 The Java functions are probyded by a Java Class which contains functions to export into Alinous-Core.

The Alinous-Core server load jar files and resources in the "ALINOUS_HOME/lib/" folder.

jar folder

Alinous-Core Class loader's operation

The Alinous-Core has own Classloader, and after loaded the folder's jar file, it does operations below.

  1. Load jar File
  2. Load all class
  3. Detect classes which implements IAlinousFunction interface
  4. Create a instance of the classes which implement the interface

Number of the instance of the Function Classes

 The Alinous-Core class loader automatically create instance of the Class which implements the IAlinousFunction interface. The number of the instance is only one.

 Therefor when you implement the Java connector class, you have to think the class's instance become a singleton instance.

Updateing jar files

 When you run the server and jar files in the "ALINOUS_HOME/lib/" folder are changed, the class loader dispose all loaded class and the instances.

After dispose all of them, reload the "ALINOUS_HOME/lib/" folder.

Go to Top