org.jboss.mx.util
public class: JBossNotificationBroadcasterSupport [javadoc |
source]
java.lang.Object
org.jboss.mx.util.JBossNotificationBroadcasterSupport
All Implemented Interfaces:
NotificationEmitter
Direct Known Subclasses:
ClientUserTransactionService, ScheduleManager, DelayInterceptor, TestDeployerC, SystemPropertiesService, SpringDeployer, JBossMessageEndpointFactory, FarmMemberService, ObjectModelFactorySimpleSubDeployerSupport, Log4jSocketServer, JRMPProxyFactory, BrokenDeployer, ResourceAdapter, TransactionManagerService, CMPInMemoryPersistenceManager, Target, DBScheduleProvider, InterruptTest, LinkRefPairService, JettyService, URLDeploymentScanner, StatefulSessionContainer, ClusteredHTTPSessionService, ServerILJMXService, TableCache, ListenerServiceMBeanSupport, ManagedConnectionFactoryDeployment, SecuredService, ThresholdMonitor, TestDeployerD, ResourceAdapterModule, SRPVerifierStoreService, MIB2SystemGroupService, PreferredMasterElectionPolicy, StatelessSessionInstancePool, CastorJDOImpl, NoTxConnectionManager, BarrierController, PluginManager, RARDeployment, JCAManagedConnectionFactory, SubDeployerInterceptorSupport, ExternalContext, ServiceController, JBossAlertListener, CounterService, JGCacheInvalidationBridge, SecurityConfig, InterceptorServiceMBeanSupport, HAManagementService, SARDeployer, JDBCDataSource, IIOPInvoker, AbstractWebContainer, HAILServerILService, HttpInvokerHA, SRPService, DLQHandler, EJBDeployer, EJB, HANotificationBroadcasterClientExample, Log4jService, EmbeddedCatalinaService41, HASingletonControllerTester, ActiveAlarmTable, UUIDKeyGeneratorFactoryService, XMLAdaptorService, StringThresholdMonitor, DeploymentService, MessageCache, JMSProviderLoader, ConnectorFactoryService, DestinationMBeanSupport, RARDeployment, StatefulSessionInstancePool, SessionBean, MessageDrivenBean, JCAResource, HAService, SecurityConfig, AbstractInstancePool, HAServiceMBeanSupport, JaasSecurityManagerService, HttpProxyFactory, UnifiedInvoker, OILServerILService, RMIAdaptorService, ProxyFactoryHA, JARDeployer, Barrier, WrapperDataSourceService, WebModule, BaseConnectionManager2, JDBCResource, ClasspathExtension, EJBModule, SubDeployerSupport, J2EEDeployedObject, J2EEApplication, CorbaNamingService, AttributePersistenceService, AdminObject, ClazzTest, HASingletonElectionPolicySimple, PersistenceManager, TopologyMonitorService, JTAResource, StatisticsCollector, HASingletonElectionPolicyBase, TimerService, JMSCacheInvalidationBridge, Servlet, ODMGFactory, Starter, RMIServerILService, J2EEManagedObject, XATxConnectionManager, SchedulableMBeanExample, URLResource, PersistenceManager, ClientDeployer, ServerSessionPoolLoader, CacheReportGenerator, FoeDeployer, BeanShellSubDeployer, MessageCache, NamingAlias, PingJndi, TableReportGenerator, EjbModule, AbstractStateManager, EntityBean, EARDeployer, RARDeployer, TestMBClassLoader, HANamingService, ServiceModule, Test, MSSQLPersistenceManager, LoadbalancerService, J2EEServer, JBossMonitor, JVM, ContainerRelection, LogInterceptor, J2EEModule, SessionContainer, EmbeddedCatalinaServiceSX, DeploymentCache, URLDirectoryScanner, XMLScheduleProvider, EmbeddedTomcatService, DataSourceInterceptor, MessageDrivenInstancePool, J2EEResource, J2EEDomain, RMI_IIOPResource, SnmpAgentService, DerbyDatabase, JaasSecurityDomain, MBeanProxyRemote, SchemaBindingSimpleSubDeployerSupport, RARDeployment, SingletonStatelessSessionInstancePool, StatefulSessionFilePersistenceManager, AbstractDeploymentScanner, SystemAuthenticator, HAJMSClient, GeneralReportGenerator, NotificationProducerService, DeploymentFileRepository, SpringMicrocontainerDeployer, ODMGImpl, TrapdService, SpringApplicationContextDeployer, TestDeployerB, ReportGenerator, LoggingMonitor, NoopService, InterceptorLoader, NotificationListener, XMLLoginConfig, AbstractScheduleProvider, PersistentServiceExample, TxConnectionManager, TimerManagerService, ExternalClass, CMPFilePersistenceManager, SRPCacheTest, CacheStore, ClasspathTest, StatelessSessionContainer, TomcatService, OldStateManager, MetaDataLibrary, WebLogicConvertor, OIL2ServerILService, TestDeployerA, HAManagementService, DynamicStateManager, SimpleSubDeployerSupport, MessageDrivenContainer, PooledInvoker, DynamicLoginConfig, OracleThinPersistenceManager, MBeanConfigurator, EntityContainer, NamingService, InterceptorMBeanSupport, MBean, SingleScheduleProvider, MemoryMonitor, LocalJBossServerDomain, InvokerAdaptorService, NewPersistenceManager, SecurityManager, JVMIL, JBossBeanDeployer, AxisService, DatabasePersistencePolicy, JBossJMSMessageEndpointFactory, JCEProviderService, JDBCStateManager, ChildProcessService, DetachedHANamingService, TestDeployerE, EJBTimerServiceImpl, Invoker, DestinationManager, TestService, OracleXAExceptionFormatter, JBossBeanDeployment, CachedConnectionManager, BeanShellScript, ConsoleAlertListener, JCAConnectionFactory, NullStateManager, JNDIView, DestinationManager, JDBCStateManager, ServiceDynamicMBeanSupport, HttpInvoker, OracleXAExceptionFormatter, JNDIResource, ScriptingListener, PersistenceManager, AsynchNotificationBroadcasterSupport, CorbaORBService, HASingletonController, RARDeployer, MainDeployer, ResourceTsts, PersistenceManager, HttpProxyFactoryHA, ConnectionFactoryBindingService, JBossManagedConnectionPool, FixedDelayRetryPolicy, J2EEDomainTarget, HAServerILService, SecurityPolicyService, ResourceTest, SchemaResolverSimpleSubDeployerSupport, UnifiedInvokerHA, LocalInvoker, InvalidationManager, HASingletonSupport, StatefulHASessionPersistenceManager, Tomcat5, EARDeployment, SQLExceptionProcessor, HypersonicDatabase, JaasSecurityManager, EntityInstancePool, CacheListener, Adaptor, JMSResource, JNDIBindingServiceMgr, SpringBeanFactoryDeployer, HANotificationBroadcasterExample, JBossLocalXAExceptionFormatter, ProxyTests, SampleService, TestDeployer, UILServerILService, ServiceMBeanSupport, PersistenceManager, DataSourceMetaData, JDBC2PersistenceManager, HAILSharedState, JVMServerILService, RemoteConnectionFactoryService, MissingClassTest, FileDeploymentStore, PBFactory, HiLoKeyGeneratorFactory, EntityLockMonitor, DataSourceDelegator, HAServiceMBeanSupportTester, PropertyEditorManagerService, JBossWorkManager, Container, AppClientModule, HTTPServerILService, PropertiesVerifierStore, HASingletonSupportTester, TransactionManagerService, UILServerILService, ClusterPartition, JavaMailResource, Test, XSLSubDeployer, HttpURLDeploymentScanner, HttpsClient, TMTest, JMSContainerInvoker, LocalTxConnectionManager, ClientMonitorInterceptor, JDBCDriver, WebService, EmailAlertListener, ConcurrentLoader, MailService, PartitionedTableCache, HASessionStateService, XMLTestService, Scheduler, PooledInvokerHA
A helper class for notification broadcasters/emitters
- author:
< - a href="mailto:juha@jboss.org">Juha Lindfors.
- author:
< - a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock.
- version:
$ - Revision: 37459 $
| Method from org.jboss.mx.util.JBossNotificationBroadcasterSupport Detail: |
public void addNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback) {
try
{
registry.add(listener, filter, handback);
}
catch (JMException e)
{
// This shouldn't happen?
throw new RuntimeException(e.toString());
}
}
|
public MBeanNotificationInfo[] getNotificationInfo() {
return NO_NOTIFICATIONS;
}
|
public void handleNotification(NotificationListener listener,
Notification notification,
Object handback) {
try
{
listener.handleNotification(notification, handback);
}
catch (Throwable ignored)
{
log.debug("Ignored unhandled throwable from listener", ignored);
}
}
Handle the notification, the default implementation is to synchronously invoke the listener. |
public long nextNotificationSequenceNumber() {
return sequenceNumber.increment();
}
The nextNotificationSequenceNumber method returns
the next sequence number for use in notifications. |
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException {
registry.remove(listener);
}
|
public void removeNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback) throws ListenerNotFoundException {
registry.remove(listener, filter, handback);
}
|
public void sendNotification(Notification notification) {
ListenerRegistry.ListenerRegistrationIterator iterator = registry.iterator();
while (iterator.hasNext())
{
ListenerRegistration registration = iterator.nextRegistration();
NotificationFilter filter = registration.getFilter();
if (filter == null)
handleNotification(registration.getListener(), notification, registration.getHandback());
else if (filter.isNotificationEnabled(notification))
handleNotification(registration.getListener(), notification, registration.getHandback());
}
}
|