/// <summary>
 /// Creates a new WebServiceCommunicator object.
 /// </summary>
 /// <param name="url">URL of web service</param>
 /// <param name="comminicatorId">Communicator Id</param>
 public WebServiceCommunicator(string url, long comminicatorId)
     : base(comminicatorId)
 {
     _url                               = url;
     CommunicationWay                   = CommunicationWays.SendAndReceive;
     _outgoingMessageQueue              = new QueueProcessorThread <MDSDataTransferMessage>();
     _outgoingMessageQueue.ProcessItem += OutgoingMessageQueue_ProcessItem;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a new WebServiceCommunicator object.
 /// </summary>
 /// <param name="url">URL of web service</param>
 /// <param name="comminicatorId">Communicator Id</param>
 public WebServiceCommunicator(string url, long comminicatorId)
     : base(comminicatorId)
 {
     _url = url;
     CommunicationWay = CommunicationWays.SendAndReceive;
     _outgoingMessageQueue = new QueueProcessorThread<NGRIDDataTransferMessage>();
     _outgoingMessageQueue.ProcessItem += OutgoingMessageQueue_ProcessItem;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Contructor.
 /// </summary>
 protected NGRIDRemoteApplication(string name, int applicationId)
 {
     Name                               = name;
     ApplicationId                      = applicationId;
     LastIncomingMessageTime            = DateTime.MinValue;
     LastOutgoingMessageTime            = DateTime.MinValue;
     _communicators                     = new LinkedList <ConnectedCommunicator>();
     _messageDeliverer                  = new MessageDeliverer(this);
     _incomingMessageQueue              = new QueueProcessorThread <MessageReceivedFromCommunicatorEventArgs>();
     _incomingMessageQueue.ProcessItem += IncomingMessageQueue_ProcessItem;
 }
Exemplo n.º 4
0
        /// <summary>
        /// Creates a new NGRIDClient object.
        /// </summary>
        /// <param name="ipAddress">Ip address of the NGRID server</param>
        /// <param name="port">Listening TCP Port of NGRID server</param>
        public NGRIDController(string ipAddress, int port)
        {
            ReConnectServerOnError = true;

            _reconnectTimer  = new Timer(ReconnectTimer_Tick, null, Timeout.Infinite, Timeout.Infinite);
            _waitingMessages = new SortedList <string, WaitingMessage>();

            _incomingMessageQueue              = new QueueProcessorThread <NGRIDMessage>();
            _incomingMessageQueue.ProcessItem += IncomingMessageQueue_ProcessItem;

            _communicationChannel = new TCPChannel(ipAddress, port);
            _communicationChannel.MessageReceived += CommunicationChannel_MessageReceived;
            _communicationChannel.StateChanged    += CommunicationChannel_StateChanged;

            LastIncomingMessageTime = DateTime.MinValue;
            LastOutgoingMessageTime = DateTime.MinValue;
        }
Exemplo n.º 5
0
        /// <summary>
        /// Creates a new MDSClient object.
        /// </summary>
        /// <param name="ipAddress">Ip address of the MDS server</param>
        /// <param name="port">Listening TCP Port of MDS server</param>
        public MDSController(string ipAddress, int port)
        {
            ReConnectServerOnError = true;

            _reconnectTimer = new Timer(ReconnectTimer_Tick, null, Timeout.Infinite, Timeout.Infinite);
            _waitingMessages = new SortedList<string, WaitingMessage>();

            _incomingMessageQueue = new QueueProcessorThread<MDSMessage>();
            _incomingMessageQueue.ProcessItem += IncomingMessageQueue_ProcessItem;

            _communicationChannel = new TCPChannel(ipAddress, port);
            _communicationChannel.MessageReceived += CommunicationChannel_MessageReceived;
            _communicationChannel.StateChanged += CommunicationChannel_StateChanged;

            LastIncomingMessageTime = DateTime.MinValue;
            LastOutgoingMessageTime = DateTime.MinValue;
        }
Exemplo n.º 6
0
 /// <summary>
 /// Contructor.
 /// </summary>
 protected MDSRemoteApplication(string name, int applicationId)
 {
     Name = name;
     ApplicationId = applicationId;
     LastIncomingMessageTime = DateTime.MinValue;
     LastOutgoingMessageTime = DateTime.MinValue;
     _communicators = new LinkedList<ConnectedCommunicator>();
     _messageDeliverer = new MessageDeliverer(this);
     _incomingMessageQueue = new QueueProcessorThread<MessageReceivedFromCommunicatorEventArgs>();
     _incomingMessageQueue.ProcessItem += IncomingMessageQueue_ProcessItem;
 }