|
Java EE 5 SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.appserv.management.util.jmx.NotificationBuilder
public class NotificationBuilder
Base class for building AMX Notifications. AMX Notifications all place a Map in the userData field. This class takes care of building Notifications with correct time stamp, sequence number, etc. It also enforces certain conventions.
A convenience routine is provided for adding additional fields to the Map--putMapData().
Constructor Summary | |
---|---|
NotificationBuilder(String notificationType,
Object source)
|
Method Summary | ||
---|---|---|
Notification |
buildNew()
Build a new Notification without any values in its Map and no message. |
|
Notification |
buildNew(String message)
Build a new Notification without any values in its Map. |
|
Notification |
buildNewWithMap(String message,
Map<String,Serializable> userDataMap)
Build a new Notification with an existing Map. |
|
String |
getNotificationType()
|
|
Object |
getSource()
|
|
protected long |
nextSequenceNumber()
|
|
protected long |
now()
|
|
static
|
putAllMapData(Notification notif,
Map<String,T> additionalUserData)
Put all key/value pairs into the user data Map. |
|
static void |
putMapData(Notification notif,
String keyToInsert,
Serializable valueToInsert)
Put a single key/value pair into the user data Map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NotificationBuilder(String notificationType, Object source)
Method Detail |
---|
protected long nextSequenceNumber()
public final String getNotificationType()
public final Object getSource()
protected final long now()
public Notification buildNewWithMap(String message, Map<String,Serializable> userDataMap)
public Notification buildNew()
public Notification buildNew(String message)
message
- public static final void putMapData(Notification notif, String keyToInsert, Serializable valueToInsert)
public static final <T extends Serializable> void putAllMapData(Notification notif, Map<String,T> additionalUserData)
|
Java EE 5 SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2006 Sun Microsystems, Inc. All rights reserved.