using System;
namespace edu.jhu.Cas.Util {
    /* internal format */
    public class Server {
        public string Name, Target, User, Catalog, Priv, Pass, CStringExtra;
        public int Queue, ExecLimit, Rank, Type;
        private string host_long, host_short;

        public string Host {
            get {
                return host_short;
            }
            set {
                host_long = value;
                string[] tokens = value.Split('.');
                host_short = tokens[0];
            }
        }

        public string ConnectionString {
            get {
                return "Initial Catalog=" + Catalog + "; Data Source = " + host_long + "; User ID = " 
                    + User + "; Password = " + Pass + "; " + CStringExtra;
            }
        }
    }
    /* external format */
    public class CJQueue {
        public string Context;
        public int Timeout;
        public CJQueue() { }
        public CJQueue(string Context, int Timeout) {
            this.Context = Context;
            this.Timeout = Timeout;
        }
    }

}
