public class QuartzSchedulerResources
extends java.lang.Object
Contains all of the resources (JobStore
,ThreadPool
,
etc.) necessary to create a
instance.
QuartzScheduler
QuartzScheduler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CREATE_REGISTRY_ALWAYS |
static java.lang.String |
CREATE_REGISTRY_AS_NEEDED |
static java.lang.String |
CREATE_REGISTRY_NEVER |
Constructor and Description |
---|
QuartzSchedulerResources()
Create an instance with no properties initialized.
|
Modifier and Type | Method and Description |
---|---|
void |
addSchedulerPlugin(SchedulerPlugin plugin)
Add the given
for the
to use. |
static java.lang.String |
generateJMXObjectName(java.lang.String schedName,
java.lang.String schedInstId)
Create the name under which this scheduler should be registered in JMX.
|
java.lang.String |
getInstanceId()
Get the instance Id for the
. |
boolean |
getJMXExport()
Get whether the QuartzScheduler should be registered with the local
MBeanServer.
|
java.lang.String |
getJMXObjectName()
Get the name under which the QuartzScheduler should be registered with
the local MBeanServer.
|
JobRunShellFactory |
getJobRunShellFactory()
Get the
for the
to use. |
JobStore |
getJobStore()
Get the
for the
to use. |
boolean |
getMakeSchedulerThreadDaemon()
Get whether to mark the Quartz scheduling thread as daemon.
|
java.lang.String |
getName()
Get the name for the
. |
java.lang.String |
getRMIBindName()
Get the name under which to bind the QuartzScheduler in RMI.
|
java.lang.String |
getRMICreateRegistryStrategy()
Get the setting of whether or not Quartz should create an RMI Registry,
and if so, how.
|
java.lang.String |
getRMIRegistryHost()
Get the host name of the RMI Registry that the scheduler should export
itself to.
|
int |
getRMIRegistryPort()
Get the port number of the RMI Registry that the scheduler should export
itself to.
|
int |
getRMIServerPort()
Get the port number the scheduler server will be bound to.
|
java.util.List |
getSchedulerPlugins()
|
java.lang.String |
getThreadName()
Get the name for the
. |
ThreadPool |
getThreadPool()
Get the
for the
to use. |
java.lang.String |
getUniqueIdentifier() |
static java.lang.String |
getUniqueIdentifier(java.lang.String schedName,
java.lang.String schedInstId) |
boolean |
isThreadsInheritInitializersClassLoadContext()
Get whether to set the class load context of spawned threads to that
of the initializing thread.
|
void |
setInstanceId(java.lang.String instanceId)
Set the name for the
. |
void |
setJMXExport(boolean jmxExport)
Set whether the QuartzScheduler should be registered with the local
MBeanServer.
|
void |
setJMXObjectName(java.lang.String jmxObjectName)
Set the name under which the QuartzScheduler should be registered with
the local MBeanServer.
|
void |
setJobRunShellFactory(JobRunShellFactory jobRunShellFactory)
Set the
for the
to use. |
void |
setJobStore(JobStore jobStore)
Set the
for the
to use. |
void |
setMakeSchedulerThreadDaemon(boolean makeSchedulerThreadDaemon)
Set whether to mark the Quartz scheduling thread as daemon.
|
void |
setName(java.lang.String name)
Set the name for the
. |
void |
setRMIBindName(java.lang.String rmiBindName)
Set the name under which to bind the QuartzScheduler in RMI.
|
void |
setRMICreateRegistryStrategy(java.lang.String rmiCreateRegistryStrategy)
Set whether or not Quartz should create an RMI Registry, and if so, how.
|
void |
setRMIRegistryHost(java.lang.String hostName)
Set the host name of the RMI Registry that the scheduler should export
itself to.
|
void |
setRMIRegistryPort(int port)
Set the port number of the RMI Registry that the scheduler should export
itself to.
|
void |
setRMIServerPort(int port)
Set the port number the scheduler server will be bound to.
|
void |
setThreadName(java.lang.String threadName)
Set the name for the
. |
void |
setThreadPool(ThreadPool threadPool)
Set the
for the
to use. |
void |
setThreadsInheritInitializersClassLoadContext(boolean threadsInheritInitializersClassLoadContext)
Set whether to set the class load context of spawned threads to that
of the initializing thread.
|
public static final java.lang.String CREATE_REGISTRY_NEVER
public static final java.lang.String CREATE_REGISTRY_ALWAYS
public static final java.lang.String CREATE_REGISTRY_AS_NEEDED
public QuartzSchedulerResources()
Create an instance with no properties initialized.
public java.lang.String getName()
Get the name for the
.
QuartzScheduler
public void setName(java.lang.String name)
Set the name for the
.
QuartzScheduler
java.lang.IllegalArgumentException
- if name is null or empty.public java.lang.String getInstanceId()
Get the instance Id for the
.
QuartzScheduler
public void setInstanceId(java.lang.String instanceId)
Set the name for the
.
QuartzScheduler
java.lang.IllegalArgumentException
- if name is null or empty.public static java.lang.String getUniqueIdentifier(java.lang.String schedName, java.lang.String schedInstId)
public java.lang.String getUniqueIdentifier()
public java.lang.String getRMIRegistryHost()
Get the host name of the RMI Registry that the scheduler should export itself to.
public void setRMIRegistryHost(java.lang.String hostName)
Set the host name of the RMI Registry that the scheduler should export itself to.
public int getRMIRegistryPort()
Get the port number of the RMI Registry that the scheduler should export itself to.
public void setRMIRegistryPort(int port)
Set the port number of the RMI Registry that the scheduler should export itself to.
public int getRMIServerPort()
Get the port number the scheduler server will be bound to.
public void setRMIServerPort(int port)
Set the port number the scheduler server will be bound to.
public java.lang.String getRMICreateRegistryStrategy()
Get the setting of whether or not Quartz should create an RMI Registry, and if so, how.
public java.lang.String getThreadName()
Get the name for the
.
QuartzSchedulerThread
public void setThreadName(java.lang.String threadName)
Set the name for the
.
QuartzSchedulerThread
java.lang.IllegalArgumentException
- if name is null or empty.public void setRMICreateRegistryStrategy(java.lang.String rmiCreateRegistryStrategy)
Set whether or not Quartz should create an RMI Registry, and if so, how.
public ThreadPool getThreadPool()
Get the
for the ThreadPool
to use.
QuartzScheduler
public void setThreadPool(ThreadPool threadPool)
Set the
for the ThreadPool
to use.
QuartzScheduler
java.lang.IllegalArgumentException
- if threadPool is null.public JobStore getJobStore()
Get the
for the JobStore
to use.
QuartzScheduler
public void setJobStore(JobStore jobStore)
Set the
for the JobStore
to use.
QuartzScheduler
java.lang.IllegalArgumentException
- if jobStore is null.public JobRunShellFactory getJobRunShellFactory()
Get the
for the JobRunShellFactory
to use.
QuartzScheduler
public void setJobRunShellFactory(JobRunShellFactory jobRunShellFactory)
Set the
for the JobRunShellFactory
to use.
QuartzScheduler
java.lang.IllegalArgumentException
- if jobRunShellFactory is null.public void addSchedulerPlugin(SchedulerPlugin plugin)
Add the given
for the
SchedulerPlugin
to use. This method expects the plugin's
"initialize" method to be invoked externally (either before or after
this method is called).
QuartzScheduler
public java.util.List getSchedulerPlugins()
Get the List
of all
s for the
SchedulerPlugin
to use.
QuartzScheduler
public boolean getMakeSchedulerThreadDaemon()
Thread.setDaemon(boolean)
public void setMakeSchedulerThreadDaemon(boolean makeSchedulerThreadDaemon)
Thread.setDaemon(boolean)
public boolean isThreadsInheritInitializersClassLoadContext()
public void setThreadsInheritInitializersClassLoadContext(boolean threadsInheritInitializersClassLoadContext)
public java.lang.String getRMIBindName()
getUniqueIdentifier()
public void setRMIBindName(java.lang.String rmiBindName)
getUniqueIdentifier()
public boolean getJMXExport()
public void setJMXExport(boolean jmxExport)
public java.lang.String getJMXObjectName()
generateJMXObjectName.
public void setJMXObjectName(java.lang.String jmxObjectName)
generateJMXObjectName.
public static java.lang.String generateJMXObjectName(java.lang.String schedName, java.lang.String schedInstId)
The name is composed as: quartz:type=QuartzScheduler,name=[schedName],instance=[schedInstId]