org.echarts.servlet.sip
Class SipMessageEvent

java.lang.Object
  extended by org.echarts.monitor.MachineMonitorEvent
      extended by org.echarts.servlet.sip.SipMessageEvent
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
SipInputEvent, SipOutputEvent

public class SipMessageEvent
extends MachineMonitorEvent

Monitor event corresponding to SIP message I/O.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.echarts.monitor.MachineMonitorEvent
hostIpAddress, properties, timestamp
 
Method Summary
 java.lang.String toString()
          Separate fields with tabs.
 
Methods inherited from class org.echarts.monitor.MachineMonitorEvent
getClassString, getHostAddress, getPropertiesString, getSortedKeys, readExternal, readRaw, replaceChar, writeExternal, writeRaw
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public java.lang.String toString()
Description copied from class: MachineMonitorEvent
Separate fields with tabs. Trim event class name to exclude event class package. Every event is logged as a single record in the event log. The log entries have the following structure:

  formattedTimestamp "\t" timestamp "\t" IPaddressOfEventCreatorHost "\t" eventClassName "\t" propName1={value1} "\t" propName2={value2} "\t" ...
  

Property values are formatted by replacing the certain characters with substrings as follows:


  --------------------------
  Character     Substitution
  --------------------------
  '\n'            
  '\r'            
  '\t'            
  '{'             
  '}'             
  --------------------------

  

Newlines (or '\r\n' pairs) must be replaced because the log entry must be contained within a single record in the file. Tabs are field separators, hence, embedded tab characters must be substituted. Curly braces are used to denote the start and end of a property value, and therefore they must be substituted if they should occur with a property value.

Most property values will not need any reformatting, and for those that do, it will be most likely just '\n' or '\r\n'.

Should the IP Address of the host that created the event not be available, then the placeholder string, "<host unknown>" will appear instead.

Overrides:
toString in class MachineMonitorEvent