Before you can run the sample, you must first import the sample into your workspace and launch the test runtime.
Follow these steps:
Parent topic: Network status/fault
- To import the sample:
- Select File > Import.
- From the Import Wizard, select General and then select Existing Projects into Workspace. Click Next.
- Select the Archive file radio button.
- Enter the name of the sample jar file, netstatus.jar, or browse to the com.ibm.rcp.tools.samplegallery2 plug-in directory and select the jar file from the archive directory.
- The dialog shows the projects present in the archive jar file. Select Finish to install the projects into your workspace.
- To launch the test runtime:
- Select Run > Run Configurations... from the main menu.
- Select Client Services and click New.
- Type a unique name for your configuration, such as Network Status Application.
- Select the Plug-ins tab and verify that the com.ibm.rcp.samples.netstat.time plug-in is selected.
- Select the Arguments tab and verify that –console is in the Program Arguments field.
- Click Apply and then Run to launch the Lotus® Expeditor workbench.
- To start the sample in the Lotus Expeditor workbench, click Open and then click Net Status Sample.
Running the sample
This sample contributes a new perspective, named Net Status Sample Perspective
, to the Lotus
This perspective contains the Net Status
- In response to selecting the Check button, the Time field displays the network time determined based on a connection to http://www.ibm.com or the local system time (if there is no active connection to the remote resource). If the connection is online, the field shows the following message:
- If the connection is offline, the field shows the following message:
- In both cases, <time> is displayed in a format appropriate to the current locale.
- The Network Status field provides the status of the network connection http://www.ibm.com. To generate a network fault, disconnect the client from http://www.ibm.com (for example, remove your network cable). Next, select Check to generate a network fault that results in the following messages:
<date and time> disconnected
<date and time> offlineStateChanged
When you reconnect to http://www.ibm.com
(for example, reinsert your network cable), the field shows the following messages:
<date and time> reconnected
<date and time> offlineStateChanged
where <date and time>
is displayed in a format appropriate to the current locale.
to clear the messages in the Network Status
The sample application is not available in the launch list.Cause:
The com.ibm.rcp.samples.netstat.time plug-in is not present or does not resolve in the client platform.Action:
Verify that the com.ibm.rcp.samples.netstat.time plug-in is contained in the runtime. If the plug-in is present, check the status of the plug-in. Go to the Console view and use the b com.ibm.rcp.samples.netstat.time command. The second line of output indicates the plug-in status. If the status is not RESOLVED or ACTIVE, there is a problem with the plug-in and its dependencies. Use the diag com.ibm.rcp.samples.netstat.time command to identify any unsatisfied dependencies. Resolve any missing dependencies and restart the platform.Problem:
The network fault is not generated for disconnection or reconnection.Cause:
The computer does not immediately detect that there is a disconnection or re-connection to http://www.ibm.com
Wait for several seconds after you disconnect your computer from the network and then select Check in the Time View to generate a network fault for disconnection. Wait for several seconds after you reconnect your computer to the network and then look for the reconnected message in the Net Status field.