/// <summary> /// /// </summary> /// <param name="remotingSettings"></param> /// <param name="remotingCallbackMessageHandler"></param> /// <param name="servicePartitionResolver"></param> /// <param name="exceptionHandlers"></param> /// <param name="traceId"></param> /// <param name="serializersManager"></param> public FabricTransportServiceRemotingClientFactoryImpl( ServiceRemotingMessageSerializersManager serializersManager, FabricTransportRemotingSettings remotingSettings, IServiceRemotingCallbackMessageHandler remotingCallbackMessageHandler = null, IServicePartitionResolver servicePartitionResolver = null, IEnumerable <IExceptionHandler> exceptionHandlers = null, string traceId = null) : base( servicePartitionResolver, GetExceptionHandlers(exceptionHandlers), traceId) { this.settings = remotingSettings ?? FabricTransportRemotingSettings.GetDefault(); this.serializersManager = serializersManager; this.disposer = new NativeFabricTransportMessageDisposer(); this.fabricTransportRemotingCallbackMessageHandler = new FabricTransportRemotingCallbackMessageHandler(remotingCallbackMessageHandler, this.serializersManager); }
private void CreateNativeListener( IFabricTransportMessageHandler contract, FabricTransportSettings transportSettings, FabricTransportListenerAddress listenerAddress, IFabricTransportConnectionHandler connectionHandler) { var iid = typeof(NativeFabricTransport.IFabricTransportListener).GetTypeInfo().GUID; using (var pin = new PinCollection()) { var nativeTransportSettings = transportSettings.ToNativeV2(pin); var nativeListenerAddress = listenerAddress.ToNative(pin); var nativeConnectionHandler = new FabricTransportConnectionHandlerBroker(connectionHandler); var messageHandler = new FabricTransportMessageHandlerBroker(contract, connectionHandler); var nativeFabricTransportMessageDisposer = new NativeFabricTransportMessageDisposer(); this.nativeListner = NativeFabricTransport.CreateFabricTransportListener( ref iid, nativeTransportSettings, nativeListenerAddress, messageHandler, nativeConnectionHandler, nativeFabricTransportMessageDisposer); } }