org.apache.felix.ipojo
Interface InstanceStateListener

All Known Implementing Classes:
HandlerManager, InstanceDescription, InstanceManager, PrimitiveInstanceDescription

public interface InstanceStateListener

This class defines instance state listeners. An instance state listener is notified of instance state changes. It needs to be registered on the instance by invoking the (ComponentInstance.addInstanceStateListener(InstanceStateListener) method. Once registered, the listener can track instance state changes. Received states are:

  • ComponentInstance.VALID
  • ComponentInstance.INVALID
  • ComponentInstance.STOPPED
  • ComponentInstance.DISPOSED
  • Author:
    Felix Project Team

    Method Summary
     void stateChanged(ComponentInstance instance, int newState)
              State change listener callback method.
     

    Method Detail

    stateChanged

    void stateChanged(ComponentInstance instance,
                      int newState)
    State change listener callback method. Every time that a monitored instance's state changes, this method is called with the instance and the new state.

    Parameters:
    instance - the changing instance
    newState - the new instance state


    Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.