KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > corbaclient > actions > Disconnect


1 package org.enhydra.shark.corbaclient.actions;
2
3 import java.awt.event.*;
4
5
6 import org.enhydra.shark.corbaclient.*;
7
8 /**
9  * Class that realizes <B>disconnect</B> action.
10  *
11  * @author Sasa Bojanic
12  * @version 1.0
13  */

14 public class Disconnect extends ActionBase {
15
16    public Disconnect (SharkClient workflowClient) {
17       super(workflowClient);
18    }
19
20    public void actionPerformed(ActionEvent e) {
21       SharkClient workflowClient=(SharkClient)actionPanel;
22       try {
23          workflowClient.onDisconnectOrShutdown();
24 // workflowClient.getService().disconnect();
25
// workflowClient.getExecAmin().disconnect();
26
workflowClient.setService(null);
27          workflowClient.setUsername(null);
28          workflowClient.clearComponents();
29       } catch (Exception JavaDoc ex) {
30          //System.out.println("Haven't been connected");
31
}
32    }
33 }
34
35
Popular Tags