com.agical.rmock.core
Interface InvocationHandler

All Known Implementing Classes:
Engine

public interface InvocationHandler

An invocation handler handles invocations from mocks or intercepted objects. An invocation handler typically records or veifies expectations but could also do other things such as logging them.

(c) Agical AB 2005

Author:
joakim.ohlrogge

Field Summary
static InvocationHandler NULL
           
 
Method Summary
 java.lang.Object invocation(java.lang.String id, java.lang.Class objectType, java.lang.String method, java.lang.Object[] arguments, MethodHandle methodHandle)
          Called when an invocation is made to a mock.
 

Field Detail

NULL

static final InvocationHandler NULL
Method Detail

invocation

java.lang.Object invocation(java.lang.String id,
                            java.lang.Class objectType,
                            java.lang.String method,
                            java.lang.Object[] arguments,
                            MethodHandle methodHandle)
                            throws java.lang.Throwable
Called when an invocation is made to a mock. An invocation handler typically records or verifies the invication.

Parameters:
id - The id of the mock that made the invocation
objectType - The type of the object that received the method invocation
method - The method that was invoked
methodHandle - A callback to the original method on the receiving object.
the - arguments that was passed to the invoked method
Returns:
The result of the invocation
Throws:
any - throwable that might be thrown
java.lang.Throwable


Copyright © 2005-2011 Agical AB. All Rights Reserved.