src/main/java/com/authlete/jaxrs/BaseIntrospectionEndpoint.java
public Response handle(AuthleteApi api, MultivaluedMap<String, String> parameters)
    {
        try
        {
            // Create a handler.
            IntrospectionRequestHandler handler = new IntrospectionRequestHandler(api);

            // Delegate the task to the handler.
            return handler.handle(parameters);
        }
        catch (WebApplicationException e)
        {
            // An error occurred in the handler.
            onError(e);

            // Convert the error to a Response.
            return e.getResponse();
        }
    }
public Response handle(AuthleteApi api, MultivaluedMap<String, String> parameters)
    {
        try
        {
            // Create a handler.
            IntrospectionRequestHandler handler = new IntrospectionRequestHandler(api);

            // Delegate the task to the handler.
            return handler.handle(parameters);
        }
        catch (WebApplicationException e)
        {
            // An error occurred in the handler.
            onError(e);

            // Convert the error to a Response.
            return e.getResponse();
        }
    }
Handle an introspection request.

<p>
This method internally creates an {@link IntrospectionRequestHandler}
instance and calls its {@link IntrospectionRequestHandler#handle(MultivaluedMap)
handle()} method with the {@code parameters} argument. Then, this
method uses the value returned from the {@code handle()} method as a
response from this method.
</p>

<p>
When {@code IntrospectionRequestHandler.handle()} method raises a
{@link WebApplicationException}, this method calls {@link
#onError(WebApplicationException) onError()} method with the exception.
The default implementation of {@code onError()} calls {@code
printStackTrace()} of the exception and does nothing else. You can
override the method as necessary. After calling {@code onError()}
method, this method calls {@code getResponse()} method of the
exception and uses the returned value as a response from this method.
</p>

@param api
An implementation of {@link AuthleteApi}.

@param parameters
Request parameters of an introspection request.

@return
A response that should be returned to the client application.