FileDocCategorySizeDatePackage
NotificationStringifier.javaAPI DocGlassfish v2 API4004Fri May 04 22:25:02 BST 2007com.sun.cli.util.stringifier

NotificationStringifier

public class NotificationStringifier extends Object implements Stringifier

Fields Summary
public static NotificationStringifier
DEFAULT
protected Options
mOptions
Constructors Summary
public NotificationStringifier()

		mOptions	= new Options();
	
public NotificationStringifier(Options options)

		mOptions	= options;
	
Methods Summary
protected java.lang.StringBuffer_stringify(javax.management.Notification notif)

		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, notif.getSource() );
		}

		if ( mOptions.mIncludeType )
		{
			append( b, notif.getType() );
		}

		if ( mOptions.mIncludeUserData )
		{
			append( b, notif.getUserData() );
		}
		
		return( b );
	
protected voidappend(java.lang.StringBuffer b, java.lang.Object o)

		if ( b.length() != 0 )
		{
			b.append( mOptions.mDelim );
		}
		
		b.append( SmartStringifier.toString( o ) );
	
public java.lang.Stringstringify(java.lang.Object o)

		final Notification	notif	= (Notification)o;
		
		return( _stringify( notif ).toString() );