The INDI for Java Server library implements a basic but functional INDI Server. It is included in the server download file. In the following its usage and functions is described.

 

  Launching the Server

Once the INDI for Java Server library file is uncompress you should see a dist directory. There you can launch the basic server with the following command:

$ java -jar I4JServer.jar

If everything is working you should see a message similar to:

INDI for Java Basic Server initializing...
Type 'help' for help.
Listening to port 7624

 

  Commands that can be used in the Server

The server will wait for some commands to be executed. In the following the possible commands that can be used are listed:

  • help - shows a help message with all the available commands.
  • list - lists all the drivers loaded by the server.
  • add jarFile - Loads all (if any) of the INDI for Java Drivers included in the jarFile.
  • remove jarFile - Removes all (if any) of the INDI for Java Drivers included in the jarFile.
  • reload jarFile - Reloads all (if any) of the INDI for Java Drivers included in the jarFile. This is equivalent to remove and then add the jarFile.
  • addn driverPath - Loads the Native Driver driverPath.
  • removen driverPath - Removes the Native Driver driverPath.
  • reloadn driverPath - Reloads the Native Driver driverPath. This is equivalent to removen and then addn the driverPath.
  • connect host[:port] - Connects to a remote INDI Server and loads its Drivers.
  • disconnect host[:port] - Disconnects from a remote INDI Server and removes its Drivers.

 

  Available Arguments

The server can be launched with the following optional arguments:

  • -help - Shows a help message about the available arguments of the Server.
  • -p=port - The port to which the Server will listen.
  • -add=jarFile - Loads all (if any) of the INDI for Java Drivers included in the jarFile.
  • -addn=driverPath - Loads the Native Driver driverPath.
  • -connect=host[:port] - Connects to a remote INDI Server and loads its Drivers.