Methods Summary |
---|
public static void | addApplicationDeployEventListener(ApplicationDeployEventListener listener)Add an event listener of type ApplicationDeployEventListener to the
registry. Once registered using this method, an
ApplicationDeployEventListener receives all subsequent
ApplicationDeployEvents.
AdminEventMulticaster.addListener(ApplicationDeployEvent.eventType, listener);
|
public static void | addAuditModuleEventListener(AuditModuleEventListener listener)Add a listener for AuditModuleEvent
AdminEventMulticaster.addListener(
AuditModuleEvent.eventType, listener);
|
public static void | addAuthRealmEventListener(AuthRealmEventListener listener)Add a listener for AuthRealmEvent
AdminEventMulticaster.addListener(
AuthRealmEvent.eventType, listener);
|
public static void | addBaseDeployEventListener(BaseDeployEventListener listener)Add an event listener of type BaseDeployEventListener to the registry.
Once registered using this method, a BaseDeployEventListener receives
all subsequent BaseDeployEvents.
AdminEventMulticaster.addListener(BaseDeployEvent.eventType, listener);
|
public static void | addConfigChangeEventListener(ConfigChangeEventListener listener)Add an event listener of type ConfigChangeEventListener to the registry.
Once registered using this method, a ConfigChangeEventListener receives
all subsequent ConfigChangeEvents.
AdminEventMulticaster.addListener(ConfigChangeEvent.eventType, listener);
|
public static void | addConfigChangeEventListener(ConfigChangeCategory category, ConfigChangeEventListener listener)Add a listener for ConfigChangeEvent that is invoked only if any of
the config attributes as defined by ConfigChangeCategory have been
changed.
AdminEventMulticaster.addListener(ConfigChangeEvent.eventType, category,
listener);
|
public static void | addEjbTimerEventListener(EjbTimerEventListener listener)Add a listener for EjbTimerEvent
AdminEventMulticaster.addListener(
EjbTimerEvent.eventType, listener);
|
public static void | addElementChangeEventListener(ElementChangeEventListener listener)Add a listener for ElementChangeEvent
AdminEventMulticaster.addListener(
ElementChangeEvent.eventType, listener);
|
public static void | addEventListener(java.lang.String eventType, AdminEventListener listener)Add a listener for AdminEvent
validateRegistration(eventType, listener);
AdminEventMulticaster.addListener(
eventType, listener);
|
public static void | addLogLevelChangeEventListener(LogLevelChangeEventListener listener)Add a listener for LogLevelChangeEvent
AdminEventMulticaster.addListener(
LogLevelChangeEvent.eventType, listener);
|
public static void | addModuleDeployEventListener(ModuleDeployEventListener listener)Add an event listener of type ModuleDeployEventListener to the registry.
Once registered using this method, a ModuleDeployEventListener receives
all subsequent ModuleDeployEvents.
AdminEventMulticaster.addListener(ModuleDeployEvent.eventType, listener);
|
public static void | addMonitoringEventListener(MonitoringEventListener listener)Add an event listener of type MonitoringEventListener to the registry.
Once registered using this method, a MonitoringEventListener receives
all subsequent MonitoringEvents.
AdminEventMulticaster.addListener(MonitoringEvent.eventType, listener);
|
public static void | addMonitoringLevelChangeEventListener(MonitoringLevelChangeEventListener listener)Add a listener for MonitoringLevelChangeEvent
AdminEventMulticaster.addListener(
MonitoringLevelChangeEvent.eventType, listener);
|
public static void | addResourceDeployEventListener(ResourceDeployEventListener listener)Add an event listener of type ResourceDeployEventListener to the
registry. Once registered using this method, a
ResourceDeployEventListener receives all subsequent ResourceDeployEvents.
AdminEventMulticaster.addListener(ResourceDeployEvent.eventType, listener);
|
public static void | addSecurityServiceEventListener(SecurityServiceEventListener listener)Add a listener for SecurityServiceEvent
AdminEventMulticaster.addListener(
SecurityServiceEvent.eventType, listener);
|
public static void | addShutdownEventListener(ShutdownEventListener listener)Add a listener for ShutdownEvent
AdminEventMulticaster.addListener(ShutdownEvent.eventType, listener);
|
public static void | addUserMgmtEventListener(UserMgmtEventListener listener)Add a listener for UserMgmtEvent
AdminEventMulticaster.addListener(
UserMgmtEvent.eventType, listener);
|
public static void | removeEventListener(AdminEventListener listener)Remove specified event listener from event registry.
AdminEventMulticaster.removeListener(listener);
|
private static void | validateRegistration(java.lang.String eventType, AdminEventListener listener)
if ( (eventType == null) || (listener == null)) {
String msg = localStrings.getString("admin.null_not_supported");
throw new IllegalArgumentException(msg);
}
// Expected listener interface class
Class listenerImplClass = (Class) listenerMap.get(eventType);
if (listenerImplClass == null) {
// event type is not valid or not supported.
String msg = localStrings.getString("admin.event.invalid_event_type" , eventType);
throw new IllegalArgumentException(msg);
}
// get the interfaces of the passed in class
Class[] classes = listener.getClass().getInterfaces();
if (classes == null) {
String msg = localStrings.getString("admin.event.does_not_implement" ,listener.getClass().getName());
throw new IllegalArgumentException(msg);
}
boolean found = false;
// go through all interface names
for(int i=0; i< classes.length; i++) {
String cName = classes[i].getName();
if (cName != null ) {
// compare interface name to expected interface name
if (cName.equals(listenerImplClass.getName() )){
found = true;
break;
}
}
}
if(!found) {
String msg = localStrings.getString("admin.event.not_compatible",
eventType,listenerImplClass.getName(),
listener.getClass().getName()) ;
throw new IllegalArgumentException();
}
|