final Object param;
final Class<?> eventClass = event.getClass();
final Class<?>[] eventClassArray = new Class<?>[] {eventClass};
if (target.isWrappedDelivery()) {
proxy = getProxy(WrappedSink.class, eventClassArray);
param = new EventType();
((EventType)param).getContent().add(eventClass.isAnnotationPresent(XmlRootElement.class)
? event : convertToJAXBElement(event));
method = WrappedSink.class.getMethod("notifyEvent", EventType.class);
} else {
proxy = getProxy(endpointInterface);