Example usage for java.lang Throwable hashCode

List of usage examples for java.lang Throwable hashCode

Introduction

In this page you can find the example usage for java.lang Throwable hashCode.

Prototype

@HotSpotIntrinsicCandidate
public native int hashCode();

Source Link

Document

Returns a hash code value for the object.

Usage

From source file:org.trpr.platform.core.impl.management.jmx.JMXNotificationDispatcher.java

/**
 * Convenience method to dispatch Application and System exception details to the JMX sub-system
 * @param exception the Exception details to dispatch to JMX
 *///from   w  ww .  j  a  v  a2s.  c o m
public void dispatchException(Throwable exception, String source) {
    if (exception != null) {
        StringWriter writer = new StringWriter();
        exception.printStackTrace(new PrintWriter(writer));
        final Notification notification = new Notification(exception.getClass().getName(), source,
                exception.hashCode(), System.currentTimeMillis(),
                getHostIP() + exception.getMessage() + "\n" + writer.toString());
        this.publisher.sendNotification(notification);
        this.exceptionNotificationCount++;
    }
}