EventBuilderpublic class EventBuilder extends Object
Fields Summary |
---|
private static final EventBuilder | instance | private static final ConcurrentHashMap | eventFactoryMap | private boolean | initialized | protected static final com.sun.enterprise.util.i18n.StringManager | sm |
Constructors Summary |
---|
private EventBuilder()Creates a new instance of EventBuilder
|
Methods Summary |
---|
public synchronized void | addEventFactory(java.lang.String eventType, EventAbstractFactory factory)
if ( eventFactoryMap.get( eventType ) == null)
eventFactoryMap.put(eventType, factory);
| public Event | getEvent(java.lang.String eventType, com.sun.enterprise.config.serverbeans.ElementProperty[] properties, java.lang.String description)Given an event type, an event is returned. As of now, supported events
are "log","monitor","lifecycle","notification" and "timer" in PE and
in addition "gms" in EE.
// guarantee that it's initialized
// (better than before, but an ugly solution)
Initer.getIniter();
final EventAbstractFactory factory = eventFactoryMap.get( eventType );
if( factory == null ) {
throw new IllegalArgumentException(
sm.getString("selfmgmt_event.unknown_event_type",eventType));
}
return factory.instrumentEvent(properties, description);
| public Event | getEvent(java.lang.String eventType, java.lang.String description, java.util.Hashtable attributes, com.sun.enterprise.config.serverbeans.ElementProperty[] properties)
return getEvent(eventType,properties, description);
| public static com.sun.enterprise.admin.selfmanagement.event.EventBuilder | getInstance()
return instance;
|
|