/** * Creates a service reference for the async callback, based on information contained in the supplied message * @param msg - the incoming message * @return - a CallBackServiceReference */ @SuppressWarnings("unchecked") private ServiceReference<AsyncResponseHandler<?>> getAsyncCallbackRef( Message msg ) { RuntimeEndpointReference callbackEPR = (RuntimeEndpointReference) msg.getHeaders().get(Constants.ASYNC_CALLBACK); if( callbackEPR == null ) return null; CompositeContext compositeContext = callbackEPR.getCompositeContext(); registry = compositeContext.getExtensionPointRegistry(); ProxyFactory proxyFactory = ExtensibleProxyFactory.getInstance(registry); msgFactory = getMessageFactory(); List<EndpointReference> eprList = new ArrayList<EndpointReference>(); eprList.add(callbackEPR); ObjectFactory<?> factory = new CallbackReferenceObjectFactory(AsyncResponseHandler.class, proxyFactory, eprList); return (ServiceReference<AsyncResponseHandler<?>>) factory.getInstance(); } // end method getAsyncCallbackEPR
JavaIntrospectionHelper.getBusinessInterface(element.getType(), element.getGenericType()); factory = new CallbackReferenceObjectFactory(businessInterface, proxyFactory, wires); } else { factory = new CallbackWireObjectFactory(businessInterface, proxyFactory, wires);