LifeCycleEventFactorypublic final class LifeCycleEventFactory extends EventAbstractFactory
Fields Summary |
---|
private static final LifeCycleEventFactory | instance |
Constructors Summary |
---|
private LifeCycleEventFactory()
super();
EventBuilder.getInstance().addEventFactory(EVENT_LIFECYCLE, this);
try {
LifeCycleImpl impl = (LifeCycleImpl) getMBeanServer().instantiate(
"com.sun.enterprise.admin.selfmanagement.event.LifeCycleImpl");
getMBeanServer().registerMBean(impl,LifeCycleEvent.getLifeCycleImplObjectName());
} catch (javax.management.ReflectionException rex) {
_logger.log(Level.WARNING,"smgt.internal_error", rex);
} catch (javax.management.InstanceAlreadyExistsException iex) {
_logger.log(Level.WARNING,"smgt.internal_error", iex);
} catch (Exception ex) {
_logger.log(Level.WARNING,"smgt.internal_error", ex);
}
|
Methods Summary |
---|
static com.sun.enterprise.admin.selfmanagement.event.LifeCycleEventFactory | getInstance()
return instance;
| public Event | instrumentEvent(com.sun.enterprise.config.serverbeans.ElementProperty[] properties, java.lang.String description)
String eventName = null;
for( int i = 0; i < properties.length; i++ ){
ElementProperty property = properties[i];
String propertyName = property.getName( ).toLowerCase( );
if( propertyName.equals(PROPERTY_LIFECYCLE_NAME)) {
eventName = "lifecycle." + property.getValue( ).toLowerCase( );
if (!LifeCycleEvent.isValidType(eventName))
throw new IllegalArgumentException(
sm.getString("name","selfmgmt_event.invalid_event_property","lifecycle"));
}
}
return new LifeCycleEvent(eventName, new LifeCycleNotificationFilter(eventName), description);
|
|