Example usage for javax.servlet AsyncEvent getClass

List of usage examples for javax.servlet AsyncEvent getClass

Introduction

In this page you can find the example usage for javax.servlet AsyncEvent getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:org.apache.vysper.xmpp.extension.xep0124.BoshBackedSessionContext.java

protected void handleAsyncEventError(AsyncEvent event) {
    final ServletRequest suppliedRequest = event.getSuppliedRequest();
    final ServletResponse suppliedResponse = event.getSuppliedResponse();
    BoshRequest boshRequest = (BoshRequest) suppliedRequest.getAttribute(BOSH_REQUEST_ATTRIBUTE);
    BoshResponse boshResponse = (BoshResponse) suppliedRequest.getAttribute(BOSH_RESPONSE_ATTRIBUTE);

    // works at least for jetty:
    final Exception exceptionObject = (Exception) suppliedRequest.getAttribute("javax.servlet.error.exception");
    final Throwable throwable = event.getThrowable() != null ? event.getThrowable() : exceptionObject;

    final Long rid = boshRequest == null ? null : boshRequest.getRid();
    LOGGER.warn("SID = " + getSessionId() + " - JID = " + getInitiatingEntity() + " - RID = " + rid
            + " - async error on event ", event.getClass(), throwable);
}