Пример #1
0
		/// <summary>
		/// This virtual method resets the base properties for the JobWrapper.
		/// </summary>
		public override void Reset()
		{
			mBaseJob = null;
			mRSCallback = null;
			mProgressCallback = null;
			timeoutCallback = null;
            ObjectPool = null;
		}
		internal CompletionJobWrapperBase(JobBase baseJob):base(baseJob){}
Пример #3
0
        public Guid JobProcess(JobBase job, bool async)
        {
            if (delJobProcess == null)
                throw new SecurityException("Not authenticated");

            return delJobProcess(job, async);
        }
Пример #4
0
		/// <summary>
		/// This is the default constructor.
		/// </summary>
		/// <param name="job">The job.</param>
		public CommandRSEventArgs(JobBase job)
		{
			mJobID = job.ID;
			mData = job.Data;
		}
Пример #5
0
 /// <summary>
 /// Returns true if the job is in the collection.
 /// </summary>
 /// <param name="job">A object that derives from JobBase.</param>
 /// <returns>Returns true for success.</returns>
 public virtual bool Contains(JobBase job)
 {
     return Contains(job.ID);
 }
Пример #6
0
        /// <summary>
        /// Removes the job from the collection.
        /// </summary>
        /// <param name="job">The job to remove.</param>
        public void Remove(JobBase job)
        {
            lock (syncCollection)
            {
                DisposeCheck();
                Guid jobID = job.ID.Value;

                jobCollection.Remove(job.TrackID);

                if (jobID == Guid.Empty)
                    jobID = jobCollectionID[job.TrackID];

                jobCollectionID.Remove(job.TrackID);
                jobCollectionTrackID.Remove(jobID);
            }
        }
Пример #7
0
        /// <summary>
        /// This method adds a job to the collection.
        /// </summary>
        /// <param name="jobRQ">The JobBase object to add.</param>
        /// <returns>Returns 0.</returns>
        public virtual int Add(JobBase jobRQ)
        {
            lock (syncCollection)
            {
                DisposeCheck();

                if (IsFixedSize && mCapacity == jobCollection.Count && jobRQ.Priority < PriorityOverride)
                    throw new SCMCapacityException("The job collection capacity has been reached.");

                jobCollection.Add(jobRQ.TrackID, jobRQ);
                jobCollectionID.Add(jobRQ.TrackID, jobRQ.ID.Value);
                jobCollectionTrackID.Add(jobRQ.ID.Value, jobRQ.TrackID);

                return 0;
            }
        }
Пример #8
0
 public Guid JobProcess(JobBase job, bool async)
 {
     return dJobProcess(job, async);
 }
Пример #9
0
        //public void setAccessProfile(SessionProfileLevel theLevel)
        //{
        //    mSessionProfileLevel = theLevel;

        //}
        //protected void ProvideSecureHandshake(IXimuraSessionSCM theSession)
        //{
        //    RSAParameters sessionPubKey = theSession.GetSessionPublicKey;
        //}
        #endregion

        #region Properties
        //public Guid? theSession { get { return mSession; } }
        //public SessionProfileLevel theLevel { get { return mSessionProfileLevel; } }
        #endregion

        #region VerifyJobSignature
        /// <summary>
        /// This method verifies the job signature.
        /// </summary>
        /// <param name="jobRQ"><The job to verify./param>
        /// <returns>Returns true is the job is verified.</returns>
        public bool VerifyJobSignature(JobBase jobRQ)
        {
            //JobSignature sig = jobRQ.Signature;
            //byte[] buffer = jobRQ.IDBuffer();

            return true;
        }
Пример #10
0
		/// <summary>
		/// This is the root initialization for the JobWrapper.
		/// </summary>
		/// <param name="baseJob"></param>
		/// <param name="RSCallback"></param>
		/// <param name="ProgressCallback"></param>
		protected virtual void Inititialize(JobBase baseJob, 
			CommandRSCallback RSCallback, CommandProgressCallback ProgressCallback)
		{
			mBaseJob = baseJob;
			mRSCallback = RSCallback;
			mProgressCallback = null;
		}
Пример #11
0
		/// <summary>
		/// This is the wrapper constructor.
		/// </summary>
		/// <param name="baseJob">The base job.</param>
		internal JobWrapper(JobBase baseJob)
		{
			mBaseJob=baseJob;
			InitializeJob();
			Reset();
		}
Пример #12
0
		/// <summary>
		/// This method initializes the session.
		/// </summary>
		/// <param name="secMan">The security manager.</param>
		/// <param name="jobRQ">The job request.</param>
		/// <param name="token">The session token.</param>
		/// <param name="parentJob">The parent job. This should be left null if this is not a child job.</param>
		public void Initialize(JobBase jobRQ, 
            SessionToken token, SecurityManagerJob parentJob, 
			CommandRSCallback RSCallback, CommandProgressCallback ProgressCallback)
		{
			try
			{
                //mSecMan = secMan;
				mParentJob=parentJob;
				if (parentJob!=null)
					mChildJobDepth = parentJob.ChildJobDepth+1;
				mRSCallback=RSCallback;
				mProgressCallback=ProgressCallback;
				mBaseJob = jobRQ;
				this.token=token;
			}
			catch(Exception ex)
			{
				Reset();
				throw ex;
			}
		}