com.ibm.as400.micro

Class MEServer

  • All Implemented Interfaces:
    Runnable


    public class MEServer
    extends Object
    implements Runnable
    The MEServer class is used to fulfill requests from programs that are using the ToolboxME for i5/OS jar file. The MEServer is responsible for creating and invoking methods on Toolbox objects on behalf of the program. The MEServer is intended for use when the client is running on a Tier 0 wireless device.

    If there is already a server active on the specified port, then an MEServer will not be started.

    The MEServer can be run as an application, as follows:

      java com.ibm.as400.micro.MEServer [ options ]
      

    Options:

    -pcml pcml doc1 [;pcml doc2;...]
    Specifies the PCML document to pre-load and parse. This option may be abbreviated -pc.

    The PCML document will be loaded from the classpath. The classpath will first be searched for a serialized document. If a serialized document is not found, the classpath will be searched for a PCML source file.

    Using this option allows the MEServer to load, parse, and cache the ProgramCallDocument before it is used. When a ToolboxME ProgramCall request is made, the MEServer can than use the cached ProgramCallDocument to call the program. If this option is not specified, the PCML will be loaded when the ToolboxME ProgramCall request is made. The PCML will be loaded during runtime and will decrease performance. This option may be abbreviated -pc.

    -port port
    Specifies the port to use for accepting connections from clients. This option may be abbreviated -po. The default port is 3470. This option may be abbreviated -po.
    -verbose [true|false]
    Specifies whether to print status and connection information to System.out. This option may be abbreviated -v.
    -help
    Prints usage information to System.out. This option may be abbreviated -h or -?. The default is not to print usage information.

    Example usage:

    Start the MEServer from the command line as follows:

      java com.ibm.as400.micro.MEServer
      

    • Method Detail

      • main

        public static void main(String[] args)
        Runs the MEServer as an application.
        Parameters:
        args - The command line arguments.
      • run

        public void run()
        Process the datastream from the Tier 0 device.
        Specified by:
        run in interface Runnable