Ejemplo n.º 1
0
        /// <summary>
        /// Create custom listener (service side) for Remoting V2 and add <see cref="ExtendedServiceRemotingDispatcher"/> to pipeline
        /// </summary>
        /// <param name="serviceContext"></param>
        /// <param name="serviceImplementation"></param>
        /// <returns></returns>
        public override IServiceRemotingListener CreateServiceRemotingListenerV2(ServiceContext serviceContext, IService serviceImplementation)
        {
            // create our own dispatcher, this will handle adding info to headers
            var messageHandler = new ExtendedServiceRemotingDispatcher(serviceContext, serviceImplementation);

            // note: attributes names remoting for V1 and V2 are NOT the same
            var listner = new FabricTransportServiceRemotingListener(serviceContext: serviceContext, serviceRemotingMessageHandler: messageHandler);

            return((IServiceRemotingListener)listner);
        }
Ejemplo n.º 2
0
 public override void Configure(int port, StatefulServiceContext ctx)
 {
     Log.WriteLine(LogLevel.Info, $"{nameof(RemotingGraphEngineListener)}: Listening on port {port}.");
     m_trinityProxy = new TrinityOverRemotingService();
     m_fabListener  = new FabricTransportServiceRemotingListener(
         ctx,
         m_trinityProxy,
         new FabricTransportRemotingListenerSettings
     {
         EndpointResourceName = EndpointName,
         //TODO security stuff
     });
 }