|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
org.opensolaris.os.dtrace.ConsumerException
public class ConsumerException
Exception thrown by a ConsumerListener
to terminate a running
Consumer
.
Constructor Summary | |
---|---|
ConsumerException(java.lang.String message)
Creates a consumer exception with the given message. |
|
ConsumerException(java.lang.String message,
java.lang.Object notification)
Creates an exception thrown by a ConsumerListener
implementation to terminate a running Consumer , usually
in response to a drop or an error reported by the native DTrace
library. |
Method Summary | |
---|---|
java.lang.Object |
getNotificationObject()
Gets the optional object from the ConsumerListener that
communicates to the ExceptionHandler why the listener
threw this exception. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConsumerException(java.lang.String message)
ConsumerException(String message, Object
dtraceNotificationObject)
public ConsumerException(java.lang.String message, java.lang.Object notification)
ConsumerListener
implementation to terminate a running Consumer
, usually
in response to a drop or an error reported by the native DTrace
library. Optionally includes the object reported by the native
DTrace library so it can be used by an ExceptionHandler
to display details about why the consumer terminated.
message
- default display message explaining why the
consumer was terminated.notification
- usually the object passed to a ConsumerListener
from DTrace that prompted this exception. The
notification could be any of the following: Drop
passed to dataDropped()
Error
passed to errorEncountered()
ProcessState
passed to
processStateChanged()
dataReceived()
or
that defines an arbitrary error threshold. An ExceptionHandler
should be defined to handle any type of
notification object set by user code. May be null
.Consumer.go(ExceptionHandler h)
Method Detail |
---|
public java.lang.Object getNotificationObject()
ConsumerListener
that
communicates to the ExceptionHandler
why the listener
threw this exception. Usually this is the object from DTrace
(such as an Error
) that
prompted the exception, simply forwarded to the exception
handler.
ExceptionHandler
why the ConsumerListener
threw this
exception, may be null
Consumer.go(ExceptionHandler h)
,
ConsumerException(String message,
Object dtraceNotificationObject)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |