1/*
2 * Copyright (c) 2007 Mockito contributors
3 * This program is made available under the terms of the MIT License.
4 */
5package org.mockito.listeners;
6
7import org.mockito.MockSettings;
8
9/**
10 * This listener can be notified of method invocations on a mock.
11 *
12 * For this to happen, it must be registered using {@link MockSettings#invocationListeners(InvocationListener...)}.
13 */
14public interface InvocationListener {
15
16	/**
17	 * Called after the invocation of the listener's mock if it returned normally.
18	 *
19     * <p>
20     * Exceptions caused by this invocationListener will raise a {@link org.mockito.exceptions.base.MockitoException}.
21     * </p>
22	 *
23	 * @param methodInvocationReport Information about the method call that just happened.
24     *
25     * @see MethodInvocationReport
26	 */
27	void reportInvocation(MethodInvocationReport methodInvocationReport);
28}
29