|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--com.ls.util.threading.ObjectBuilder
|
+--com.ls.util.threading.StaticThreadPoolBuilder
Object builder for creating object of type StaticThreadPool. The properties defined by this object builder
are:
name = [name of the thread pool] count = [number of threads maintained by the pool]
These properties can be set by calling ObjectBuilder.setProperty(String, Object) or by calling
ObjectBuilder.setProperties(java.util.Properties). A subsequent call to ObjectBuilder.newInstance() will produce a new static
thread pool instance according to the previously set properties.
| Constructor Summary | |
StaticThreadPoolBuilder()
|
|
| Method Summary | |
protected void |
doCheck()
Overwritten to provide special checking operations, in this case: empty implementation. |
protected Object |
doNewInstance()
Overwritten to provide the actual instantiation code of a static thread pool according to the properties "name" and "threadCount". |
protected void |
doReset()
Overwritten to provide special reset operations, in this case: clearing the properties "name" and "threadCount". |
void |
setName(String name)
Sets the name of the thread pool that will be created by this builder. |
void |
setThreadCount(String value)
Sets the amount of thread maintained by the thread pool that will be created by this builder. |
| Methods inherited from class com.ls.util.threading.ObjectBuilder |
check, clearPropertyError, hasPropertyError, hasPropertyError, newBuilderInstance, newInstance, reset, setProperties, setProperties, setProperty, setPropertyError, setPropertyError |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public StaticThreadPoolBuilder()
| Method Detail |
public void setName(String name)
name - The name of the thread pool.public void setThreadCount(String value)
value - the amount of threads as a string valueprotected void doReset()
doReset in class ObjectBuilder
protected Object doNewInstance()
throws Throwable
doNewInstance in class ObjectBuilderThrowable - If something goes wrong during instantiation.
protected void doCheck()
throws BuildException
doCheck in class ObjectBuilderBuildException - if something went wrong
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||