Inheritance: BaseCommand
Esempio n. 1
0
		public void reset(ConnectionInfo info)
		{
			this.info = info;
			transactions.Clear();
			sessions.Clear();
			tempDestinations.Clear();
			_shutdown.Value = false;
		}
Esempio n. 2
0
        public Connection(Uri connectionUri, ITransport transport, IdGenerator clientIdGenerator)
        {
            this.brokerUri = connectionUri;
            this.clientIdGenerator = clientIdGenerator;

            this.transport = transport;
            this.transport.Command = new CommandHandler(OnCommand);
            this.transport.Exception = new ExceptionHandler(OnTransportException);
            this.transport.Interrupted = new InterruptedHandler(OnTransportInterrupted);
            this.transport.Resumed = new ResumedHandler(OnTransportResumed);

            ConnectionId id = new ConnectionId();
            id.Value = CONNECTION_ID_GENERATOR.GenerateId();

            this.info = new ConnectionInfo();
            this.info.ConnectionId = id;
            this.info.FaultTolerant = transport.IsFaultTolerant;

            this.messageTransformation = new ActiveMQMessageTransformation(this);
        }
 public void OnOutgoingCommand(ITransport transport, Command command)
 {
     if(command.IsConnectionInfo)
     {
         this.info = command as ConnectionInfo;
     }
 }
 public override Response processAddConnection(ConnectionInfo info)
 {
     if(info != null)
     {
         connectionStates.Add(info.ConnectionId, new ConnectionState(info));
     }
     return TRACKED_RESPONSE_MARKER;
 }
Esempio n. 5
0
 public virtual Response processAddConnection(ConnectionInfo info)
 {
     return null;
 }
Esempio n. 6
0
 public SessionInfo(ConnectionInfo connectionInfo, long sessionId)
 {
     this.sessionId = new SessionId(connectionInfo.ConnectionId, sessionId);
 }
Esempio n. 7
0
 public ConnectionState(ConnectionInfo info)
 {
     this.info = info;
     // Add the default session id.
     addSession(new SessionInfo(info, -1));
 }
Esempio n. 8
0
		protected SessionInfo createSession(ConnectionInfo parent)
		{
			return new SessionInfo()
			{
				SessionId = new SessionId()
				{
					ConnectionId = parent.ConnectionId.Value,
					Value = sessionIdx++
				}
			};
		}
Esempio n. 9
0
 public SessionInfo(ConnectionInfo connectionInfo, long sessionId)
 {
     this.sessionId = new SessionId(connectionInfo.ConnectionId, sessionId);
 }