org.opensolaris.os.dtrace
Class ConsumerAdapter

java.lang.Object
  extended by org.opensolaris.os.dtrace.ConsumerAdapter
All Implemented Interfaces:
java.util.EventListener, ConsumerListener

public abstract class ConsumerAdapter
extends java.lang.Object
implements ConsumerListener

An abstract adapter class for getting events from a Consumer. The methods in this class are empty except for a few that implement the default behavior of terminating a consumer by throwing an exception. This class exists as a convenience for implementing consumer listeners.

See Also:
Consumer.addConsumerListener(ConsumerListener l)

Constructor Summary
ConsumerAdapter()
           
 
Method Summary
 void consumerStarted(ConsumerEvent e)
          Empty method
 void consumerStopped(ConsumerEvent e)
          Empty method
 void dataDropped(DropEvent e)
          Terminates a running Consumer by throwing an exception.
 void dataReceived(DataEvent e)
          Empty method
 void errorEncountered(ErrorEvent e)
          Terminates a running Consumer by throwing an exception.
 void intervalBegan(ConsumerEvent e)
          Empty method
 void intervalEnded(ConsumerEvent e)
          Empty method
 void processStateChanged(ProcessEvent e)
          Empty method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsumerAdapter

public ConsumerAdapter()
Method Detail

dataReceived

public void dataReceived(DataEvent e)
                  throws ConsumerException
Empty method

Specified by:
dataReceived in interface ConsumerListener
Throws:
ConsumerException - if the implementation should terminate the running consumer

dataDropped

public void dataDropped(DropEvent e)
                 throws ConsumerException
Terminates a running Consumer by throwing an exception.

Specified by:
dataDropped in interface ConsumerListener
Throws:
ConsumerException

errorEncountered

public void errorEncountered(ErrorEvent e)
                      throws ConsumerException
Terminates a running Consumer by throwing an exception.

Specified by:
errorEncountered in interface ConsumerListener
Throws:
ConsumerException

processStateChanged

public void processStateChanged(ProcessEvent e)
                         throws ConsumerException
Empty method

Specified by:
processStateChanged in interface ConsumerListener
Throws:
ConsumerException - if the implementation should terminate the running consumer
See Also:
Consumer.createProcess(String command), Consumer.grabProcess(int pid)

consumerStarted

public void consumerStarted(ConsumerEvent e)
Empty method

Specified by:
consumerStarted in interface ConsumerListener
See Also:
ConsumerListener.consumerStopped(ConsumerEvent e)

consumerStopped

public void consumerStopped(ConsumerEvent e)
Empty method

Specified by:
consumerStopped in interface ConsumerListener
See Also:
ConsumerListener.consumerStarted(ConsumerEvent e)

intervalBegan

public void intervalBegan(ConsumerEvent e)
Empty method

Specified by:
intervalBegan in interface ConsumerListener
See Also:
ConsumerListener.intervalEnded(ConsumerEvent e)

intervalEnded

public void intervalEnded(ConsumerEvent e)
Empty method

Specified by:
intervalEnded in interface ConsumerListener
See Also:
ConsumerListener.intervalBegan(ConsumerEvent e)