MCPcopy Create free account
hub / github.com/akeranen/the-one / processEvent

Method processEvent

gui/EventLogPanel.java:234–259  ·  view source on GitHub ↗

Processes a log event @param check EventLogControls used to check if this entry type should be shown and/or paused upon @param name Text description of the event @param host1 First host involved in the event (if any, can be null) @param host2 Second host involved in the event (if any, can be null) @

(EventLogControl check, final String name,
			final DTNHost host1, final DTNHost host2, final Message message)

Source from the content-addressed store, hash-verified

232 * @param message The message involved in the event (if any, can be null)
233 */
234 private void processEvent(EventLogControl check, final String name,
235 final DTNHost host1, final DTNHost host2, final Message message) {
236 String descString; // String format description of the event
237
238 if (!check.showEvent()) {
239 return; // if event's "show" is not checked, won't pause either
240 }
241
242 descString = name + " " +
243 (host1!=null ? host1 : "") +
244 (host2!= null ? (HOST_DELIM + host2) : "") +
245 (message!=null ? " " + message : "");
246
247 if (regExp != null && !descString.matches(regExp)){
248 return; // description doesn't match defined regular expression
249 }
250
251 if (check.pauseOnEvent()) {
252 gui.setPaused(true);
253 if (host1 != null) {
254 gui.setFocus(host1);
255 }
256 }
257
258 addEvent(name, host1, host2, message, check.pauseOnEvent());
259 }
260
261 // Implementations of ConnectionListener and MessageListener interfaces
262 public void hostsConnected(DTNHost host1, DTNHost host2) {

Callers 7

hostsConnectedMethod · 0.95
hostsDisconnectedMethod · 0.95
messageDeletedMethod · 0.95
messageTransferredMethod · 0.95
newMessageMethod · 0.95

Calls 5

addEventMethod · 0.95
showEventMethod · 0.80
pauseOnEventMethod · 0.80
setFocusMethod · 0.80
setPausedMethod · 0.45

Tested by

no test coverage detected