com.ibm.websphere.asynchbeans

Interface AsynchScope

  • All Superinterfaces:
    AsynchScopeManager, EventSource

    Deprecated.

    @Deprecated
    public interface AsynchScope
    extends AsynchScopeManager
    An asynch bean is a scoping mechanism. It 'own's it's own AlarmManager and SubSystemMonitorManager. If the asynch bean is destroyed then any alarms/subsystem monitors managed by its alarm manager and subsystem monitor manager are also destroyed. Properties can be stored in an AsynchBean also giving J2EE applications a way to store non serializable state that otherwise could not be stored in a session bean (Alarms,WorkItems,application data).

    AsynchScopes can also be configured to automatically deregister a set of NotificationListeners when they are destroyed. If the Notification methods are used to register and unregister the listeners then this can ease the burden of ensuring that listeners are unregistered when required.

    Asynch Beans can also have children which are also asynch beans. These can be useful for scoping data underneath the parent. If the parent is destroyed then the children are destroyed also. Asynch Beans are named. All beans at the same 'level' of the tree must be uniquely named. Ultimately, a WorkManager owns all asynch beans.

    See Also:
    WorkManager, SubsystemMonitorManager, AlarmManager, AsynchScopeEvents
    • Method Detail

      • getName

        java.lang.String getName()
        Deprecated. 
        This returns the name of the asynch bean.
        Returns:
        The name of the asynch bean.
      • destroy

        void destroy()
        Deprecated. 
        This destroys the bean. A JMX Notification is sent to registered listeners and then the subsystem monitors and alarms are destroyed followed by the bean it-self. After it is destroyed the application should not reference this bean again.
      • getPropertyMap

        java.util.Map getPropertyMap()
        Deprecated. 
        This returns a set of properties that can be manipulated. This Map is thread safe and is basically a Hashtable.
      • getAlarmManager

        AlarmManager getAlarmManager()
        Deprecated. 
        This returns the alarm manager owned by this bean. The lifecycle of this alarm manager and any associated alarms created using it are directly coupled to the lifecycle of the asynch bean.
        Returns:
        The asynch beans AlarmManager
      • getSubsystemMonitorManager

        SubsystemMonitorManager getSubsystemMonitorManager()
        Deprecated. 
        This returns the subsystem monitor manager owned by this bean. The lifecycle of this manager and any associated subsystem monitors created using this manager are directly coupled to the lifecycle of the asynch bean.
        Returns:
        The SubsystemMonitorManager associated with the bean.
      • getParent

        AsynchScopeManager getParent()
        Deprecated. 
        This returns the parent of the bean. The parent is always an AsynchScopeManager. WorkManager and AsynchScope extend AsynchScopeManager. A instanceof check or the context of the application will allow whether the parent is an AsynchScope or a WorkManager.
        Returns:
        The parent of the Scope. Either a WorkManager or an AsynchScope. Never null.
      • registerListener

        void registerListener(EventSource es,
                            java.lang.Object listener)
        Deprecated. 
        This registers the listener with the EventSource. The AsynchScope will remember that it did this and automatically remove the listener when the AsynchScope is destroyed. This is a convenience function. If a listener is registered on behalf of a Scope then this frees the programmer of having to unregister it when the scope is destroyed.
        Parameters:
        es - The EventSource to call addListener on.
        listener - The listener it-self.
      • registerListener

        void registerListener(EventSource es,
                            java.lang.Object listener,
                            int priority)
        Deprecated. 
        This registers the listener with the EventSource. The AsynchScope will remember that it did this and automatically remove the listener when the AsynchScope is destroyed. This is a convenience function. If a listener is registered on behalf of a Scope then this frees the programmer of having to unregister it when the scope is destroyed.
        Parameters:
        es - The EventSource to call addListener on.
        listener - The listener it-self.
        priority - The priority of the listener (0-9)
      • unregisterListener

        void unregisterListener(EventSource es,
                              java.lang.Object listener)
        Deprecated. 
        This removes the listener from the EventSource and also updates the Scope to forget this listener. This should be called if the listener is to be removed from the EventSource before the Scope will be destroyed.
        Parameters:
        es - The EventSourc to remove the listener from.
        listener - The listener to remove.
IBM WebSphere Application ServerTM
Release 9.0