C# 클래스 Quartz.Simpl.PropertySettingJobFactory

A JobFactory that instantiates the Job instance (using the default no-arg constructor, or more specifically: ObjectUtils.InstantiateType{T}), and then attempts to set all values from the IJobExecutionContext and the IJobExecutionContext's merged JobDataMap onto properties of the job.
Set the WarnIfPropertyNotFound property to true if you'd like noisy logging in the case of values in the JobDataMap not mapping to properties on your job class. This may be useful for troubleshooting typos of property names, etc. but very noisy if you regularly (and purposely) have extra things in your JobDataMap. Also of possible interest is the ThrowIfPropertyNotFound property which will throw exceptions on unmatched JobDataMap keys.
상속: Quartz.Simpl.SimpleJobFactory
파일 보기 프로젝트 열기: quartznet/quartznet 1 사용 예제들

공개 메소드들

메소드 설명
NewJob ( Quartz.Spi.TriggerFiredBundle bundle, IScheduler scheduler ) : IJob

Called by the scheduler at the time of the trigger firing, in order to produce a IJob instance on which to call Execute.

It should be extremely rare for this method to throw an exception - basically only the case where there is no way at all to instantiate and prepare the Job for execution. When the exception is thrown, the Scheduler will move all triggers associated with the Job into the TriggerState.Error state, which will require human intervention (e.g. an application restart after fixing whatever configuration problem led to the issue with instantiating the Job).

SetObjectProperties ( object obj, JobDataMap data ) : void

Sets the object properties.

보호된 메소드들

메소드 설명
ConvertValueIfNecessary ( Type requiredType, object newValue ) : object

비공개 메소드들

메소드 설명
HandleError ( string message ) : void
HandleError ( string message, Exception e ) : void

메소드 상세

ConvertValueIfNecessary() 보호된 메소드

protected ConvertValueIfNecessary ( Type requiredType, object newValue ) : object
requiredType System.Type
newValue object
리턴 object

NewJob() 공개 메소드

Called by the scheduler at the time of the trigger firing, in order to produce a IJob instance on which to call Execute.

It should be extremely rare for this method to throw an exception - basically only the case where there is no way at all to instantiate and prepare the Job for execution. When the exception is thrown, the Scheduler will move all triggers associated with the Job into the TriggerState.Error state, which will require human intervention (e.g. an application restart after fixing whatever configuration problem led to the issue with instantiating the Job).

public NewJob ( Quartz.Spi.TriggerFiredBundle bundle, IScheduler scheduler ) : IJob
bundle Quartz.Spi.TriggerFiredBundle The TriggerFiredBundle from which the /// and other info relating to the trigger firing can be obtained.
scheduler IScheduler
리턴 IJob

SetObjectProperties() 공개 메소드

Sets the object properties.
public SetObjectProperties ( object obj, JobDataMap data ) : void
obj object The object to set properties to.
data JobDataMap The data to set.
리턴 void