FileDocCategorySizeDatePackage
LifeCycleImpl.javaAPI DocGlassfish v2 API4467Fri May 04 22:33:44 BST 2007com.sun.enterprise.admin.selfmanagement.event

LifeCycleImpl

public class LifeCycleImpl extends NotificationBroadcasterSupport implements LifeCycleImplMBean
LifeCycleImpl is an MBean that implements the LifecycleListener interface and is a subclass of NotificationBroadcasterSupport.

Fields Summary
private long
sequenceNumber
Notification sequence number within the source object.
private static final String[]
types
private static final MBeanNotificationInfo[]
notifsInfo
Constructors Summary
public LifeCycleImpl()

        DeclarativeLifecycleEventService.setLifeCycleImpl(this);
    
Methods Summary
public javax.management.MBeanNotificationInfo[]getNotificationInfo()

        return notifsInfo.clone();
    
public voidonReady(com.sun.enterprise.server.ServerContext sc)

    
    
        
        long seqno;
        synchronized (this) {
            seqno = sequenceNumber++;
        }
        //LifeCycleNotification n = new LifeCycleNotification(LifeCycleNotification.READY_EVENT, this, seqno, "Ready!!!");
        Notification n = new Notification(LifeCycleEvent.READY_EVENT, this, seqno, "Ready!!!");
        sendNotification(n);
        
    
public voidonShutdown()

        long seqno;
        synchronized (this) {
            seqno = sequenceNumber++;
        }
        //LifeCycleNotification n = new LifeCycleNotification(LifeCycleNotification.SHUTDOWN_EVENT, this, seqno, "Shutting Down!!!");
        Notification n = new Notification(LifeCycleEvent.SHUTDOWN_EVENT, this, seqno, "Shutting Down!!!");
	sendNotification(n);
        
    
public voidonTermination()

        long seqno;
        synchronized (this) {
            seqno = sequenceNumber++;
        }
        //LifeCycleNotification n = new LifeCycleNotification(LifeCycleNotification.TERMINATION_EVENT, this, seqno, "Terminated!!!");
        Notification n = new Notification(LifeCycleEvent.TERMINATION_EVENT, this, seqno, "Terminated!!!");
        sendNotification(n);