11.07.2015 Views

System Introspection for System Analysis on Mobile Devices

System Introspection for System Analysis on Mobile Devices

System Introspection for System Analysis on Mobile Devices

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1 2 4 6 8 Listing 6.2: Example of the view c<strong>on</strong>figurati<strong>on</strong> <strong>on</strong> the client - Eachcomp<strong>on</strong>ent has a unique name, a corresp<strong>on</strong>ding element<strong>on</strong> the probe and a local class name.mapping the comp<strong>on</strong>ent threads of the probe to the views of the client a specialTabComp<strong>on</strong>entMap class was created c<strong>on</strong>taining several c<strong>on</strong>figurati<strong>on</strong> lists.The classes list c<strong>on</strong>tains the c<strong>on</strong>necti<strong>on</strong> between a view <strong>on</strong> the client anda comp<strong>on</strong>ent thread or dispatcher <strong>on</strong> the probe. This list is used to <str<strong>on</strong>g>for</str<strong>on</strong>g>wardan incoming message to the intended class by checking the TAG the receivedmessage c<strong>on</strong>tains. The name of a tab is c<strong>on</strong>nected to the corresp<strong>on</strong>ding classvia the tabName list. The tabPositi<strong>on</strong> list is used to define the positi<strong>on</strong> of aview inside the tab navigati<strong>on</strong> bar. These lists can be defined in the c<strong>on</strong>figurati<strong>on</strong>file placed <strong>on</strong> the file system of the client. Listing 6.2 shows an exampleof the view c<strong>on</strong>figurati<strong>on</strong> inside the c<strong>on</strong>figurati<strong>on</strong> file.ReSAIDroid - Starting the Applicati<strong>on</strong>The entry point of the client <strong>on</strong> the mobile device is the ReSAIDroid classpresenting the initial view. This view allows to c<strong>on</strong>figure parameters needed<str<strong>on</strong>g>for</str<strong>on</strong>g> the communicati<strong>on</strong> by providing corresp<strong>on</strong>ding input (Figure 6.6). Atthe bottom of the view a status field displays in<str<strong>on</strong>g>for</str<strong>on</strong>g>mati<strong>on</strong> about c<strong>on</strong>necti<strong>on</strong>state and errors that occurred. The ReSAIDroid class creates an instance ofthe XmppCommunicator which establishes the c<strong>on</strong>necti<strong>on</strong> to the probe. Whenexecuting the login process, the c<strong>on</strong>necti<strong>on</strong> to the communicati<strong>on</strong> server isinitialized and the client executes the login process with the given parameters.If the c<strong>on</strong>necti<strong>on</strong> is established the client sends a c<strong>on</strong>nect command to theprobe. A timer m<strong>on</strong>itors the communicator <str<strong>on</strong>g>for</str<strong>on</strong>g> answers of the probe. Whenthe probe acknowledges the c<strong>on</strong>necti<strong>on</strong> the beac<strong>on</strong> is started in background andthe current view switches to the TabManager. If the probe is not resp<strong>on</strong>ding thec<strong>on</strong>necti<strong>on</strong> attempt is canceled and an error message is displayed in the statusfield. Once the c<strong>on</strong>necti<strong>on</strong> is successfully established, the given parametersfrom the different inputs are saved to a local file <str<strong>on</strong>g>for</str<strong>on</strong>g> further c<strong>on</strong>necti<strong>on</strong>s.44

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!