Exemplo n.º 1
0
        public RequestIdGenerator(
            IMessageSetting messageSetting)
        {
            this.serverId    = messageSetting.ServerId;
            this.shiftNumber = messageSetting.ShiftNumber;
            long server = serverId;

            this.serverIdShiffted = server << this.shiftNumber;
            this.currentId        = serverIdShiffted;
        }
Exemplo n.º 2
0
 public NetMqForwardingClient(
     IMessageSetting messageSetting,
     INetMqConfig netMqConfig,
     IEncoder <TPayloadType, TBody> encoder)
 {
     this.maxFrameSize       = messageSetting.MaxFrameSize;
     this.incomingConnection = netMqConfig.IncomingConnection;
     this.outgoingConnection = netMqConfig.OutgoingConnection;
     this.encoder            = encoder;
 }
 public OutgoingConnection(
     INetMqConfig netMqConfig,
     IEnvelopFactory <TPayloadType, TBody> envelopFactory,
     IMessageSetting messageSetting,
     IEncoder <TPayloadType, TBody> encoder)
 {
     this.connectionString = netMqConfig.OutgoingConnection;
     this.envelopFactory   = envelopFactory;
     this.maxFrameSize     = messageSetting.MaxFrameSize;
     this.encoder          = encoder;
 }
 public IncomingConnection(
     INetMqConfig netMqConfig,
     IMessageSetting messageSetting,
     IIncomingMessageBuilder <TPayloadType, TBody> incomingMessageBuilder,
     IIncomingMessageHandler <TPayloadType, TBody> incomingMessageProcessor,
     IEncoder <TPayloadType, TBody> encoder)
 {
     this.maxFrameSize           = messageSetting.MaxFrameSize;
     this.connectionString       = netMqConfig.IncomingConnection;
     this.incomingMessageBuilder = incomingMessageBuilder;
     this.encoder = encoder;
     this.incomingMessageProcessor = incomingMessageProcessor;
 }
Exemplo n.º 5
0
 public JsonEnvelopeFactory(
     IMessageSetting messageSetting)
 {
     this.maxFrameSize = messageSetting.MaxFrameSize;
 }