Previous ION Java User's Guide: ION Java Class and Method Reference Next

IONDisconnection()

If registered, the IONDisconnection() method is called when the connection between the client and the server is broken to report the reason for disconnection.

Syntax

public abstract void IONDisconnection(int iStatus)

Arguments

iStatus

An integer corresponding to the reason for the disconnection. These are defined by the constants mentioned in the previous section.

Exceptions

None

Example

import javax.swing.*;  
import java.io.*;  
import java.net.*;  
import com.itt.ion.*;    
  
public class disconnectEx extends JApplet   
                          implements IONDisconnectListener {  
  
  IONGrConnection ionCon;  
  IONGrDrawable iondraw;  
  
  public void init() {  
    ionCon=new IONGrConnection();  
    ionCon.addIONDisconnectListener(this);  
  
    // connect to server and do ION commands  
  }  
  
public void IONDisconnection(int iStatus) {  
    if (iStatus != IONDisconnectListener.ION_DIS_OK)  
       System.out.println("ION disconnection error.");  
  
    // do anything else to clean-up  
  
  }  
}  
  

  IDL Online Help (March 06, 2007)