com.ibm.as400.micro
Class AS400

java.lang.Object
  extended by com.ibm.as400.micro.AS400

public final class AS400
extends Object

The AS400 class represents a sign-on to the IBM i host servers from a wireless device. This class provides a modified subset of the functions available in com.ibm.as400.access.AS400.

The following example demonstrates the use of AS400:

  AS400 system = new AS400("mySystem", "myUserid", "myPwd", "myMEServer");
  try
  {
      system.connect();
  }   
  catch (Exception e)
  {
      // Handle the exception
  }
  // Done with the system object.
  system.disconnect();
  

See Also:
AS400

Constructor Summary
Constructor and Description
AS400(String systemName, String userId, String password, String MEServer)
          Constructs an AS400 object.
 
Method Summary
Modifier and Type Method and Description
 boolean connect()
          Connect to an IBM i system.
 void disconnect()
          Disconnects the client from the MEServer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AS400

public AS400(String systemName,
             String userId,
             String password,
             String MEServer)
Constructs an AS400 object.

Parameters:
systemName - The name of the system.
userId - The user ID to use to connect to the system.
password - The password to use to connect to the system.
MEServer - The system name and port of the ME server in the format serverName[:port]. If no port is specified, the default will be used.
Method Detail

disconnect

public void disconnect()
Disconnects the client from the MEServer. All socket connections associated with this object will be closed.


connect

public boolean connect()
                throws IOException,
                       MEException
Connect to an IBM i system.

A connection is typically made implicitly; therefore, this method does not have to be called to connect to the system. This method can be used to control when the connection is established.

Throws:
IOException - If an error occurs while communicating with the system.
MEException - If an error occurs while processing the ToolboxME request.