Skip Headers
Oracle® Java Micro Edition Software Development Kit Developer's Guide
Release 3.2 for Windows
E24265-04
  Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

10 Network Monitoring

MIDP applications, at a minimum, are capable of HTTP network connections, but many other types of network connections are also possible. The network monitor provides a convenient way to see the information your application is sending and receiving on the network. This is helpful if you are debugging network interactions or looking for ways to optimize network traffic.

Networking monitoring works for emulators only (it is not supported for real devices).

10.1 Monitor Network Traffic

Follow these steps to activate the network activity for an application.

  1. In the Projects window right-click on a project and select Profile.

  2. If this is the first time profiling this application you are prompted to integrate the profile with the project. Click Yes to perform the integration.

    In the Profile window, select Network Monitor, and click Run.

    Launch and run the network monitor
    Description of the illustration netmonrun.gif

  3. Start your application.

    When the application makes any type of network connection, information about the connection is captured and displayed in the Network Monitor tab.

    Description of netmon.gif follows
    Description of the illustration netmon.gif

    The top frame displays a list of messages. Click a message to display its details in the bottom frame.

    In the Hex View, message bodies are shown as raw hexadecimal values with the equivalent text. To avoid memory issues, the Hex view is currently limited to 16kB of data.


    Note:

    You can examine messages that are still in the process of being sent. Incomplete messages are indicated by bold highlighting in the message tree.


10.2 Filter or Sort Messages

Filters are useful for examining some subset of the total network traffic.

Time. Messages are sorted in chronological order of time sent or received.

URL. Messages are sorted by URL address. Multiple messages with the same address are sorted by time.

To arrange the message tree in a particular order, click on the Sort By combo box and choose a criteria.


Note:

Sorting parameters are dependent on the message protocol you choose. For example, sorting by time is not relevant for socket messages.


10.3 Save and Load Network Monitor Information

To save your network monitor session, click the blue disk icon at the left of the Network Monitor toolbar.

Click blue save icon on network monitor tool bar

Choose a file name. The default file extension is .nmd (network monitor data).

To load a network monitor session, choose Profile > Java ME > Load Network Monitor Snapshot... and browse to the .nmd file you saved.


Note:

To avoid memory issues, the Hex view display is currently limited to 16kB of data.


10.4 Clear the Message Tree

To remove all inactive protocol records from the network monitor choose the clear icon (the broom icon on the right of the Network Monitor tool bar).