@Override
public Map<ContextualParameter, Object> getContextualArguments(Set<ContextualParameter> parameters) {
Map<ContextualParameter, Object> args = super.getContextualArguments(parameters);
for (ContextualParameter parameter : parameters) {
ContextualParameter contextualParameter = (ContextualParameter)parameter;
if (Event.class.isAssignableFrom(contextualParameter.getType())) {
Class payloadType = Introspector.resolveToClass(contextualParameter.getGenericType(), Event.class, 0);
if (payloadType.isInstance(req.getEvent().getValue())) {
if (args.isEmpty()) {
args = new HashMap<ContextualParameter, Object>();
}
args.put(parameter, new Event(req.getEvent().getName(), req.getEvent().getValue()));