final StringBuffer b = new StringBuffer();
if ( mOptions.mIncludeSequenceNumber )
{
append( b, "#" + notif.getSequenceNumber() );
}
if ( mOptions.mIncludeTimeStamp )
{
append( b, new Date( notif.getTimeStamp() ) );
}
if ( mOptions.mIncludeObjectName )
{
append( b, StringUtil.quote( notif.getSource() ) );
}
if ( mOptions.mIncludeType )
{
append( b, notif.getType() );
}
if ( mOptions.mIncludeUserData )
{
append( b, StringUtil.quote( notif.getUserData() ) );
}
if ( notif instanceof MBeanServerNotification )
{
// this should really be done in a MBeanServerNotificationStringifier!
final MBeanServerNotification n = (MBeanServerNotification)notif;
append( b, StringUtil.quote( n.getMBeanName() ) );
}
return( b );